diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 873c6fc9..dc7f4d5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -268,7 +268,7 @@ db-cleanup: - export FILES=(${CI_PROJECT_DIR}/helmfile/environments/default/database.yaml.gotmpl ${CI_PROJECT_DIR}/helmfile/environments/dev/write-over-values-for-environment.yaml.gotmpl) # Cleanup MariaDB - | - export DATABASES="nextcloud oxAppSuite xwiki" + export DATABASES="oxAppSuite" export MARIADB_HOST="" export MARIADB_PORT="" export MARIADB_USERNAME="" @@ -314,7 +314,7 @@ db-cleanup: done; # Cleanup PostgreSQL - | - export DATABASES="keycloak keycloakExtension notes openproject synapse umsGuardianManagementApi umsNotificationsApi umsSelfservice" + export DATABASES="keycloak keycloakExtension nextcloud notes openproject synapse umsGuardianManagementApi umsNotificationsApi umsSelfservice xwiki" export PGDATABASE="postgres" export PGHOST="" export PGPORT="" @@ -356,7 +356,7 @@ db-cleanup: export AWS_ENDPOINT="" export AWS_ACCESS_KEY_ID="" export AWS_SECRET_ACCESS_KEY="" - + for BUCKET in $BUCKETS; do export ENV_BUCKET=${BUCKET} diff --git a/docs/migrations.md b/docs/migrations.md index 2c652fac..c4599957 100644 --- a/docs/migrations.md +++ b/docs/migrations.md @@ -89,6 +89,46 @@ When interested in more details about the automated migrations, please read sect Be sure you check all the sections for the releases your are going to update your current deployment from. +## From v1.1.2 + +#### Helmfile new default: PostgreSQL for XWiki and Nextcloud + +openDesk now uses PostgreSQL as default database backend for Nextcloud and XWiki. + +When upgrading existing instances you likely want to keep the current database backend (MariaDB). Please follow the instructions below. + +**If you use your own external database services**, you just have to add the new `type` attribute and set it to `mariadb`: + +```yaml +databases: + nextcloud: + type: "mariadb" + xwiki: + type: "mariadb" +``` + +**If you use the openDesk supplied database services**, ensure you set the following attributes before upgrading, this includes the aforementioned `type` attribute. + +```yaml +databases: + nextcloud: + type: "mariadb" + host: "mariadb" + port: 3306 + xwiki: + type: "mariadb" + host: "mariadb" + port: 3306 + username: "root" +``` + +In case you are planning to migrate an existing instance from MariaDB to PostgreSQL please check the upstream documentation for details: + +- Nextcloud database migration: https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/db_conversion.html +- XWiki: + - https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Backup#HUsingtheXWikiExportfeature + - https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/ImportExport + ## From v1.1.1 ### Pre-upgrade from v1.1.1 diff --git a/helmfile/environments/default/database.yaml.gotmpl b/helmfile/environments/default/database.yaml.gotmpl index 2b192eab..fa569e2c 100644 --- a/helmfile/environments/default/database.yaml.gotmpl +++ b/helmfile/environments/default/database.yaml.gotmpl @@ -40,11 +40,10 @@ databases: password: "" connectionLimit: ~ nextcloud: - # Nextcloud itself also supports `postgresql` or `oci` - type: "mariadb" + type: "postgresql" name: "nextcloud" - host: "mariadb" - port: 3306 + host: "postgresql" + port: 5432 username: "nextcloud_user" password: "" connectionLimit: ~ @@ -125,12 +124,11 @@ databases: password: "" connectionLimit: 10 xwiki: - # XWiki itself also supports `postgresql` - type: "mariadb" + type: "postgresql" name: "xwiki" - host: "mariadb" - port: 3306 - username: "root" + host: "postgresql" + port: 5432 + username: "xwiki_user" password: "" connectionLimit: ~ ...