aboutsummaryrefslogtreecommitdiff
path: root/cluster/staging
diff options
context:
space:
mode:
authorBaptiste Jonglez <git@bitsofnetworks.org>2024-06-23 11:34:36 +0200
committerBaptiste Jonglez <git@bitsofnetworks.org>2024-06-23 11:34:36 +0200
commit87464506ce9ef0739c260f06f04fb2a3f0fd18f2 (patch)
tree661f63631ab5ce3b460ab8ff1c16eba1177ca9ee /cluster/staging
parent2f8b2c74f46a38ca923e7f0a588af068bb965bac (diff)
downloadnixcfg-87464506ce9ef0739c260f06f04fb2a3f0fd18f2.tar.gz
nixcfg-87464506ce9ef0739c260f06f04fb2a3f0fd18f2.zip
staging: Passage garage en mode docker
Diffstat (limited to 'cluster/staging')
-rw-r--r--cluster/staging/app/garage/deploy/garage.hcl48
1 files changed, 25 insertions, 23 deletions
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 {