feat(elk): update job specification to include unicast hosts
This commit is contained in:
parent
480c09d741
commit
32c6b85d4f
1 changed files with 33 additions and 5 deletions
|
@ -53,11 +53,6 @@ job "elk" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service {
|
|
||||||
provider = "consul"
|
|
||||||
port = "transport"
|
|
||||||
}
|
|
||||||
|
|
||||||
task "elasticsearch" {
|
task "elasticsearch" {
|
||||||
driver = "docker"
|
driver = "docker"
|
||||||
|
|
||||||
|
@ -74,12 +69,45 @@ job "elk" {
|
||||||
ulimit {
|
ulimit {
|
||||||
memlock = "-1:-1"
|
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 {
|
resources {
|
||||||
cpu = 2000
|
cpu = 2000
|
||||||
memory = 2048
|
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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue