[arvados] created: 2.6.0-591-g78668c47fb

git repository hosting git at public.arvados.org
Tue Sep 12 22:37:38 UTC 2023


        at  78668c47fb945a3371231415c8e6ad44895bd0ff (commit)


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