From bd2abf344915f502693a17a5f141518e1609910d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 26 Feb 2022 20:14:55 +0100 Subject: Have an ElasticSearch cluster --- app/telemetry/deploy/telemetry-system.hcl | 61 +++++++++++++++++++++++++++++++ app/telemetry/deploy/telemetry.hcl | 34 ----------------- configuration.nix | 4 ++ 3 files changed, 65 insertions(+), 34 deletions(-) create mode 100644 app/telemetry/deploy/telemetry-system.hcl diff --git a/app/telemetry/deploy/telemetry-system.hcl b/app/telemetry/deploy/telemetry-system.hcl new file mode 100644 index 0000000..9dd379d --- /dev/null +++ b/app/telemetry/deploy/telemetry-system.hcl @@ -0,0 +1,61 @@ +job "telemetry-system" { + datacenters = ["neptune"] + type = "system" + + group "elasticsearch" { + network { + port "elastic" { + static = 9200 + } + port "elastic_internal" { + static = 9300 + } + } + + task "elastic" { + driver = "docker" + config { + image = "docker.elastic.co/elasticsearch/elasticsearch:7.17.0" + network_mode = "host" + volumes = [ + "/mnt/ssd/telemetry/es_data:/usr/share/elasticsearch/data", + ] + ports = [ "elastic", "elastic_internal" ] + sysctl = { + #"vm.max_map_count" = "262144", + } + ulimit = { + memlock = "9223372036854775807:9223372036854775807", + } + } + + resources { + memory = 2500 + cpu = 500 + } + + template { + data = <