From 87464506ce9ef0739c260f06f04fb2a3f0fd18f2 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Sun, 23 Jun 2024 11:34:36 +0200 Subject: staging: Passage garage en mode docker --- cluster/staging/app/garage/deploy/garage.hcl | 48 +++++++++++++++------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'cluster/staging') diff --git a/cluster/staging/app/garage/deploy/garage.hcl b/cluster/staging/app/garage/deploy/garage.hcl index b8e7227..0ffb277 100644 --- a/cluster/staging/app/garage/deploy/garage.hcl +++ b/cluster/staging/app/garage/deploy/garage.hcl @@ -1,13 +1,12 @@ job "garage-staging" { + datacenters = [ "neptune", "jupiter", "corrin", "bespin" ] type = "system" priority = 90 - datacenters = [ "neptune", "jupiter", "corrin", "bespin" ] update { - max_parallel = 1 - stagger = "1m" - min_healthy_time = "10s" + max_parallel = 2 + min_healthy_time = "60s" } group "garage-staging" { @@ -19,21 +18,27 @@ job "garage-staging" { port "admin" { static = 3909 } } - task "server" { - driver = "nix2" + update { + max_parallel = 10 + min_healthy_time = "30s" + healthy_deadline = "5m" + } + task "server" { + driver = "docker" config { - packages = [ - "#bash", # so that we can enter a shell inside container - "#coreutils", - # garage v1.0.0-rc1 as of 2024-03-28 - "git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git?ref=next-0.10&rev=afad62939e071621666ca7255f7164f92c4475bb" - ] - command = "garage" + image = "superboum/garage:v1.0.0-rc1-hotfix-red-ftr-wquorum" + command = "/garage" args = [ "server" ] - bind = { - "/mnt/storage/garage-staging/data" = "/data", - "/mnt/ssd/garage-staging/meta" = "/meta", + network_mode = "host" + volumes = [ + "/mnt/storage/garage-staging/data:/data", + "/mnt/ssd/garage-staging/meta:/meta", + "secrets/garage.toml:/etc/garage.toml", + "secrets:/etc/garage", + ] + logging { + type = "journald" } } @@ -41,27 +46,24 @@ job "garage-staging" { RUST_LOG = "garage=info,garage_api=debug", } - # files currently owned by root, we don't want to chown everything - user = "root" - template { data = file("../config/garage.toml") - destination = "etc/garage.toml" + destination = "secrets/garage.toml" } template { data = "{{ key \"secrets/consul/consul-ca.crt\" }}" - destination = "etc/garage/consul-ca.crt" + destination = "secrets/consul-ca.crt" } template { data = "{{ key \"secrets/consul/consul-client.crt\" }}" - destination = "etc/garage/consul-client.crt" + destination = "secrets/consul-client.crt" } template { data = "{{ key \"secrets/consul/consul-client.key\" }}" - destination = "etc/garage/consul-client.key" + destination = "secrets/consul-client.key" } resources { -- cgit v1.2.3