[arvados] created: 2.6.0-594-g284a69986c
git repository hosting
git at public.arvados.org
Thu Sep 14 15:00:16 UTC 2023
at 284a69986ca9e9057752b60a3e7099c426129060 (commit)
commit 284a69986ca9e9057752b60a3e7099c426129060
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Thu Sep 14 11:46:30 2023 -0300
20926: Sets default PG version when when using single host deployment.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/tools/salt-install/common.sh b/tools/salt-install/common.sh
index 7cc4c3b232..5d9dba14cd 100644
--- a/tools/salt-install/common.sh
+++ b/tools/salt-install/common.sh
@@ -56,6 +56,6 @@ else
fi
# Auto-sets PG version if needed
-if [ -n "${ROLE2NODES['database']:-}" ]; then
+if [[ -n "${ROLE2NODES['database']:-}" || "${NODELIST}" == "localhost" ]]; then
DATABASE_POSTGRESQL_VERSION="${DATABASE_POSTGRESQL_VERSION:-${DATABASE_POSTGRESQL_DEFAULT_VERSION}}"
fi
\ No newline at end of file
commit 4e527029e462d60779c7b40ed2ad8b1cbe6eddd3
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Thu Sep 14 11:23:00 2023 -0300
20926: Sets PostgreSQL v15 the default version.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/tools/salt-install/common.sh b/tools/salt-install/common.sh
index a1201fe369..7cc4c3b232 100644
--- a/tools/salt-install/common.sh
+++ b/tools/salt-install/common.sh
@@ -18,7 +18,7 @@ fi
USE_SSH_JUMPHOST=${USE_SSH_JUMPHOST:-}
DISABLED_CONTROLLER=""
-DATABASE_POSTGRESQL_DEFAULT_VERSION=12
+DATABASE_POSTGRESQL_DEFAULT_VERSION=15
# Comma-separated list of nodes. This is used to dynamically adjust
# salt pillars.
commit 5e1a45ef888c6b3eda51c9e41f0eb3c22f3c2b43
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Wed Sep 13 19:27:13 2023 -0300
20926: Requires manually setting PG version when not using the 'database' role.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/tools/salt-install/common.sh b/tools/salt-install/common.sh
index 7036e116c9..a1201fe369 100644
--- a/tools/salt-install/common.sh
+++ b/tools/salt-install/common.sh
@@ -18,6 +18,7 @@ fi
USE_SSH_JUMPHOST=${USE_SSH_JUMPHOST:-}
DISABLED_CONTROLLER=""
+DATABASE_POSTGRESQL_DEFAULT_VERSION=12
# Comma-separated list of nodes. This is used to dynamically adjust
# salt pillars.
@@ -53,3 +54,8 @@ if [ -z "${ROLE2NODES['balancer']:-}" ]; then
else
ENABLE_BALANCER="yes"
fi
+
+# Auto-sets PG version if needed
+if [ -n "${ROLE2NODES['database']:-}" ]; then
+ DATABASE_POSTGRESQL_VERSION="${DATABASE_POSTGRESQL_VERSION:-${DATABASE_POSTGRESQL_DEFAULT_VERSION}}"
+fi
\ No newline at end of file
diff --git a/tools/salt-install/installer.sh b/tools/salt-install/installer.sh
index d41c50e8c5..bb57666da6 100755
--- a/tools/salt-install/installer.sh
+++ b/tools/salt-install/installer.sh
@@ -297,6 +297,12 @@ deploy)
exit 1
fi
+ if [[ -z "${DATABASE_POSTGRESQL_VERSION:-}" ]]; then
+ echo
+ echo "Please configure DATABASE_POSTGRESQL_VERSION in local.params: It should match the version of the PostgreSQL service you're going to use."
+ exit 1
+ fi
+
if [[ ${SSL_MODE} == "bring-your-own" ]]; then
if [[ ! -z "${ROLE2NODES['balancer']:-}" ]]; then
checkcert balancer
diff --git a/tools/salt-install/local.params.example.multiple_hosts b/tools/salt-install/local.params.example.multiple_hosts
index e84b8d6c13..909c3354ec 100644
--- a/tools/salt-install/local.params.example.multiple_hosts
+++ b/tools/salt-install/local.params.example.multiple_hosts
@@ -143,9 +143,9 @@ SHELL_INT_IP=10.1.2.17
DATABASE_NAME="${CLUSTER}_arvados"
DATABASE_USER="${CLUSTER}_arvados"
-DATABASE_POSTGRESQL_VERSION=12
-# Set this if using an external PostgreSQL service.
+# Set these if using an external PostgreSQL service.
#DATABASE_EXTERNAL_SERVICE_HOST_OR_IP=
+#DATABASE_POSTGRESQL_VERSION=
# Performance tuning parameters. If these are not set, workers
# defaults on the number of cpus and queued requests defaults to 128.
diff --git a/tools/salt-install/local.params.example.single_host_multiple_hostnames b/tools/salt-install/local.params.example.single_host_multiple_hostnames
index d5273c0c11..8dece2b76f 100644
--- a/tools/salt-install/local.params.example.single_host_multiple_hostnames
+++ b/tools/salt-install/local.params.example.single_host_multiple_hostnames
@@ -78,9 +78,9 @@ SHELL_INT_IP=""
DATABASE_NAME="${CLUSTER}_arvados"
DATABASE_USER="${CLUSTER}_arvados"
-DATABASE_POSTGRESQL_VERSION=12
-# Set this if using an external PostgreSQL service.
+# Set these if using an external PostgreSQL service.
#DATABASE_EXTERNAL_SERVICE_HOST_OR_IP=
+#DATABASE_POSTGRESQL_VERSION=
# The directory to check for the config files (pillars, states) you want to use.
# There are a few examples under 'config_examples'.
diff --git a/tools/salt-install/local.params.example.single_host_single_hostname b/tools/salt-install/local.params.example.single_host_single_hostname
index 5d4dc12a12..33be542a15 100644
--- a/tools/salt-install/local.params.example.single_host_single_hostname
+++ b/tools/salt-install/local.params.example.single_host_single_hostname
@@ -88,9 +88,9 @@ SHELL_INT_IP=""
DATABASE_NAME="${CLUSTER}_arvados"
DATABASE_USER="${CLUSTER}_arvados"
-DATABASE_POSTGRESQL_VERSION=12
-# Set this if using an external PostgreSQL service.
+# Set these if using an external PostgreSQL service.
#DATABASE_EXTERNAL_SERVICE_HOST_OR_IP=
+#DATABASE_POSTGRESQL_VERSION=
# The directory to check for the config files (pillars, states) you want to use.
# There are a few examples under 'config_examples'.
commit 78668c47fb945a3371231415c8e6ad44895bd0ff
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Tue Sep 12 19:35:36 2023 -0300
20926: Allows the database version to be configurable from local.params.
Also, installs postgresql-client on the controller nodes from the salt
formula, so that its version matches the configured value.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/postgresql.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/postgresql.sls
index 70edfeb8d0..1f5d8df83d 100644
--- a/tools/salt-install/config_examples/multi_host/aws/pillars/postgresql.sls
+++ b/tools/salt-install/config_examples/multi_host/aws/pillars/postgresql.sls
@@ -7,13 +7,14 @@
{%- set controller_nodes = "__CONTROLLER_NODES__".split(",") %}
{%- set websocket_ip = "__WEBSOCKET_INT_IP__" %}
{%- set keepbalance_ip = "__KEEPBALANCE_INT_IP__" %}
+{%- set pg_version = "__DATABASE_POSTGRESQL_VERSION__" %}
### POSTGRESQL
postgres:
pkgs_extra:
- postgresql-contrib
use_upstream_repo: true
- version: '12'
+ version: {{ pg_version }}
postgresconf: |-
listen_addresses = '*' # listen on all interfaces
acls:
diff --git a/tools/salt-install/local.params.example.multiple_hosts b/tools/salt-install/local.params.example.multiple_hosts
index 0cfae3e284..e84b8d6c13 100644
--- a/tools/salt-install/local.params.example.multiple_hosts
+++ b/tools/salt-install/local.params.example.multiple_hosts
@@ -143,6 +143,7 @@ SHELL_INT_IP=10.1.2.17
DATABASE_NAME="${CLUSTER}_arvados"
DATABASE_USER="${CLUSTER}_arvados"
+DATABASE_POSTGRESQL_VERSION=12
# Set this if using an external PostgreSQL service.
#DATABASE_EXTERNAL_SERVICE_HOST_OR_IP=
diff --git a/tools/salt-install/local.params.example.single_host_multiple_hostnames b/tools/salt-install/local.params.example.single_host_multiple_hostnames
index 54da585d38..d5273c0c11 100644
--- a/tools/salt-install/local.params.example.single_host_multiple_hostnames
+++ b/tools/salt-install/local.params.example.single_host_multiple_hostnames
@@ -78,6 +78,7 @@ SHELL_INT_IP=""
DATABASE_NAME="${CLUSTER}_arvados"
DATABASE_USER="${CLUSTER}_arvados"
+DATABASE_POSTGRESQL_VERSION=12
# Set this if using an external PostgreSQL service.
#DATABASE_EXTERNAL_SERVICE_HOST_OR_IP=
diff --git a/tools/salt-install/local.params.example.single_host_single_hostname b/tools/salt-install/local.params.example.single_host_single_hostname
index d42b4cb54c..5d4dc12a12 100644
--- a/tools/salt-install/local.params.example.single_host_single_hostname
+++ b/tools/salt-install/local.params.example.single_host_single_hostname
@@ -88,6 +88,7 @@ SHELL_INT_IP=""
DATABASE_NAME="${CLUSTER}_arvados"
DATABASE_USER="${CLUSTER}_arvados"
+DATABASE_POSTGRESQL_VERSION=12
# Set this if using an external PostgreSQL service.
#DATABASE_EXTERNAL_SERVICE_HOST_OR_IP=
diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh
index b44fc8b19b..be56a9103c 100755
--- a/tools/salt-install/provision.sh
+++ b/tools/salt-install/provision.sh
@@ -180,6 +180,7 @@ apply_var_substitutions() {
s#__DATABASE_PASSWORD__#${DATABASE_PASSWORD}#g;
s#__DATABASE_INT_IP__#${DATABASE_INT_IP:-}#g;
s#__DATABASE_EXTERNAL_SERVICE_HOST_OR_IP__#${DATABASE_EXTERNAL_SERVICE_HOST_OR_IP:-}#g;
+ s#__DATABASE_POSTGRESQL_VERSION__#${DATABASE_POSTGRESQL_VERSION}#g;
s#__KEEPWEB_EXT_SSL_PORT__#${KEEPWEB_EXT_SSL_PORT}#g;
s#__KEEP_EXT_SSL_PORT__#${KEEP_EXT_SSL_PORT}#g;
s#__MANAGEMENT_TOKEN__#${MANAGEMENT_TOKEN}#g;
@@ -819,6 +820,7 @@ else
echo " - nginx.passenger" >> ${STATES_TOP}
fi
echo " - extra.passenger_rvm" >> ${STATES_TOP}
+ grep -q "\- postgres.client$" ${STATES_TOP} || echo " - postgres.client" >> ${STATES_TOP}
### If we don't install and run LE before arvados-api-server, it fails and breaks everything
### after it. So we add this here as we are, after all, sharing the host for api and controller
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list