feat(elk): update job specification to include unicast hosts

This commit is contained in:
Ben Martin 2024-12-17 13:05:36 +00:00
parent 480c09d741
commit 32c6b85d4f
Signed by: ben
GPG key ID: 859A655FCD290E4A

View file

@ -53,11 +53,6 @@ job "elk" {
}
}
service {
provider = "consul"
port = "transport"
}
task "elasticsearch" {
driver = "docker"
@ -74,12 +69,45 @@ job "elk" {
ulimit {
memlock = "-1:-1"
}
mount {
type = "bind"
source = "local/unicast_hosts.txt"
target = "/usr/share/elasticsearch/config/unicast_hosts.txt"
}
}
env {
ES_PATH_CONF = "/usr/share/elasticsearch/config"
}
resources {
cpu = 2000
memory = 2048
}
template {
data = <<-EOF
{{ range service "elk-node-elasticsearch-transport" }}
{{ .Address }}:{{ .Port }}
{{ end }}
EOF
destination = "local/unicast_hosts.txt"
change_mode = "noop"
}
service {
name = "elk-node-elasticsearch-http"
provider = "consul"
port = "http"
}
service {
name = "elk-node-elasticsearch-transport"
provider = "consul"
port = "transport"
}
}
}