summaryrefslogtreecommitdiff
path: root/sys-cluster/nomad
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /sys-cluster/nomad
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'sys-cluster/nomad')
-rw-r--r--sys-cluster/nomad/Manifest6
-rw-r--r--sys-cluster/nomad/files/nomad.confd2
-rw-r--r--sys-cluster/nomad/files/nomad.initd20
-rw-r--r--sys-cluster/nomad/files/nomad.logrotated7
-rw-r--r--sys-cluster/nomad/metadata.xml11
-rw-r--r--sys-cluster/nomad/nomad-0.12.3.ebuild43
6 files changed, 89 insertions, 0 deletions
diff --git a/sys-cluster/nomad/Manifest b/sys-cluster/nomad/Manifest
new file mode 100644
index 000000000000..73cd58087f7b
--- /dev/null
+++ b/sys-cluster/nomad/Manifest
@@ -0,0 +1,6 @@
+AUX nomad.confd 70 BLAKE2B e7cd65e529d1a8d99212a3267d3dc8d6f6d8b310f7cbda77e31f6c6e26af41fe6866ea1c9dd579caa89b39edff2e7f70553d70d600e84cdc04dea25d50ed8883 SHA512 c4e646b97335123c6411b0a556eefb4a59198db3277ed5a833410b25a7ab9601548a5cb7dd041e031e55098e4d4c022d4b16b0ae9ba1a32358eb5d9403f4d7e9
+AUX nomad.initd 534 BLAKE2B 392ba0c199a401c278d47f2fb068831f331485d34eb6d81d7e14df60cbcc62f3ecc01a200e5a8ac00ab734789c07d6bcd73391e67d5141f04365c08935c07d62 SHA512 63920465cc4346e6d79b54afd0c0ad418a06c5f977edf8a49adb8b2895390cc13d48a18fc377de91c92449af5095347c36aecf67eda528da76209e77130f2b98
+AUX nomad.logrotated 83 BLAKE2B 2c970621c10520b2aaa17172d9c99a741737393db9a6424278e12d8b6676492c97b628d4be419ab921f7cf7685bae1a5e93eb04efa2ca6242012cfde203e02da SHA512 0ebdbeab15b01145eb2b33e0c6fd43dde3e4ac8eae9d8aff81797688276530732f613a39cd658fa4f5c2e8c99d70e6255f814ca5f3cd2bc5de259be324ab2851
+DIST nomad-0.12.3.tar.gz 51432205 BLAKE2B 77090f387e25f226c8d05b6ea16abfac0f4b710a40a3e7e5455bd6c8b7992080980967d4ebb92257348968dddbb45d2e5c3b58f143ae1205742bf08f0dec2a71 SHA512 17d361db11104ddbbae12a17301005c8eca3650e3fdda8f2fd6db8474728f31a2b6f828f2fba7e7d9d132b08cfb070799273353a17f5f66baa4dc5a0492562f8
+EBUILD nomad-0.12.3.ebuild 1152 BLAKE2B 5e46d8ab1d030bbbec3dc69ae154e2b362429c3256fd5689bed9ac5d108ac9d9a601a1e207a5b09f227d5ccff12ed4272a89b812cb21a0e9c94e4b0d5f3c1334 SHA512 7e922cd5d79af1d7d53f9304554ce11ff3dce19041b9a6571889888a081a3bd7f42f0ee284d12bd7ef5ab8cf71b0aceb148fb482d922bc57e4d5d994f3b1b1d8
+MISC metadata.xml 324 BLAKE2B bff415652c0d5fd2e56766c32b6e5df0d9bd00808cee31a70dc36db2e558383e2c489a5315273a42b5fa14723aa88fc659a248589f0d849425cafb5f78ec75c9 SHA512 b8e9827b4c5dd03abac84db21aab8f2743e1421c45aab547bf754165767307e9f60b29b541ab7cc4242347f1510226896db815832d4780fb606c92f9d804c163
diff --git a/sys-cluster/nomad/files/nomad.confd b/sys-cluster/nomad/files/nomad.confd
new file mode 100644
index 000000000000..b0a05ca40c60
--- /dev/null
+++ b/sys-cluster/nomad/files/nomad.confd
@@ -0,0 +1,2 @@
+# extra arguments for nomad
+command_args="agent -config=/etc/nomad.d"
diff --git a/sys-cluster/nomad/files/nomad.initd b/sys-cluster/nomad/files/nomad.initd
new file mode 100644
index 000000000000..2c3df5ff1e0e
--- /dev/null
+++ b/sys-cluster/nomad/files/nomad.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="simple and flexible workload orchestrator"
+command="/usr/bin/${RC_SVCNAME}"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_background="true"
+start_stop_daemon_args="--stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+stopsig=SIGINT
+extra_started_commands=reload
+
+depend() {
+ after net
+}
+
+reload() {
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+}
diff --git a/sys-cluster/nomad/files/nomad.logrotated b/sys-cluster/nomad/files/nomad.logrotated
new file mode 100644
index 000000000000..6cae2fdd4f76
--- /dev/null
+++ b/sys-cluster/nomad/files/nomad.logrotated
@@ -0,0 +1,7 @@
+/var/log/nomad/nomad.log {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/sys-cluster/nomad/metadata.xml b/sys-cluster/nomad/metadata.xml
new file mode 100644
index 000000000000..9f6cd416f2b5
--- /dev/null
+++ b/sys-cluster/nomad/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <use>
+ <flag name="nvidia">build with nvidia integration</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-cluster/nomad/nomad-0.12.3.ebuild b/sys-cluster/nomad/nomad-0.12.3.ebuild
new file mode 100644
index 000000000000..79ff227381ca
--- /dev/null
+++ b/sys-cluster/nomad/nomad-0.12.3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit go-module systemd
+GIT_COMMIT=ef99996f1419334e1d9d23eba9d24e7d9404218f
+
+DESCRIPTION="A simple and flexible workload orchestrator "
+HOMEPAGE="https://nomadproject.io"
+SRC_URI="https://github.com/hashicorp/nomad/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="nvidia"
+
+RESTRICT+=" test"
+
+src_compile() {
+ local go_ldflags go_tags
+ go_ldflags="-X github.com/hashicorp/nomad/version.GitCommit=${GIT_COMMIT}"
+ go_tags="codegen_generated $(usex nvidia '' 'nonvidia')"
+ CGO_ENABLED=1 \
+ go build \
+ -trimpath \
+ -ldflags "${go_ldflags}" \
+ -mod=vendor \
+ -tags "${go_tags}" \
+ -o bin/${PN} || die "compile failed"
+}
+
+src_install() {
+ dobin bin/${PN}
+ systemd_dounit dist/systemd/nomad.service
+ insinto /etc/nomad.d
+ newins dist/client.hcl client.hcl.example
+ newins dist/server.hcl server.hcl.example
+ keepdir /var/lib/nomad /var/log/nomad
+ newconfd "${FILESDIR}/nomad.confd" nomad
+ newinitd "${FILESDIR}/nomad.initd" nomad
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/nomad.logrotated" nomad
+}