summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2022-02-15 11:36:40 -0600
committerWilliam Hubbs <williamh@gentoo.org>2022-02-15 11:39:50 -0600
commitc21bc0f0950d9fbacfcd7c008176e927c726ce7e (patch)
tree85b9366619d2db51cb8fdb84baae209f453433ed /sys-cluster/nomad
parentdev-vcs/rsvndump: 0.6.1 (diff)
downloadgentoo-c21bc0f0950d9fbacfcd7c008176e927c726ce7e.tar.gz
gentoo-c21bc0f0950d9fbacfcd7c008176e927c726ce7e.tar.bz2
gentoo-c21bc0f0950d9fbacfcd7c008176e927c726ce7e.zip
sys-cluster/nomad: 1.2.6 bump
Bug: https://bugs.gentoo.org/812494 Bug: https://bugs.gentoo.org/833157 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'sys-cluster/nomad')
-rw-r--r--sys-cluster/nomad/Manifest2
-rw-r--r--sys-cluster/nomad/files/nomad.service29
-rw-r--r--sys-cluster/nomad/nomad-1.2.6.ebuild49
3 files changed, 80 insertions, 0 deletions
diff --git a/sys-cluster/nomad/Manifest b/sys-cluster/nomad/Manifest
index babde4a95dd3..b38f14d5d906 100644
--- a/sys-cluster/nomad/Manifest
+++ b/sys-cluster/nomad/Manifest
@@ -1 +1,3 @@
DIST nomad-1.0.9.tar.gz 40563203 BLAKE2B 5db3bce093ae873907572e5f67640fac162e4c4ffe436f2acd3ac9fe8da509f451ff73c948dcd49d10eb101afdfe5285b2906986983b938034c64aab8d0cab4d SHA512 66a00f15a16b57e8a3f97c43301bd9aaab76e185b56fe45193eb0e7c25e83fbcf1a7072f2d5fe4c533a00e63c71f3ec941a05cf6aa50f5051b8f3b5588b50463
+DIST nomad-1.2.6-vendor.tar.xz 8019208 BLAKE2B f972a84d201328f95e13a68fdc6dc0f0db5aff6d7ff98f5478ef310c6349fb4c0d9e5aa9c638ae81fb9f2776fa4d252c3b1daed091d3b9ae6d86a75d79e2ac0e SHA512 8d53eaa771847d862f14c3fad286fe42b5c4426b242b18d2b900e4807221e6624b8bb129f34c560078d8863ce19b58c6637d2cc806950fffb5140b8d44f44c8f
+DIST nomad-1.2.6.tar.gz 29585632 BLAKE2B 1b9ecbb11ddc59f8078831c6d41b8547a572c3b8475a21d65b8333204bdd2a6ee646cc7c5ec2bdffaee6c1b3cdf2dc30a667464695057e49c2bca41128b61452 SHA512 93a3ed9b0d992ba25cb126496cb9ed250195d8b8011312ebc4cffdf5f9f8786bc43cbe18cefc820597b8a117a05f6118e2e4a88e25e738c1bd309c5504e93ed9
diff --git a/sys-cluster/nomad/files/nomad.service b/sys-cluster/nomad/files/nomad.service
new file mode 100644
index 000000000000..08b243206d1b
--- /dev/null
+++ b/sys-cluster/nomad/files/nomad.service
@@ -0,0 +1,29 @@
+[Unit]
+Description=Nomad
+Documentation=https://nomadproject.io/docs/
+Wants=network-online.target
+After=network-online.target
+
+# When using Nomad with Consul it is not necessary to start Consul first. These
+# lines start Consul before Nomad as an optimization to avoid Nomad logging
+# that Consul is unavailable at startup.
+#Wants=consul.service
+#After=consul.service
+
+[Service]
+EnvironmentFile=/etc/nomad.d/nomad.env
+ExecReload=/bin/kill -HUP $MAINPID
+ExecStart=/usr/bin/nomad agent -config /etc/nomad.d
+KillMode=process
+KillSignal=SIGINT
+LimitNOFILE=65536
+LimitNPROC=infinity
+Restart=on-failure
+RestartSec=2
+StartLimitBurst=3
+StartLimitInterval=10
+TasksMax=infinity
+OOMScoreAdjust=-1000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-cluster/nomad/nomad-1.2.6.ebuild b/sys-cluster/nomad/nomad-1.2.6.ebuild
new file mode 100644
index 000000000000..e7175e4427d5
--- /dev/null
+++ b/sys-cluster/nomad/nomad-1.2.6.ebuild
@@ -0,0 +1,49 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd
+GIT_COMMIT=95514d569610f15ce49b4a7a1a6bfd3e7b3e7b4f
+
+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"
+SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-vendor.tar.xz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT=" test"
+
+src_prepare() {
+ default
+ if [[ -d ../vendor ]]; then
+ mv ../vendor . || die
+ fi
+}
+
+src_compile() {
+ local go_ldflags go_tags
+ go_ldflags="-X github.com/hashicorp/nomad/version.GitCommit=${GIT_COMMIT}"
+ go_tags="codegen_generated"
+ CGO_ENABLED=1 \
+ go build \
+ -ldflags "${go_ldflags}" \
+ -tags "${go_tags}" \
+ -trimpath \
+ -o bin/${PN} || die "compile failed"
+}
+
+src_install() {
+ dobin bin/${PN}
+ systemd_dounit "${FILESDIR}"/nomad.service
+ keepdir /etc/nomad.d
+ einstalldocs
+ dodoc CHANGELOG.md
+ 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
+}