From: Andreas Geissler Date: Mon, 19 May 2025 14:57:28 +0000 (+0200) Subject: [MARIADB] Update mariadb image and operator versions X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a8bca2ee3be1952c66533fdeeb35bc9f9d7fcdaa;p=oom.git [MARIADB] Update mariadb image and operator versions - change version to mariadb:11.7.2 - change client from mysql to mariadb - update mariadb-operator version to 0.38.1 - cleanup so-mariadb DB settings Issue-ID: OOM-3335 Change-Id: I8a6026c73baf3bc700c115aa295e33f2806da371 Signed-off-by: Andreas Geissler --- diff --git a/docs/sections/guides/infra_guides/oom_infra_deployment_requirements.rst b/docs/sections/guides/infra_guides/oom_infra_deployment_requirements.rst index c06871bd7e..0de177510e 100644 --- a/docs/sections/guides/infra_guides/oom_infra_deployment_requirements.rst +++ b/docs/sections/guides/infra_guides/oom_infra_deployment_requirements.rst @@ -52,7 +52,7 @@ The versions of software that are supported and tested by OOM are as follows: ============== =========== ======= ======== ======== ============= ======== New Delhi 1.28.6 3.13.1 1.28.x 20.10.x 1.14.4 0.41.0 Oslo 1.28.6 3.13.1 1.30.x 23.0.x 1.16.2 0.44.0 - Paris 1.28.6 3.13.1 1.30.x 23.0.x 1.16.2 0.44.0 + Paris 1.30.4 3.16.4 1.30.x 23.0.x 1.17.2 0.45.0 ============== =========== ======= ======== ======== ============= ======== .. table:: OOM Software Requirements (production) @@ -62,7 +62,7 @@ The versions of software that are supported and tested by OOM are as follows: ============== ====== ============ ============== New Delhi 1.21.0 v1.0.0 22.0.4 Oslo 1.24.1 v1.2.1 26.0.6 - Paris 1.24.1 v1.2.1 26.0.6 + Paris 1.25.2 v1.2.1 26.0.6 ============== ====== ============ ============== .. table:: OOM Software Requirements (optional) @@ -72,5 +72,5 @@ The versions of software that are supported and tested by OOM are as follows: ============== =========== ========== =========== ============ =========== New Delhi 45.x 1.16.0 0.28.1 - - Oslo 45.x 1.20.2 0.36.0 5.7.2 1.18.0 - Paris 45.x 1.20.2 0.37.1 5.7.2 1.18.0 + Paris 71.x 1.21.2 0.38.1 5.7.2 1.19.1 ============== =========== ========== =========== ============ =========== diff --git a/kubernetes/cds/Chart.yaml b/kubernetes/cds/Chart.yaml index f179afd6e9..1353916813 100644 --- a/kubernetes/cds/Chart.yaml +++ b/kubernetes/cds/Chart.yaml @@ -17,14 +17,14 @@ apiVersion: v2 description: ONAP Controller Design Studio (CDS) name: cds -version: 13.0.3 +version: 16.0.0 dependencies: - name: common version: ~13.x-0 repository: '@local' - name: mariadb-galera - version: ~13.x-0 + version: ~16.x-0 repository: '@local' condition: global.mariadbGalera.localCluster - name: cds-blueprints-processor diff --git a/kubernetes/common/mariadb-galera/Chart.yaml b/kubernetes/common/mariadb-galera/Chart.yaml index c5cfdd7e63..5efb36b81b 100644 --- a/kubernetes/common/mariadb-galera/Chart.yaml +++ b/kubernetes/common/mariadb-galera/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: Chart for MariaDB Galera cluster name: mariadb-galera -version: 13.2.4 +version: 16.0.0 keywords: - mariadb - mysql diff --git a/kubernetes/common/mariadb-galera/values.yaml b/kubernetes/common/mariadb-galera/values.yaml index e1d650f881..c7ec8b2aaa 100644 --- a/kubernetes/common/mariadb-galera/values.yaml +++ b/kubernetes/common/mariadb-galera/values.yaml @@ -57,16 +57,16 @@ secrets: mariadbOperator: image: mariadb - appVersion: 11.4.4 + appVersion: 11.7.2 persistence: #storageClassName: default size: 3Gi galera: enabled: true agentImage: mariadb-operator/mariadb-operator - agentVersion: 0.37.1 + agentVersion: 0.38.1 initImage: mariadb-operator/mariadb-operator - initVersion: 0.37.1 + initVersion: 0.38.1 ## String to partially override common.names.fullname template (will maintain the release name) ## diff --git a/kubernetes/common/mariadb-init/Chart.yaml b/kubernetes/common/mariadb-init/Chart.yaml index 5c29010fc3..f1acef604d 100644 --- a/kubernetes/common/mariadb-init/Chart.yaml +++ b/kubernetes/common/mariadb-init/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: Chart for MariaDB Galera init job name: mariadb-init -version: 13.0.5 +version: 16.0.0 dependencies: - name: common diff --git a/kubernetes/common/mariadb-init/resources/config/db_init.sh b/kubernetes/common/mariadb-init/resources/config/db_init.sh index 8f7e7ce44b..f55da7a3a8 100755 --- a/kubernetes/common/mariadb-init/resources/config/db_init.sh +++ b/kubernetes/common/mariadb-init/resources/config/db_init.sh @@ -36,9 +36,9 @@ while read DB ; do echo "Creating database ${DB} and user ${USER}..." - mysql $MYSQL_OPTS -e "CREATE OR REPLACE USER '${USER}'@'%' IDENTIFIED BY '${PASS}'" - mysql $MYSQL_OPTS -e "CREATE DATABASE IF NOT EXISTS ${DB}" - mysql $MYSQL_OPTS -e "GRANT ALL PRIVILEGES ON ${DB}.* TO '${USER}'@'%'" + mariadb $MYSQL_OPTS -e "CREATE OR REPLACE USER '${USER}'@'%' IDENTIFIED BY '${PASS}'" + mariadb $MYSQL_OPTS -e "CREATE DATABASE IF NOT EXISTS ${DB}" + mariadb $MYSQL_OPTS -e "GRANT ALL PRIVILEGES ON ${DB}.* TO '${USER}'@'%'" echo "Created database ${DB} and user ${USER}." done </tmp/mariadb-camundabpmn.log 2>&1 -mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 DROP DATABASE IF EXISTS camundabpmn; CREATE DATABASE camundabpmn; DROP USER IF EXISTS '${CAMUNDA_DB_USER}'; @@ -37,7 +37,7 @@ EOF cd /docker-entrypoint-initdb.d/db-sql-scripts -mysql -uroot -p$MYSQL_ROOT_PASSWORD -f < mariadb_engine_7.14.0.sql || exit 1 -mysql -uroot -p$MYSQL_ROOT_PASSWORD -f < mariadb_identity_7.14.0.sql || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD -f < mariadb_engine_7.14.0.sql || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD -f < mariadb_identity_7.14.0.sql || exit 1 echo "Created camundabpmn database . . ." 1>>/tmp/mariadb-camundabpmn.log 2>&1 diff --git a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/02-create-requestdb.sh b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/02-create-requestdb.sh index 4c2d668af7..ae9a23d734 100755 --- a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/02-create-requestdb.sh +++ b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/02-create-requestdb.sh @@ -25,7 +25,7 @@ echo "Creating requestdb database . . ." 1>/tmp/mariadb-requestdb.log 2>&1 -mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 DROP DATABASE IF EXISTS requestdb; CREATE DATABASE /*!32312 IF NOT EXISTS*/ requestdb /*!40100 DEFAULT CHARACTER SET latin1 */; DROP USER IF EXISTS '${REQUEST_DB_USER}'; diff --git a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/03-create-catalogdb.sh b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/03-create-catalogdb.sh index dd374d440b..2f2aec89d9 100755 --- a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/03-create-catalogdb.sh +++ b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/03-create-catalogdb.sh @@ -25,7 +25,7 @@ echo "Creating catalogdb database . . ." 1>/tmp/mariadb-catalogdb.log 2>&1 -mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 DROP DATABASE IF EXISTS catalogdb; CREATE DATABASE /*!32312 IF NOT EXISTS*/ catalogdb /*!40100 DEFAULT CHARACTER SET latin1 */; DROP USER IF EXISTS '${CATALOG_DB_USER}'; diff --git a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/04-create-nfvo-db.sh b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/04-create-nfvo-db.sh index db6fd22eaf..410be6ce7b 100755 --- a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/04-create-nfvo-db.sh +++ b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/04-create-nfvo-db.sh @@ -28,7 +28,7 @@ prepare_password() NFVO_DB_PASSWORD=`prepare_password $NFVO_DB_PASSWORD` -mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 CREATE DATABASE /*!32312 IF NOT EXISTS*/ nfvo /*!40100 DEFAULT CHARACTER SET latin1 */; DROP USER IF EXISTS '${NFVO_DB_USER}'; CREATE USER '${NFVO_DB_USER}'; diff --git a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/05-create-cnfm-db.sh b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/05-create-cnfm-db.sh index cb343bc954..84ff14d5e0 100644 --- a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/05-create-cnfm-db.sh +++ b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/05-create-cnfm-db.sh @@ -28,7 +28,7 @@ prepare_password() CNFM_DB_PASSWORD=`prepare_password $CNFM_DB_PASSWORD` -mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 CREATE DATABASE /*!32312 IF NOT EXISTS*/ cnfm /*!40100 DEFAULT CHARACTER SET latin1 */; DROP USER IF EXISTS '${CNFM_DB_USER}'; CREATE USER '${CNFM_DB_USER}'; diff --git a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/98-create-so-user.sh b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/98-create-so-user.sh index bf8ae781c0..8086dd67e9 100755 --- a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/98-create-so-user.sh +++ b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/98-create-so-user.sh @@ -33,7 +33,7 @@ prepare_password() DB_PASSWORD=`prepare_password $DB_PASSWORD` -mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 DROP USER IF EXISTS '${DB_USER}'; CREATE USER '${DB_USER}'; GRANT USAGE ON *.* TO '${DB_USER}'@'%' IDENTIFIED BY '${DB_PASSWORD}'; diff --git a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh index 74b869cd54..d4ffb1f997 100755 --- a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh +++ b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh @@ -33,7 +33,7 @@ prepare_password() DB_ADMIN_PASSWORD=`prepare_password $DB_ADMIN_PASSWORD` -mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 +mysqlcmd -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1 DROP USER IF EXISTS '${DB_ADMIN}'; CREATE USER '${DB_ADMIN}'; GRANT USAGE ON *.* TO '${DB_ADMIN}'@'%' IDENTIFIED BY '${DB_ADMIN_PASSWORD}'; diff --git a/kubernetes/so/components/so-mariadb/templates/job.yaml b/kubernetes/so/components/so-mariadb/templates/job.yaml index c075c6922a..d87faf9671 100644 --- a/kubernetes/so/components/so-mariadb/templates/job.yaml +++ b/kubernetes/so/components/so-mariadb/templates/job.yaml @@ -95,7 +95,7 @@ spec: initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }} containers: - name: {{ include "common.name" . }}-config - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} + image: {{ include "repositoryGenerator.image.mariadb" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /bin/bash @@ -103,12 +103,12 @@ spec: - > {{- if include "common.onServiceMesh" . }} echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }} - mysql() { /usr/bin/mysql -h ${DB_HOST} -P ${DB_PORT} "$@"; }; - export -f mysql; - mysql --user=root --password=${MYSQL_ROOT_PASSWORD} requestdb -e exit > /dev/null 2>&1 {{ if not .Values.global.migration.enabled }} && echo "Database already initialized!!!" && exit 0 {{ end }}; - for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f"; echo ;; *.sql.gz) echo "$0: running $f"; gunzip -c "$f" | "${mysql[@]}"; echo ;; *) echo "$0: ignoring $f" ;; esac; echo; done; + mysqlcmd() { mariadb -h ${DB_HOST} -P ${DB_PORT} "$@"; }; + export -f mysqlcmd; + mysqlcmd --user=root --password=${MYSQL_ROOT_PASSWORD} requestdb -e exit > /dev/null 2>&1 {{ if not .Values.global.migration.enabled }} && echo "Database already initialized!!!" && exit 0 {{ end }}; + for f in /docker-entrypoint-initdb.d/*; do case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; *.sql) echo "$0: running $f"; "${mysqlcmd[@]}" < "$f"; echo ;; *.sql.gz) echo "$0: running $f"; gunzip -c "$f" | "${mysqlcmd[@]}"; echo ;; *) echo "$0: ignoring $f" ;; esac; echo; done; {{- if .Values.global.migration.enabled }} - mysql -vv --user=root --password=${MYSQL_ROOT_PASSWORD} < `ls -tr /var/data/mariadb/* | tail -1`; + mysqlcmd -vv --user=root --password=${MYSQL_ROOT_PASSWORD} < `ls -tr /var/data/mariadb/* | tail -1`; {{- end }} env: - name: DB_HOST diff --git a/kubernetes/so/components/so-mariadb/values.yaml b/kubernetes/so/components/so-mariadb/values.yaml index d084b393be..a2cf93c71d 100755 --- a/kubernetes/so/components/so-mariadb/values.yaml +++ b/kubernetes/so/components/so-mariadb/values.yaml @@ -22,7 +22,7 @@ global: nodePortPrefix: 302 nodePortPrefixExt: 304 repository: nexus3.onap.org:10001 - readinessImage: onap/oom/readiness:6.1.2 + readinessImage: onap/oom/readiness:6.2.0 ubuntuInitRepository: docker.io mariadbGalera: # flag to enable the DB creation via mariadb-operator @@ -97,11 +97,7 @@ secrets: ################################################################# # Application configuration defaults. ################################################################# -# application image -repository: nexus3.onap.org:10001 -image: mariadb:10.1.38 pullPolicy: Always -ubuntuInitImage: oomk8s/ubuntu-init:2.0.0 # Local mariadb galera instance default name mariadb-galera: