summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD18
-rw-r--r--nomad-client.conf13
-rw-r--r--nomad-client.service10
-rw-r--r--nomad-server.conf13
-rw-r--r--nomad-server.service10
6 files changed, 72 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a0b948b98e9..fe3a83faa38 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Thu Feb 25 23:05:56 UTC 2016
+# Fri Feb 26 11:18:48 UTC 2016
pkgbase = nomad
pkgdesc = A Distributed, Highly Available, Datacenter-Aware Scheduler
pkgver = 0.3.0
@@ -11,13 +11,22 @@ pkgbase = nomad
makedepends = go
makedepends = godep
makedepends = git
- depends = glibc
depends = ethtool
optdepends = docker
optdepends = rkt
optdepends = java-runtime-headless
+ backup = etc/nomad/server.conf
+ backup = etc/nomad/client.conf
source = https://github.com/hashicorp/nomad/archive/v0.3.0/nomad-0.3.0.tar.gz
+ source = nomad-server.service
+ source = nomad-server.conf
+ source = nomad-client.service
+ source = nomad-client.conf
sha256sums = b5e7520cdd542df14ae35778c066e296c41bb6aba8bf8286956f3005f407c486
+ sha256sums = 52b0a22c3c0c72c642a8728cb48bd8797f4f6a12990e11bbb2342edcc2a9a206
+ sha256sums = da475bc4aa3b1493eb62f09e7f99dcc171e8ce6d74df3da30514cfdfe72a5714
+ sha256sums = 4c8fb7c18c67ca20e3ee07f25cf2f0c82b66c4c173275ae8d643c91cce3c0ceb
+ sha256sums = ba80943ac42e617627c7e14be402078199ddba8d7e4276d67f0c9f6e6842d4a8
pkgname = nomad
diff --git a/PKGBUILD b/PKGBUILD
index c20bf0ecf34..711bc63afae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,15 +7,21 @@ pkgdesc="A Distributed, Highly Available, Datacenter-Aware Scheduler"
arch=('i686' 'x86_64')
url="https://www.nomadproject.io/"
license=('MPL')
-depends=('glibc' 'ethtool')
+depends=('ethtool')
makedepends=('go' 'godep' 'git')
optdepends=(
'docker'
'rkt'
'java-runtime-headless'
)
-source=(https://github.com/hashicorp/nomad/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
-sha256sums=('b5e7520cdd542df14ae35778c066e296c41bb6aba8bf8286956f3005f407c486')
+backup=(etc/nomad/{server,client}.conf)
+source=(https://github.com/hashicorp/nomad/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+ nomad-{server,client}.{service,conf})
+sha256sums=('b5e7520cdd542df14ae35778c066e296c41bb6aba8bf8286956f3005f407c486'
+ '52b0a22c3c0c72c642a8728cb48bd8797f4f6a12990e11bbb2342edcc2a9a206'
+ 'da475bc4aa3b1493eb62f09e7f99dcc171e8ce6d74df3da30514cfdfe72a5714'
+ '4c8fb7c18c67ca20e3ee07f25cf2f0c82b66c4c173275ae8d643c91cce3c0ceb'
+ 'ba80943ac42e617627c7e14be402078199ddba8d7e4276d67f0c9f6e6842d4a8')
build() {
cd $pkgname-$pkgver
@@ -25,6 +31,12 @@ build() {
}
package() {
+ for type in server client; do
+ install -Dm644 nomad-$type.service \
+ "$pkgdir"/usr/lib/systemd/system/nomad-$type.service
+ install -Dm644 nomad-$type.conf "$pkgdir"/etc/nomad/$type.conf
+ done
+
cd $pkgname-$pkgver
install -Dm755 $pkgname-$pkgver "$pkgdir"/usr/bin/$pkgname
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
diff --git a/nomad-client.conf b/nomad-client.conf
new file mode 100644
index 00000000000..1357ec56102
--- /dev/null
+++ b/nomad-client.conf
@@ -0,0 +1,13 @@
+# https://www.nomadproject.io/docs/agent/config.html
+
+bind_addr = "0.0.0.0"
+data_dir = "/var/lib/nomad"
+
+leave_on_interrupt = true
+leave_on_terminate = true
+
+disable_update_check = true
+
+client {
+ servers = []
+}
diff --git a/nomad-client.service b/nomad-client.service
new file mode 100644
index 00000000000..e66bc1278d0
--- /dev/null
+++ b/nomad-client.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=nomad client agent
+Documentation=https://www.nomadproject.io/docs/agent/
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/nomad agent -config /etc/nomad/client.conf -client
+
+[Install]
+WantedBy=multi-user.target
diff --git a/nomad-server.conf b/nomad-server.conf
new file mode 100644
index 00000000000..aadc69a031e
--- /dev/null
+++ b/nomad-server.conf
@@ -0,0 +1,13 @@
+# https://www.nomadproject.io/docs/agent/config.html
+
+bind_addr = "127.0.0.1"
+data_dir = "/var/lib/nomad"
+
+leave_on_interrupt = true
+leave_on_terminate = true
+
+disable_update_check = true
+
+server {
+ bootstrap_expect = 1
+}
diff --git a/nomad-server.service b/nomad-server.service
new file mode 100644
index 00000000000..146faf518ca
--- /dev/null
+++ b/nomad-server.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=nomad server agent
+Documentation=https://www.nomadproject.io/docs/agent/
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/nomad agent -config /etc/nomad/server.conf -server
+
+[Install]
+WantedBy=multi-user.target