From be3b3c80c2ea90dc22b9e9d60154c800dba5d6da Mon Sep 17 00:00:00 2001 From: Slavek Licehammer Date: Thu, 13 May 2021 19:34:03 +0200 Subject: [PATCH] Upgrade to postgreSQL and midPoint 4.3.2-SNAPSHOT --- Dockerfile | 6 +- demo/grouper/.env | 6 +- .../application/database_password.txt | 2 +- .../application/keystore_password.txt | 2 +- demo/grouper/docker-compose.yml | 19 ++--- .../resources/100-grouper.xml | 2 +- .../010-system-configuration.xml | 72 ++++++++++++++++--- demo/shibboleth/.env | 7 +- .../application/database_password.txt | 2 +- .../application/keystore_password.txt | 2 +- demo/shibboleth/docker-compose-tests.yml | 22 +++--- demo/shibboleth/docker-compose.yml | 16 +++-- demo/simple/.env | 6 +- .../application/database_password.txt | 2 +- .../application/keystore_password.txt | 2 +- demo/simple/docker-compose.yml | 15 ++-- demo/simple/tests/main.bats | 4 +- download-midpoint.sh | 2 +- 18 files changed, 123 insertions(+), 66 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b8a5c5..6c8565c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,12 +64,12 @@ RUN echo 'Extracting midPoint archive...' \ # Repository parameters -ENV REPO_DATABASE_TYPE mariadb +ENV REPO_DATABASE_TYPE postgresql ENV REPO_JDBC_URL default ENV REPO_HOST midpoint_data ENV REPO_PORT default -ENV REPO_DATABASE registry -ENV REPO_USER registry_user +ENV REPO_DATABASE midpoint +ENV REPO_USER midpoint ENV REPO_PASSWORD_FILE /run/secrets/mp_database_password.txt ENV REPO_MISSING_SCHEMA_ACTION create ENV REPO_UPGRADEABLE_SCHEMA_ACTION stop diff --git a/demo/grouper/.env b/demo/grouper/.env index 6cca1f1..5dbfdcd 100644 --- a/demo/grouper/.env +++ b/demo/grouper/.env @@ -1,10 +1,10 @@ ENV=demo -REPO_DATABASE_TYPE=mariadb +REPO_DATABASE_TYPE=postgresql REPO_JDBC_URL=default REPO_HOST=midpoint_data REPO_PORT=default -REPO_DATABASE=registry -REPO_USER=registry_user +REPO_DATABASE=midpoint +REPO_USER=midpoint REPO_MISSING_SCHEMA_ACTION=create REPO_UPGRADEABLE_SCHEMA_ACTION=stop MP_MEM_MAX=2048m diff --git a/demo/grouper/configs-and-secrets/midpoint/application/database_password.txt b/demo/grouper/configs-and-secrets/midpoint/application/database_password.txt index 11bff19..0037494 100644 --- a/demo/grouper/configs-and-secrets/midpoint/application/database_password.txt +++ b/demo/grouper/configs-and-secrets/midpoint/application/database_password.txt @@ -1 +1 @@ -WJzesbe3poNZ91qIbmR7 +WJzesbe3poNZ91qIbmR7 \ No newline at end of file diff --git a/demo/grouper/configs-and-secrets/midpoint/application/keystore_password.txt b/demo/grouper/configs-and-secrets/midpoint/application/keystore_password.txt index 1d40192..5bbaf87 100644 --- a/demo/grouper/configs-and-secrets/midpoint/application/keystore_password.txt +++ b/demo/grouper/configs-and-secrets/midpoint/application/keystore_password.txt @@ -1 +1 @@ -changeit +changeit \ No newline at end of file diff --git a/demo/grouper/docker-compose.yml b/demo/grouper/docker-compose.yml index 83071fc..9e1e724 100644 --- a/demo/grouper/docker-compose.yml +++ b/demo/grouper/docker-compose.yml @@ -173,18 +173,19 @@ services: - CREATE_NEW_DATABASE=if_needed midpoint_data: - image: tier/mariadb:mariadb10 + image: postgres:11 + environment: + - POSTGRES_PASSWORD_FILE=/run/secrets/mp_database_password.txt + - POSTGRES_USER=midpoint + - POSTGRES_INITDB_ARGS=--lc-collate=en_US.utf8 --lc-ctype=en_US.utf8 ports: - - 33306:3306 + - 5432:5432 networks: - net: - aliases: - - midpoint-data + - net + secrets: + - mp_database_password.txt volumes: - - midpoint_mysql:/var/lib/mysql - - midpoint_data:/var/lib/mysqlmounted - environment: - - CREATE_NEW_DATABASE=if_needed + - midpoint_data:/var/lib/postgresql/data midpoint_server: build: ./midpoint_server/ diff --git a/demo/grouper/midpoint_server/container_files/mp-home/post-initial-objects/resources/100-grouper.xml b/demo/grouper/midpoint_server/container_files/mp-home/post-initial-objects/resources/100-grouper.xml index 74fd191..af60e56 100644 --- a/demo/grouper/midpoint_server/container_files/mp-home/post-initial-objects/resources/100-grouper.xml +++ b/demo/grouper/midpoint_server/container_files/mp-home/post-initial-objects/resources/100-grouper.xml @@ -14,7 +14,7 @@ xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3" xmlns:rest="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-grouper-rest/com.evolveum.polygon.connector.grouper.rest.GrouperConnector" - xmlns:conf="http://midpoint.evolveum.com/xml/ns/public/connector/builtin-1/bundle/com.evolveum.midpoint.provisioning.ucf.impl.builtin.async/AsyncUpdateConnector" + xmlns:conf="http://midpoint.evolveum.com/xml/ns/public/connector/builtin-1/bundle/com.evolveum.midpoint.provisioning.ucf.impl.builtin.async.update/AsyncUpdateConnector" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> diff --git a/demo/grouper/midpoint_server/container_files/mp-home/post-initial-objects/systemConfigurations/010-system-configuration.xml b/demo/grouper/midpoint_server/container_files/mp-home/post-initial-objects/systemConfigurations/010-system-configuration.xml index cfe767f..189ab40 100644 --- a/demo/grouper/midpoint_server/container_files/mp-home/post-initial-objects/systemConfigurations/010-system-configuration.xml +++ b/demo/grouper/midpoint_server/container_files/mp-home/post-initial-objects/systemConfigurations/010-system-configuration.xml @@ -26,6 +26,12 @@ ERROR ro.isdc.wro.extensions.processor.css.Less4jProcessor + + + OFF + org.springframework.security.web.DefaultSecurityFilterChain + @@ -47,7 +53,7 @@ WARN org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl - + OFF org.hibernate.internal.ExceptionMapperStandardImpl @@ -246,8 +252,8 @@ /self/profile - - View/edit your profile + + PageSelfDashboard.profile.description fa fa-user @@ -257,8 +263,8 @@ /self/credentials - - View/edit your credentials + + PageSelfDashboard.credentials.description fa fa-shield @@ -268,7 +274,7 @@ /admin/users - + fa fa-users @@ -277,7 +283,7 @@ /admin/resources - + fa fa-database @@ -290,7 +296,12 @@ - My cases + + My cases + + MyCases.title + + My case fe fe-case-object @@ -308,7 +319,12 @@ - All manual cases + + All manual cases + + AllManualCases.title + + Manual case Manual provisioning cases @@ -324,7 +340,12 @@ - All requests + + All requests + + AllRequests.title + + Request Operation requests @@ -340,7 +361,12 @@ - All approvals + + All approvals + + AllApprovals.title + + Approval Approval cases @@ -455,6 +481,20 @@ + + dashboard-reports-view + ReportType + + + + + + collection-reports-view + ReportType + + + + @@ -485,6 +525,9 @@ executionStatus + + schedulingState + node @@ -518,6 +561,9 @@ stateBeforeSuspend + + schedulingStateBeforeSuspend + category @@ -563,6 +609,10 @@ true + + admin-dashboard + + never diff --git a/demo/shibboleth/.env b/demo/shibboleth/.env index 9f71d51..01d5c83 100644 --- a/demo/shibboleth/.env +++ b/demo/shibboleth/.env @@ -1,15 +1,14 @@ # These parameters can be overridden by setting environment variables before calling docker-compose up ENV=demo USERTOKEN= -REPO_DATABASE_TYPE=mariadb +REPO_DATABASE_TYPE=postgresql REPO_JDBC_URL=default REPO_HOST=midpoint_data REPO_PORT=default -REPO_DATABASE=registry -REPO_USER=registry_user +REPO_DATABASE=midpoint +REPO_USER=midpoint REPO_MISSING_SCHEMA_ACTION=create REPO_UPGRADEABLE_SCHEMA_ACTION=stop MP_MEM_MAX=2048m MP_MEM_INIT=1024m TIMEZONE=UTC - diff --git a/demo/shibboleth/configs-and-secrets/midpoint/application/database_password.txt b/demo/shibboleth/configs-and-secrets/midpoint/application/database_password.txt index 11bff19..0037494 100644 --- a/demo/shibboleth/configs-and-secrets/midpoint/application/database_password.txt +++ b/demo/shibboleth/configs-and-secrets/midpoint/application/database_password.txt @@ -1 +1 @@ -WJzesbe3poNZ91qIbmR7 +WJzesbe3poNZ91qIbmR7 \ No newline at end of file diff --git a/demo/shibboleth/configs-and-secrets/midpoint/application/keystore_password.txt b/demo/shibboleth/configs-and-secrets/midpoint/application/keystore_password.txt index 1d40192..5bbaf87 100644 --- a/demo/shibboleth/configs-and-secrets/midpoint/application/keystore_password.txt +++ b/demo/shibboleth/configs-and-secrets/midpoint/application/keystore_password.txt @@ -1 +1 @@ -changeit +changeit \ No newline at end of file diff --git a/demo/shibboleth/docker-compose-tests.yml b/demo/shibboleth/docker-compose-tests.yml index 25a28a4..682d69a 100644 --- a/demo/shibboleth/docker-compose-tests.yml +++ b/demo/shibboleth/docker-compose-tests.yml @@ -4,18 +4,20 @@ version: "3.3" services: - midpoint_data: - image: tier/mariadb:mariadb10 - expose: - - 3306 + image: postgres:11 + environment: + - POSTGRES_PASSWORD_FILE=/run/secrets/mp_database_password.txt + - POSTGRES_USER=midpoint + - POSTGRES_INITDB_ARGS=--lc-collate=en_US.utf8 --lc-ctype=en_US.utf8 + ports: + - 5432:5432 networks: - net + secrets: + - mp_database_password.txt volumes: - - midpoint_mysql:/var/lib/mysql - - midpoint_data:/var/lib/mysqlmounted - environment: - - CREATE_NEW_DATABASE=if_needed + - midpoint_data:/var/lib/postgresql/data midpoint_server: build: ./midpoint_server/ @@ -75,8 +77,8 @@ services: directory: build: ./directory/ - expose: - - 389 + ports: + - 389:389 networks: - net volumes: diff --git a/demo/shibboleth/docker-compose.yml b/demo/shibboleth/docker-compose.yml index 3817e6b..ba05efc 100644 --- a/demo/shibboleth/docker-compose.yml +++ b/demo/shibboleth/docker-compose.yml @@ -1,18 +1,20 @@ version: "3.3" services: - midpoint_data: - image: tier/mariadb:mariadb10 + image: postgres:11 + environment: + - POSTGRES_PASSWORD_FILE=/run/secrets/mp_database_password.txt + - POSTGRES_USER=midpoint + - POSTGRES_INITDB_ARGS=--lc-collate=en_US.utf8 --lc-ctype=en_US.utf8 ports: - - 3306:3306 + - 5432:5432 networks: - net + secrets: + - mp_database_password.txt volumes: - - midpoint_mysql:/var/lib/mysql - - midpoint_data:/var/lib/mysqlmounted - environment: - - CREATE_NEW_DATABASE=if_needed + - midpoint_data:/var/lib/postgresql/data midpoint_server: build: ./midpoint_server/ diff --git a/demo/simple/.env b/demo/simple/.env index c4cb989..01d5c83 100644 --- a/demo/simple/.env +++ b/demo/simple/.env @@ -1,12 +1,12 @@ # These parameters can be overridden by setting environment variables before calling docker-compose up ENV=demo USERTOKEN= -REPO_DATABASE_TYPE=mariadb +REPO_DATABASE_TYPE=postgresql REPO_JDBC_URL=default REPO_HOST=midpoint_data REPO_PORT=default -REPO_DATABASE=registry -REPO_USER=registry_user +REPO_DATABASE=midpoint +REPO_USER=midpoint REPO_MISSING_SCHEMA_ACTION=create REPO_UPGRADEABLE_SCHEMA_ACTION=stop MP_MEM_MAX=2048m diff --git a/demo/simple/configs-and-secrets/midpoint/application/database_password.txt b/demo/simple/configs-and-secrets/midpoint/application/database_password.txt index 11bff19..0037494 100644 --- a/demo/simple/configs-and-secrets/midpoint/application/database_password.txt +++ b/demo/simple/configs-and-secrets/midpoint/application/database_password.txt @@ -1 +1 @@ -WJzesbe3poNZ91qIbmR7 +WJzesbe3poNZ91qIbmR7 \ No newline at end of file diff --git a/demo/simple/configs-and-secrets/midpoint/application/keystore_password.txt b/demo/simple/configs-and-secrets/midpoint/application/keystore_password.txt index 1d40192..5bbaf87 100644 --- a/demo/simple/configs-and-secrets/midpoint/application/keystore_password.txt +++ b/demo/simple/configs-and-secrets/midpoint/application/keystore_password.txt @@ -1 +1 @@ -changeit +changeit \ No newline at end of file diff --git a/demo/simple/docker-compose.yml b/demo/simple/docker-compose.yml index c098dae..8f4766e 100644 --- a/demo/simple/docker-compose.yml +++ b/demo/simple/docker-compose.yml @@ -2,16 +2,19 @@ version: "3.3" services: midpoint_data: - image: tier/mariadb:mariadb10 + image: postgres:11 + environment: + - POSTGRES_PASSWORD_FILE=/run/secrets/mp_database_password.txt + - POSTGRES_USER=midpoint + - POSTGRES_INITDB_ARGS=--lc-collate=en_US.utf8 --lc-ctype=en_US.utf8 ports: - - 3306:3306 + - 5432:5432 networks: - net + secrets: + - mp_database_password.txt volumes: - - midpoint_mysql:/var/lib/mysql - - midpoint_data:/var/lib/mysqlmounted - environment: - - CREATE_NEW_DATABASE=if_needed + - midpoint_data:/var/lib/postgresql/data midpoint_server: image: tier/midpoint:latest diff --git a/demo/simple/tests/main.bats b/demo/simple/tests/main.bats index 0aae1fa..cc06ca6 100755 --- a/demo/simple/tests/main.bats +++ b/demo/simple/tests/main.bats @@ -52,7 +52,7 @@ load ../../../library @test "350 Test DB schema version check" { echo "Removing version information from m_global_metadata" - docker exec simple_midpoint_data_1 mysql -p123321 registry -e "drop table m_global_metadata" + docker exec simple_midpoint_data_1 psql midpoint midpoint -c "drop table m_global_metadata" echo "Bringing the containers down" docker-compose down @@ -64,7 +64,7 @@ load ../../../library } @test "360 Test DB schema upgrade" { - skip 'Not supported for 4.0-SNAPSHOT' + skip 'Not supported for 4.3.2-SNAPSHOT' echo "Stopping midpoint_server container" docker stop simple_midpoint_server_1 diff --git a/download-midpoint.sh b/download-midpoint.sh index 5964c16..a418ee4 100755 --- a/download-midpoint.sh +++ b/download-midpoint.sh @@ -10,7 +10,7 @@ else # But if we need to incorporate interim changes to I2 distribution during # midPoint development cycle, we can specify concrete file from "midpoint-tier" # download directory by using its name (like "latest-stable"). - MP_VERSION="4.2" + MP_VERSION="4.3.2-SNAPSHOT" else MP_VERSION=$tag fi