44 lines
944 B
HCL
44 lines
944 B
HCL
job "consul-clients" {
|
|
datacenters = ["dc1"]
|
|
type = "system"
|
|
|
|
group "consul-client" {
|
|
count = 0 # system job, runs on all nodes
|
|
|
|
task "consul-client" {
|
|
driver = "exec"
|
|
|
|
config {
|
|
command = "/usr/bin/consul"
|
|
args = [
|
|
"agent",
|
|
"-config-dir=/etc/consul.d",
|
|
"-data-dir=/opt/consul",
|
|
"-node=${node.unique.name}",
|
|
"-bind=${attr.unique.network.ip-address}",
|
|
"-retry-join=warden.tailnet-68f9.ts.net:8301",
|
|
"-retry-join=ch4.tailnet-68f9.ts.net:8301",
|
|
"-retry-join=ash3c.tailnet-68f9.ts.net:8301"
|
|
]
|
|
}
|
|
|
|
resources {
|
|
cpu = 100
|
|
memory = 128
|
|
}
|
|
|
|
service {
|
|
name = "consul-client"
|
|
port = "http"
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/v1/status/leader"
|
|
interval = "30s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|