-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathnomad.service
More file actions
55 lines (44 loc) · 1.66 KB
/
Copy pathnomad.service
File metadata and controls
55 lines (44 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[Unit]
Description=Nomad
Documentation=https://developer.hashicorp.com/nomad/docs
Wants=network-online.target
After=network-online.target
# When using Nomad with Consul you should start Consul first, so that running
# allocations using Consul are restored correctly during startup.
#Wants=consul.service
#After=consul.service
## Configure unit start rate limiting. Units which are started more than
## *burst* times within an *interval* time span are not permitted to start any
## more. Use `StartLimitIntervalSec` or `StartLimitInterval` (depending on
## systemd version) to configure the checking interval and `StartLimitBurst`
## to configure how many starts per interval are allowed. The values in the
## commented lines are defaults.
# StartLimitBurst = 5
## StartLimitIntervalSec is used for systemd versions >= 230
# StartLimitIntervalSec = 10s
## StartLimitInterval is used for systemd versions < 230
# StartLimitInterval = 10s
[Service]
# Nomad clients need to be run as "root" whereas Nomad servers should be run as
# the "nomad" user. Please change this if needed.
User=root
Group=root
Type=notify
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
TasksMax=infinity
# Nomad Server agents should never be force killed,
# so here we disable OOM (out of memory) killing for this unit.
# However, you may wish to change this for Client agents, since
# the workloads that Nomad places may be more important
# than the Nomad agent itself.
OOMScoreAdjust=-1000
[Install]
WantedBy=multi-user.target