staging: deploy garage 0.10 beta + fix monitoring

This commit is contained in:
Alex 2024-03-28 11:55:58 +01:00
parent e4708a325d
commit 5b89004c0f
3 changed files with 5 additions and 8 deletions

View file

@ -26,8 +26,8 @@ job "garage-staging" {
packages = [
"#bash", # so that we can enter a shell inside container
"#coreutils",
# garage v0.9.2-rc1 as of 2024-02-29
"git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git?ref=main&rev=b8c7a560ef339142607106649f8cef88def82fb8"
# garage v0.10 beta as of 2024-03-27
"git+https://git.deuxfleurs.fr/Deuxfleurs/garage.git?ref=next-0.10&rev=25c196f34d958f4f61d50c89a1c5d40b96d7cd24"
]
command = "garage"
args = [ "server" ]

View file

@ -39,7 +39,7 @@ job "telemetry-service" {
}
template {
data = "{{ key \"secrets/consul/consul.crt\" }}"
data = "{{ key \"secrets/consul/consul-ca.crt\" }}"
destination = "etc/prom/consul.crt"
}

View file

@ -19,10 +19,7 @@ cmd ln -sf /var/lib/consul/pki/consul$YEAR.key /var/lib/consul/pki/consul.key
cmd ln -sf /var/lib/consul/pki/consul$YEAR-client.crt /var/lib/consul/pki/consul-client.crt
cmd ln -sf /var/lib/consul/pki/consul$YEAR-client.key /var/lib/consul/pki/consul-client.key
cmd systemctl reload consul
cmd sleep 10
for file in nomad-ca.crt nomad$YEAR.crt nomad$YEAR.key \
nomad$YEAR-client.crt nomad$YEAR-client.key \
@ -30,8 +27,8 @@ for file in nomad-ca.crt nomad$YEAR.crt nomad$YEAR.key \
do
if pass $PKI/$file >/dev/null; then
write_pass $PKI/$file /var/lib/nomad/pki/$file
if [ "$CLUSTER" = "prod" ]; then
cmd "chown \$(stat -c %u /var/lib/private/nomad/) /var/lib/nomad/pki/$file"
if [ ! "$CLUSTER" = "staging" ]; then
cmd "chown \$(stat -c %u /var/lib/private/nomad/) /var/lib/nomad/pki/$file"
fi
fi
done