Deploy `/etc/nomad.d/options.hcl`.
This commit is contained in:
parent
885907310f
commit
b91b44908b
|
@ -0,0 +1,23 @@
|
|||
plugin "docker" {
|
||||
config {
|
||||
# extra Docker labels to be set by Nomad on each Docker container with the appropriate value
|
||||
extra_labels = ["job_name", "task_group_name", "task_name", "namespace", "node_name"]
|
||||
|
||||
volumes {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
allow_privileged = true
|
||||
}
|
||||
}
|
||||
|
||||
client {
|
||||
host_volume "docker-sock" {
|
||||
path = "/var/run/docker.sock"
|
||||
}
|
||||
|
||||
host_volume "tmp" {
|
||||
path = "/tmp"
|
||||
}
|
||||
}
|
||||
|
|
@ -49,6 +49,14 @@ if node['nomad']['client']
|
|||
end
|
||||
end
|
||||
|
||||
remote_file "/etc/nomad.d/options.hcl" do
|
||||
mode "0644"
|
||||
owner "nomad"
|
||||
group "nomad"
|
||||
|
||||
notifies :restart, 'service[nomad]'
|
||||
end
|
||||
|
||||
directory '/etc/nomad.d/jobs' do
|
||||
owner 'nomad'
|
||||
group 'nomad'
|
||||
|
|
Loading…
Reference in New Issue