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/prod/app/core') 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 = < Date: Fri, 21 Apr 2023 12:03:35 +0200 Subject: Diplonat on bespin, ipv6-only --- cluster/prod/app/core/deploy/diplonat.hcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cluster/prod/app/core') diff --git a/cluster/prod/app/core/deploy/diplonat.hcl b/cluster/prod/app/core/deploy/diplonat.hcl index bf56fd5..d6f8423 100644 --- a/cluster/prod/app/core/deploy/diplonat.hcl +++ b/cluster/prod/app/core/deploy/diplonat.hcl @@ -1,5 +1,5 @@ job "core:diplonat" { - datacenters = ["orion", "neptune", "scorpio"] + datacenters = ["orion", "neptune", "scorpio", "bespin"] type = "system" priority = 90 @@ -53,6 +53,9 @@ DIPLONAT_CONSUL_URL=https://consul.service.prod.consul:8501 DIPLONAT_CONSUL_TLS_SKIP_VERIFY=true DIPLONAT_CONSUL_CLIENT_CERT=/etc/diplonat/consul-client.crt DIPLONAT_CONSUL_CLIENT_KEY=/etc/diplonat/consul-client.key +{{ if env "meta.site" | eq "bespin" }} +DIPLONAT_IPV6_ONLY=true +{{ end }} RUST_LOG=debug EOH destination = "secrets/env" -- cgit v1.2.3 From 258d27c566c78dfc714079bf921270a71fdc9535 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 9 May 2023 15:12:03 +0200 Subject: deploy tricot at bespin, register gitea (not accessed yet) --- cluster/prod/app/core/deploy/tricot.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cluster/prod/app/core') diff --git a/cluster/prod/app/core/deploy/tricot.hcl b/cluster/prod/app/core/deploy/tricot.hcl index 7c955d2..7c3bada 100644 --- a/cluster/prod/app/core/deploy/tricot.hcl +++ b/cluster/prod/app/core/deploy/tricot.hcl @@ -1,5 +1,5 @@ job "core:tricot" { - datacenters = ["orion", "neptune", "scorpio"] + datacenters = ["orion", "neptune", "scorpio", "bespin"] type = "system" priority = 90 -- cgit v1.2.3