From 0b3332fd3234a13fc5d780f94a74133d1e7ba199 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 21 Apr 2023 11:55:24 +0200 Subject: [PATCH] break out core services into separate files --- cluster/prod/app/core/deploy/bottin.hcl | 100 +++++++ cluster/prod/app/core/deploy/core-system.hcl | 257 ------------------ .../core/deploy/{core-service.hcl => d53.hcl} | 2 +- cluster/prod/app/core/deploy/diplonat.hcl | 68 +++++ cluster/prod/app/core/deploy/tricot.hcl | 109 ++++++++ 5 files changed, 278 insertions(+), 258 deletions(-) create mode 100644 cluster/prod/app/core/deploy/bottin.hcl delete mode 100644 cluster/prod/app/core/deploy/core-system.hcl rename cluster/prod/app/core/deploy/{core-service.hcl => d53.hcl} (98%) create mode 100644 cluster/prod/app/core/deploy/diplonat.hcl create mode 100644 cluster/prod/app/core/deploy/tricot.hcl 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 = <