51 lines
1.0 KiB
HCL
51 lines
1.0 KiB
HCL
job "consul-clients-additional" {
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
constraint {
|
|
attribute = "${node.unique.name}"
|
|
operator = "regexp"
|
|
value = "ch2|ch3|de"
|
|
}
|
|
|
|
group "consul-client" {
|
|
count = 3
|
|
|
|
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",
|
|
"-client=0.0.0.0"
|
|
]
|
|
}
|
|
|
|
resources {
|
|
cpu = 100
|
|
memory = 128
|
|
}
|
|
|
|
service {
|
|
name = "consul-client"
|
|
port = "http"
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/v1/status/leader"
|
|
interval = "30s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|