feat(elk): add Elasticsearch configuration template and bind mount for elasticsearch.yml

This commit is contained in:
Ben Martin 2024-12-19 13:47:11 +00:00
parent 5ca5fac50b
commit d7f8939bad
Signed by: ben
GPG key ID: 859A655FCD290E4A

View file

@ -78,6 +78,12 @@ job "elk" {
source = "local/unicast_hosts.txt"
target = "/usr/share/elasticsearch/config/unicast_hosts.txt"
}
mount {
type = "bind"
source = "local/elasticsearch.yml"
target = "/usr/share/elasticsearch/config/elasticsearch.yml"
}
}
env {
@ -89,6 +95,42 @@ job "elk" {
memory = 2048
}
template {
data = <<-EOF
cluster:
name: "docker-cluster"
node:
name: {{ env "node.unique.name" }}
network:
host: 0.0.0.0
publish_host: "{{ env "NOMAD_IP_transport" }}"
discovery:
seed_providers: file
xpack:
security:
enrollment:
enabled: true
transport:
ssl:
enabled: true
verification_mode: certificate
client_authentication: required
keystore:
path: certs/elastic-certificates.p12
truststore:
path: certs/elastic-certificates.p12
http:
ssl:
enabled: true
keystore:
path: certs/http.p12
bootstrap:
memory_lock: true
EOF
destination = "local/elasticsearch.yml"
}
template {
data = <<-EOF
{{ range service "elk-node-elasticsearch-transport" }}