open-nomad/dev/docker-clients/client.nomad

54 lines
989 B
Plaintext
Raw Normal View History

job "client" {
datacenters = ["dc1"]
group "client" {
count = 6
task "agent" {
driver = "docker"
config {
image = "djenriquez/nomad:v0.6.0"
# command = "nomad"
args = ["agent"]
network_mode = "host"
volumes = ["local/config:/etc/nomad", "/var/run/docker.sock:/var/run/docker.sock", "/tmp:/tmp"]
privileged = true
}
resources {
2017-08-07 18:19:46 +00:00
cpu = 300
memory = 100
network {
mbits = 10
port "http"{}
}
}
template {
data = <<EOF
2017-08-07 18:19:46 +00:00
log_level = "DEBUG"
data_dir = "/tmp/nomad-client{{ env "NOMAD_ALLOC_INDEX" }}"
name = "client-{{ env "NOMAD_ALLOC_INDEX" }}"
enable_debug = true
client {
2017-08-07 18:19:46 +00:00
enabled = true
servers = ["127.0.0.1:4647"]
options {
"driver.raw_exec.enable" = "1"
}
}
ports {
2017-08-07 18:19:46 +00:00
http = {{ env "NOMAD_PORT_http" }}
}
EOF
destination = "local/config/client.hcl"
}
}
}
}