summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/nomad/files/nomad.service')
-rw-r--r--sys-cluster/nomad/files/nomad.service29
1 files changed, 29 insertions, 0 deletions
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