From e23b52346742ebd9cb039e3af705ba150492cd1e Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Wed, 3 May 2023 08:53:59 +0200 Subject: Add infinite restart policy for postgresql --- cluster/prod/app/postgres/deploy/postgres.hcl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cluster/prod/app/postgres/deploy') diff --git a/cluster/prod/app/postgres/deploy/postgres.hcl b/cluster/prod/app/postgres/deploy/postgres.hcl index 9bad079..2aa2d07 100644 --- a/cluster/prod/app/postgres/deploy/postgres.hcl +++ b/cluster/prod/app/postgres/deploy/postgres.hcl @@ -16,6 +16,13 @@ job "postgres14" { port "psql_port" { static = 5433 } } + restart { + interval = "10m" + attempts = 10 + delay = "15s" + mode = "delay" + } + task "sentinel" { driver = "docker" -- cgit v1.2.3 From f3cd2e98b4bd26294464c5152b7082fc8a6b9ff2 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 4 May 2023 16:39:25 +0200 Subject: multisite postgres, orient plume to correct db --- cluster/prod/app/postgres/deploy/postgres.hcl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'cluster/prod/app/postgres/deploy') diff --git a/cluster/prod/app/postgres/deploy/postgres.hcl b/cluster/prod/app/postgres/deploy/postgres.hcl index 2aa2d07..e8825a1 100644 --- a/cluster/prod/app/postgres/deploy/postgres.hcl +++ b/cluster/prod/app/postgres/deploy/postgres.hcl @@ -1,5 +1,5 @@ job "postgres14" { - datacenters = ["orion"] + datacenters = ["orion", "neptune", "bespin"] type = "system" priority = 90 @@ -16,6 +16,13 @@ job "postgres14" { port "psql_port" { static = 5433 } } + constraint { + attribute = "${attr.unique.hostname}" + operator = "set_contains_any" + # target: courgette,df-ymf,abricot (or ananas) + value = "diplotaxis,courgette,concombre,df-ymf" + } + restart { interval = "10m" attempts = 10 @@ -106,7 +113,7 @@ job "postgres14" { } service { - tags = ["sql"] + tags = ["sql", "${meta.site}"] port = "psql_proxy_port" address_mode = "host" name = "psql-proxy" @@ -186,7 +193,7 @@ job "postgres14" { } service { - tags = ["sql"] + tags = ["sql", "${meta.site}"] port = "psql_port" address_mode = "host" name = "psql-keeper" -- cgit v1.2.3