aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GIDs1
-rw-r--r--UIDs1
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/nomad/Makefile85
-rw-r--r--sysutils/nomad/distinfo14
-rw-r--r--sysutils/nomad/files/nomad.in55
-rw-r--r--sysutils/nomad/pkg-descr6
-rw-r--r--sysutils/nomad/pkg-plist3
8 files changed, 166 insertions, 0 deletions
diff --git a/GIDs b/GIDs
index 57e20cd3dcf0..f7754e6901ce 100644
--- a/GIDs
+++ b/GIDs
@@ -193,6 +193,7 @@ slurm:*:468:
consul:*:469:
serf:*:470:
vault:*:471:
+nomad:*:472:
_bbstored:*:505:
radmind:*:506:
skkserv:*:507:
diff --git a/UIDs b/UIDs
index c7e2c07b7a0d..f84a527d9893 100644
--- a/UIDs
+++ b/UIDs
@@ -200,6 +200,7 @@ slurm:*:468:468::0:0:SLURM Daemon:/home/slurm:/usr/sbin/nologin
consul:*:469:469::0:0:Consul Daemon:/var/tmp/consul:/usr/sbin/nologin
serf:*:470:470::0:0:Serf Daemon:/nonexistent:/usr/sbin/nologin
vault:*:471:471::0:0:Vault Daemon:/nonexistent:/usr/sbin/nologin
+nomad:*:472:472::0:0:Nomad Daemon:/var/tmp/nomad:/usr/sbin/nologin
_bbstored:*:505:505::0:0:Box Backup Store Daemon:/nonexistent:/usr/sbin/nologin
radmind:*:506:506::0:0:radmind User:/var/radmind:/usr/sbin/nologin
skkserv:*:507:507::0:0:skkserv User:/nonexistent:/usr/sbin/nologin
diff --git a/sysutils/Makefile b/sysutils/Makefile
index c5245d26093c..c929bec7b855 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -629,6 +629,7 @@
SUBDIR += nfsping
SUBDIR += nitrogen
SUBDIR += no-login
+ SUBDIR += nomad
SUBDIR += npadmin
SUBDIR += nrg2iso
SUBDIR += ntfsprogs
diff --git a/sysutils/nomad/Makefile b/sysutils/nomad/Makefile
new file mode 100644
index 000000000000..6ee613746425
--- /dev/null
+++ b/sysutils/nomad/Makefile
@@ -0,0 +1,85 @@
+# $FreeBSD$
+
+PORTNAME= nomad
+PORTVERSION= 0.4.0
+DISTVERSIONPREFIX= v
+PORTREVISION= 1
+CATEGORIES= sysutils
+
+MAINTAINER= john@pcbsd.org
+COMMENT= Cluster manager and scheduler
+
+LICENSE= MPL
+
+BUILD_DEPENDS= go>=1.4:lang/go
+RUN_DEPENDS= go>=1.4:lang/go
+
+USES= compiler
+
+USE_GITHUB= yes
+
+GH_ACCOUNT= hashicorp:DEFAULT kardianos:govendor mitchellh:gox \
+ golang:tools axw:gocov matm:gocov_html ugorji:go
+
+GH_PROJECT= nomad govendor:govendor gox:gox tools:tools gocov:gocov \
+ gocov-html:gocov_html go:go
+
+GH_TAGNAME= 3bbf3a5 fa2e272:govendor 54b6194:gox c887be1:tools \
+ f5b2b5c:gocov b729399:gocov_html b94837a:go
+
+USE_RC_SUBR= nomad
+
+USERS= nomad
+GROUPS= nomad
+
+STRIP=
+
+post-patch:
+ @${MKDIR} ${WRKSRC}/src/github.com/hashicorp/nomad
+.for src in .gitignore .travis.yml api CHANGELOG.md client command \
+ commands.go demo dist GNUmakefile helper ISSUE_TEMPLATE.md jobspec \
+ LICENSE main_test.go main.go nomad README.md scheduler scripts \
+ testutil Vagrantfile vendor version.go website
+ @${MV} ${WRKSRC}/${src} \
+ ${WRKSRC}/src/github.com/hashicorp/nomad
+.endfor
+ @${MKDIR} ${WRKSRC}/src/github.com/axw
+ @${MKDIR} ${WRKSRC}/src/github.com/kardianos
+ @${MKDIR} ${WRKSRC}/src/github.com/matm
+ @${MKDIR} ${WRKSRC}/src/github.com/mitchellh
+ @${MKDIR} ${WRKSRC}/src/github.com/ugorji
+ @${MKDIR} ${WRKSRC}/src/golang.org/x
+ @${MKDIR} ${WRKSRC}/src/gopkg.in/matm/v1
+ @${MV} ${WRKSRC_govendor} \
+ ${WRKSRC}/src/github.com/kardianos/govendor
+ @${MV} ${WRKSRC_gox} \
+ ${WRKSRC}/src/github.com/mitchellh/gox
+ @${MV} ${WRKSRC_gocov} \
+ ${WRKSRC}/src/github.com/axw/gocov
+ @${MV} ${WRKSRC_go} \
+ ${WRKSRC}/src/github.com/ugorji/go
+ @${MV} ${WRKSRC_gocov_html} \
+ ${WRKSRC}/src/gopkg.in/matm/v1/gocov-html
+ @${MV} ${WRKSRC_tools} \
+ ${WRKSRC}/src/golang.org/x/tools
+
+do-build:
+ @cd ${WRKSRC}/src/github.com/hashicorp/nomad; \
+ ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x \
+ -ldflags "-X main.GitDescribe v${PORTVERSION}" -o bin/nomad
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/hashicorp/nomad/bin/nomad ${STAGEDIR}${PREFIX}/bin/nomad
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/nomad
+ ${INSTALL_DATA} ${WRKSRC}/src/github.com/hashicorp/nomad/dist/client.hcl \
+ ${STAGEDIR}${PREFIX}/etc/nomad/client.hcl.sample
+ ${INSTALL_DATA} ${WRKSRC}/src/github.com/hashicorp/nomad/dist/server.hcl \
+ ${STAGEDIR}${PREFIX}/etc/nomad/server.hcl.sample
+
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_TYPE} == clang
+BUILD_ENV= CC=clang
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/nomad/distinfo b/sysutils/nomad/distinfo
new file mode 100644
index 000000000000..be111a1d7bf0
--- /dev/null
+++ b/sysutils/nomad/distinfo
@@ -0,0 +1,14 @@
+SHA256 (hashicorp-nomad-v0.4.0-3bbf3a5_GH0.tar.gz) = 1cf1a1bd2701e7431775283b474f3256f325057596b920a783b32c54d91e15ba
+SIZE (hashicorp-nomad-v0.4.0-3bbf3a5_GH0.tar.gz) = 14655372
+SHA256 (kardianos-govendor-fa2e272_GH0.tar.gz) = c6acfed31a0245572f2fec6e64582ecf542563989b7ef420b676ca96e5032829
+SIZE (kardianos-govendor-fa2e272_GH0.tar.gz) = 106719
+SHA256 (mitchellh-gox-54b6194_GH0.tar.gz) = daedc65f79139f5a702993969f3e7af3c13f8aca7af3cfef9efa8fe85105f56f
+SIZE (mitchellh-gox-54b6194_GH0.tar.gz) = 13735
+SHA256 (golang-tools-c887be1_GH0.tar.gz) = 4e4ce1f7b1ed859d252d3539302c956472f6d082c038978a75ff3a853d25ebd1
+SIZE (golang-tools-c887be1_GH0.tar.gz) = 1768206
+SHA256 (axw-gocov-f5b2b5c_GH0.tar.gz) = 839169e5c2c0583fa686e05affa4685a55e4b9b4ac08d571550cd2254fd0958c
+SIZE (axw-gocov-f5b2b5c_GH0.tar.gz) = 12575
+SHA256 (matm-gocov-html-b729399_GH0.tar.gz) = 227555a0346c27daa21ef7da1bcf27af1c5715dd86fb74e4014a4f16ed9f2ec5
+SIZE (matm-gocov-html-b729399_GH0.tar.gz) = 125862
+SHA256 (ugorji-go-b94837a_GH0.tar.gz) = 51138e1177780f2b0204dbd03c6e40356bf493375652d880fb2c68f8e5daced8
+SIZE (ugorji-go-b94837a_GH0.tar.gz) = 167304
diff --git a/sysutils/nomad/files/nomad.in b/sysutils/nomad/files/nomad.in
new file mode 100644
index 000000000000..652226b08d9c
--- /dev/null
+++ b/sysutils/nomad/files/nomad.in
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+# $FreeBSD: head/sysutils/nomad/files/nomad.in 386655 2015-05-18 02:05:03Z swills $
+#
+# PROVIDE: nomad
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# nomad_enable (bool): Set to NO by default.
+# Set it to YES to enable nomad.
+# nomad_user (user): Set user to run nomad.
+# Default is "nomad".
+# nomad_group (group): Set group to run nomad.
+# Default is "nomad".
+# nomad_dir (dir): Set dir to run nomad in.
+# Default is "/var/tmp/nomad".
+# nomad_env (dir): Set environment variables used with nomad
+# Default is "".
+
+. /etc/rc.subr
+
+name=nomad
+rcvar=nomad_enable
+
+load_rc_config $name
+
+: ${nomad_enable:="NO"}
+: ${nomad_user:="nomad"}
+: ${nomad_group:="nomad"}
+: ${nomad_dir:="/var/tmp/nomad"}
+: ${nomad_env:=""}
+
+pidfile=/var/run/nomad.pid
+procname="%%PREFIX%%/bin/nomad"
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} /usr/bin/env ${nomad_env} ${procname} agent -data-dir=${nomad_dir} -config=%%PREFIX%%/etc/nomad ${nomad_args}"
+
+start_precmd=nomad_startprecmd
+
+nomad_startprecmd()
+{
+ if [ ! -e ${pidfile} ]; then
+ install -o ${nomad_user} -g ${nomad_group} /dev/null ${pidfile};
+ fi
+
+ if [ ! -d ${nomad_dir} ]; then
+ install -d -o ${nomad_user} -g ${nomad_group} ${nomad_dir}
+ fi
+
+}
+
+run_rc_command "$1"
diff --git a/sysutils/nomad/pkg-descr b/sysutils/nomad/pkg-descr
new file mode 100644
index 000000000000..2367f2b733d3
--- /dev/null
+++ b/sysutils/nomad/pkg-descr
@@ -0,0 +1,6 @@
+Nomad is a cluster manager and schedular that provides a common workflow
+to deploy applications across an infrastructure. Deploy virtualized,
+containerized, or standalone application workloads across a fleet of
+servers to maximize resource utilization.
+
+https://www.nomadproject.io/
diff --git a/sysutils/nomad/pkg-plist b/sysutils/nomad/pkg-plist
new file mode 100644
index 000000000000..caebe482e30a
--- /dev/null
+++ b/sysutils/nomad/pkg-plist
@@ -0,0 +1,3 @@
+bin/nomad
+@sample %%ETCDIR%%/client.hcl.sample
+@sample %%ETCDIR%%/server.hcl.sample