From a62df40c167d9c5de682cdd5a16ac4f8bf361590 Mon Sep 17 00:00:00 2001 From: amandilaras Date: Mon, 13 May 2024 17:24:08 +0300 Subject: [PATCH] more deployment updates --- deployment/deploy_opencdmp.sh | 45 ++++++++++++++++--- .../opencdmp/backend/config/metrics-test.yml | 1 - deployment/opencdmp/backend/i18n/en.json | 7 ++- .../notification/config/notification-test.yml | 2 +- 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/deployment/deploy_opencdmp.sh b/deployment/deploy_opencdmp.sh index fa9d9bd51..dc2c90e90 100644 --- a/deployment/deploy_opencdmp.sh +++ b/deployment/deploy_opencdmp.sh @@ -1,12 +1,42 @@ #!/bin/bash set -e +networks=("opencdmp-elastic-shared-network" "opencdmp-gotenberg-shared-network" "opencdmp-keycloak-shared-network" "opencdmp-postgres-shared-network" "opencdmp-rabbitmq-shared-network") + +network_exists() { + local name="$1" + docker network inspect "$name" >/dev/null 2>&1 +} + +for network in "${networks[@]}"; do + if ! network_exists "$network"; then + echo "Creating network: $network" + docker network create "$network" + if [ $? -eq 0 ]; then + echo "Network $network created successfully." + else + echo "Failed to create network $network." + fi + else + echo "Network $network already exists." + fi +done + docker-compose down -sudo rm -r ./storage/postgres/data -mkdir ./storage/postgres/data +chmod 744 ./elk/elasticsearch/index_init.sh -sudo rm -r ./storage/elasticsearch -mkdir ./storage/elasticsearch +recreate_directories() { + echo "Resetting postgres and elasticsearch..." + sudo rm -rf ./storage/postgres/data + mkdir -p ./storage/postgres/data + + sudo rm -rf ./storage/elasticsearch + mkdir -p ./storage/elasticsearch +} + +if [[ $1 == "-r" ]]; then + recreate_directories +fi docker-compose up -d opencdmp.elasticsearch @@ -32,8 +62,9 @@ function loading_icon() { loading_icon 45 "Waiting for Elasticsearch to Startup!" -docker exec opencdmp.elasticsearch /usr/share/elasticsearch/config/index_init.sh - +if [[ $1 == "-r" ]]; then + docker exec opencdmp.elasticsearch /usr/share/elasticsearch/config/index_init.sh +fi docker restart opencdmp.elasticsearch docker-compose up -d opencdmp.postgres @@ -44,4 +75,4 @@ docker-compose up -d opencdmp.keycloak loading_icon 60 "Waiting for Keycloak to Startup!" -docker-compose up -d \ No newline at end of file +docker-compose up -d diff --git a/deployment/opencdmp/backend/config/metrics-test.yml b/deployment/opencdmp/backend/config/metrics-test.yml index 7e3e1eb81..7a3b0b44b 100644 --- a/deployment/opencdmp/backend/config/metrics-test.yml +++ b/deployment/opencdmp/backend/config/metrics-test.yml @@ -3,7 +3,6 @@ metrics: enable: true intervalSeconds: 600 nexusDate: "2021-01-01T00:00:00.00Z" - usersLoginClient: ${IDP_APIKEY_CLIENT_ID_UUID} referenceTypes: funderIds: ["538928bb-c7c6-452e-b66d-08e539f5f082"] grantIds: ["5b9c284f-f041-4995-96cc-fad7ad13289c"] diff --git a/deployment/opencdmp/backend/i18n/en.json b/deployment/opencdmp/backend/i18n/en.json index 4cba28036..8f50accb6 100644 --- a/deployment/opencdmp/backend/i18n/en.json +++ b/deployment/opencdmp/backend/i18n/en.json @@ -348,7 +348,7 @@ "LANGUAGE": "Language", "PRIMARY-COLOR": "Primary Color", "PRIMARY-COLOR-2": "Primary Color 2", - "PRIMARY-COLOR-3": "Primary Color 2", + "PRIMARY-COLOR-3": "Primary Color 3", "SECONDARY-COLOR": "Secondary Color", "DISABLE-SYSTEM-SOURCES": "Disable System Sources", "DEPOSIT-PLUGINS": "Plugin", @@ -739,7 +739,10 @@ "TITLE": "Description is locked", "MESSAGE": "Somebody else is modifying the description at this moment. If you would like to modify or view it, please come back later." }, - "FINALISE-POPUP": {} + "FINALISE-POPUP": {}, + "ROLES": { + "ALL-SECTIONS": "All Sections" + } }, "DESCRIPTION-LISTING": { "TITLE": "My Descriptions", diff --git a/deployment/opencdmp/notification/config/notification-test.yml b/deployment/opencdmp/notification/config/notification-test.yml index c140a01d2..3e530cc4b 100644 --- a/deployment/opencdmp/notification/config/notification-test.yml +++ b/deployment/opencdmp/notification/config/notification-test.yml @@ -11,7 +11,7 @@ notification: contacts: [ email ] - #dmpInvitationExistingUser type: 4904dea2-5079-46d3-83be-3a19c9ab45dc - contacts: [ inapp, email ] + contacts: [ email, inapp ] - #dpmModified type: 4542262A-22F8-4BAA-9DB6-1C8E70AC1DBB contacts: [ inapp, email ]