From 4c50dd57f1312f7541cd5b38dc4606d352e5e13a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 7 Dec 2022 16:35:21 +0100 Subject: [PATCH] staging: reorganize core services and add D53 --- .../staging/app/core/deploy/core-service.hcl | 62 ++++++++++++++ .../deploy/core-system.hcl} | 85 +++++++++++++++++-- cluster/staging/app/core/deploy/core.hcl | 71 ---------------- .../app/directory/deploy/directory.hcl | 2 +- .../app/telemetry/deploy/telemetry.hcl | 6 +- 5 files changed, 144 insertions(+), 82 deletions(-) create mode 100644 cluster/staging/app/core/deploy/core-service.hcl rename cluster/staging/app/{frontend/deploy/frontend-tricot.hcl => core/deploy/core-system.hcl} (54%) delete mode 100644 cluster/staging/app/core/deploy/core.hcl diff --git a/cluster/staging/app/core/deploy/core-service.hcl b/cluster/staging/app/core/deploy/core-service.hcl new file mode 100644 index 0000000..3f4b343 --- /dev/null +++ b/cluster/staging/app/core/deploy/core-service.hcl @@ -0,0 +1,62 @@ +job "core-service" { + datacenters = ["neptune"] + type = "service" + priority = 90 + + group "D53" { + count = 1 + + task "d53" { + driver = "nix2" + + config { + packages = [ + "git+https://git.deuxfleurs.fr/lx/D53.git?ref=main&rev=ed2653ae7dba9c072dcca1aed03b7cda0d910c85" + ] + command = "d53" + } + + resources { + cpu = 100 + memory = 100 + } + + restart { + interval = "3m" + attempts = 10 + delay = "15s" + mode = "delay" + } + + template { + data = "{{ key \"secrets/consul/consul-ca.crt\" }}" + destination = "etc/tricot/consul-ca.crt" + } + + template { + data = "{{ key \"secrets/consul/consul-client.crt\" }}" + destination = "etc/tricot/consul-client.crt" + } + + template { + data = "{{ key \"secrets/consul/consul-client.key\" }}" + destination = "etc/tricot/consul-client.key" + } + + template { + data = <