job "logging-elk" {
datacenters = ["my-little-datacenter"]
type = "service"
update {
stagger = "10s"
max_parallel = 1
}
# - logging-elk - #
group "logging-elk" {
count = 3
# - elasticsearch - #
task "elasticsearch" {
driver = "docker"
template {
data = <<EOH
cluster.name: "docker-cluster123"
network.host: 0.0.0.0
discovery.zen.minimum_master_nodes: 1
xpack.license.self_generated.type: basic
EOH
destination = "local/elasticsearch.yml"
}
config {
image = "docker.elastic.co/elasticsearch/elasticsearch:6.1.2"
logging {
type = "json-file"
}
port_map {
es_rest = 9200
es_node = 9300
}
volumes = [
"local/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml",
]
}
resources {
memory = 3000
network {
mbits = 50
port "es_rest" {
static = "9201"
}
port "es_node" {
static = "9301"
}
}
}
service {
name = "elasticsearch"
tags = ["elastic"]
port = "es_rest"
check {
type = "http"
path = "/"
port = "es_rest"
interval = "10s"
timeout = "2s"
}
}
}
# - end elasticsearch - #
}
# - end logging-elk - #
}
After I ran the job, the 3 elasticsearch containers can't join as one cluster, does anyone can provide a working example?
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/nomad/issues
IRC: #nomad-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Nomad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nomad-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nomad-tool/30526dfa-1b54-4610-8a20-5f2e905b10a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to nomad-tool+...@googlegroups.com.