From 0b3332fd3234a13fc5d780f94a74133d1e7ba199 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 21 Apr 2023 11:55:24 +0200 Subject: break out core services into separate files --- cluster/prod/app/core/deploy/bottin.hcl | 100 ++++++++++ cluster/prod/app/core/deploy/core-service.hcl | 64 ------- cluster/prod/app/core/deploy/core-system.hcl | 257 -------------------------- cluster/prod/app/core/deploy/d53.hcl | 64 +++++++ cluster/prod/app/core/deploy/diplonat.hcl | 68 +++++++ cluster/prod/app/core/deploy/tricot.hcl | 109 +++++++++++ 6 files changed, 341 insertions(+), 321 deletions(-) create mode 100644 cluster/prod/app/core/deploy/bottin.hcl delete mode 100644 cluster/prod/app/core/deploy/core-service.hcl delete mode 100644 cluster/prod/app/core/deploy/core-system.hcl create mode 100644 cluster/prod/app/core/deploy/d53.hcl create mode 100644 cluster/prod/app/core/deploy/diplonat.hcl create mode 100644 cluster/prod/app/core/deploy/tricot.hcl (limited to 'cluster') diff --git a/cluster/prod/app/core/deploy/bottin.hcl b/cluster/prod/app/core/deploy/bottin.hcl new file mode 100644 index 0000000..40bb5af --- /dev/null +++ b/cluster/prod/app/core/deploy/bottin.hcl @@ -0,0 +1,100 @@ +job "core:bottin" { + datacenters = ["orion", "neptune", "scorpio"] + type = "system" + priority = 90 + + update { + max_parallel = 1 + stagger = "1m" + } + + group "bottin" { + constraint { + distinct_property = "${meta.site}" + value = "1" + } + + network { + port "ldap_port" { + static = 389 + to = 389 + } + } + + task "bottin" { + driver = "docker" + config { + image = "dxflrs/bottin:7h18i30cckckaahv87d3c86pn4a7q41z" + network_mode = "host" + readonly_rootfs = true + ports = [ "ldap_port" ] + volumes = [ + "secrets/config.json:/config.json", + "secrets:/etc/bottin", + ] + } + + restart { + interval = "5m" + attempts = 10 + delay = "15s" + mode = "delay" + } + + resources { + memory = 100 + memory_max = 200 + } + + template { + data = file("../config/bottin/config.json.tpl") + destination = "secrets/config.json" + } + + template { + data = "{{ key \"secrets/consul/consul.crt\" }}" + destination = "secrets/consul.crt" + } + + template { + data = "{{ key \"secrets/consul/consul-client.crt\" }}" + destination = "secrets/consul-client.crt" + } + + template { + data = "{{ key \"secrets/consul/consul-client.key\" }}" + destination = "secrets/consul-client.key" + } + + template { + data = <