From e6eb5ecd9919fb2690796aa628360ffad7e7efb8 Mon Sep 17 00:00:00 2001 From: Brett Onions Date: Wed, 17 Apr 2024 09:10:11 +0200 Subject: [PATCH 01/11] Update docker-compose files and package metadata --- .../docker-compose-postgres.cluster.yml | 21 +++++++++---------- .../docker-compose-postgres.yml | 4 ++-- .../docker-compose.yml | 8 +++---- .../package-metadata.json | 8 +++++++ 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/identity-access-manager-keycloak/docker-compose-postgres.cluster.yml b/identity-access-manager-keycloak/docker-compose-postgres.cluster.yml index a6ec7061..4be183d9 100644 --- a/identity-access-manager-keycloak/docker-compose-postgres.cluster.yml +++ b/identity-access-manager-keycloak/docker-compose-postgres.cluster.yml @@ -1,4 +1,4 @@ -version: '3.9' +version: "3.9" services: keycloak-postgres-1: @@ -7,10 +7,10 @@ services: deploy: placement: constraints: - - "node.labels.name==node-1" + - "node.labels.name==${KEYCLOAK_POSTGRES_1}" keycloak-postgres-2: - image: bitnami/postgresql-repmgr:14 + image: ${POSTGRES_IMAGE} environment: POSTGRESQL_PASSWORD: ${KC_POSTGRESQL_PASSWORD} POSTGRESQL_USERNAME: ${KC_POSTGRESQL_USERNAME} @@ -22,12 +22,12 @@ services: REPMGR_PRIMARY_HOST: ${KC_REPMGR_PRIMARY_HOST} REPMGR_PARTNER_NODES: ${KC_REPMGR_PARTNER_NODES} volumes: - - 'keycloak-postgres-2-data:/bitnami/postgresql' + - "keycloak-postgres-2-data:/bitnami/postgresql" deploy: placement: constraints: - - "node.labels.name==node-2" - replicas: 1 + - "node.labels.name==${KEYCLOAK_POSTGRES_2}" + replicas: ${POSTGRES_REPLICAS} resources: limits: cpus: ${KC_POSTGRES_CPU_LIMIT} @@ -39,9 +39,8 @@ services: default: keycloak_backup_net: {} - keycloak-postgres-3: - image: bitnami/postgresql-repmgr:14 + image: ${POSTGRES_IMAGE} environment: POSTGRESQL_PASSWORD: ${KC_POSTGRESQL_PASSWORD} POSTGRESQL_USERNAME: ${KC_POSTGRESQL_USERNAME} @@ -53,12 +52,12 @@ services: REPMGR_PRIMARY_HOST: ${KC_REPMGR_PRIMARY_HOST} REPMGR_PARTNER_NODES: ${KC_REPMGR_PARTNER_NODES} volumes: - - 'keycloak-postgres-3-data:/bitnami/postgresql' + - "keycloak-postgres-3-data:/bitnami/postgresql" deploy: placement: constraints: - - "node.labels.name==node-3" - replicas: 1 + - "node.labels.name==${KEYCLOAK_POSTGRES_3}" + replicas: ${POSTGRES_REPLICAS} resources: limits: cpus: ${KC_POSTGRES_CPU_LIMIT} diff --git a/identity-access-manager-keycloak/docker-compose-postgres.yml b/identity-access-manager-keycloak/docker-compose-postgres.yml index 4a8f2279..4fa41d41 100644 --- a/identity-access-manager-keycloak/docker-compose-postgres.yml +++ b/identity-access-manager-keycloak/docker-compose-postgres.yml @@ -2,7 +2,7 @@ version: "3.9" services: keycloak-postgres-1: - image: bitnami/postgresql-repmgr:14 + image: ${POSTGRES_IMAGE} environment: POSTGRESQL_PASSWORD: ${KC_POSTGRESQL_PASSWORD} POSTGRESQL_USERNAME: ${KC_POSTGRESQL_USERNAME} @@ -17,7 +17,7 @@ services: volumes: - "keycloak-postgres-1-data:/bitnami/postgresql" deploy: - replicas: 1 + replicas: ${POSTGRES_REPLICAS} resources: limits: cpus: ${KC_POSTGRES_CPU_LIMIT} diff --git a/identity-access-manager-keycloak/docker-compose.yml b/identity-access-manager-keycloak/docker-compose.yml index fc5e4c28..22589738 100644 --- a/identity-access-manager-keycloak/docker-compose.yml +++ b/identity-access-manager-keycloak/docker-compose.yml @@ -1,14 +1,14 @@ -version: '3.9' +version: "3.9" services: identity-access-manager-keycloak: - image: keycloak/keycloak:20.0 + image: ${KEYCLOAK_IMAGE} command: [ "start", "--proxy=edge", "--hostname-url=${KC_FRONTEND_URL}", - "--import-realm" + "--import-realm", ] hostname: identity-access-manager-keycloak healthcheck: @@ -44,7 +44,7 @@ services: KC_OPENHIM_ROOT_URL: ${KC_OPENHIM_ROOT_URL} deploy: placement: - max_replicas_per_node: 1 + max_replicas_per_node: ${KEYCLOAK_MAX_REPLICAS_PER_NODE} networks: reverse-proxy: public: diff --git a/identity-access-manager-keycloak/package-metadata.json b/identity-access-manager-keycloak/package-metadata.json index 928ca89a..44071228 100644 --- a/identity-access-manager-keycloak/package-metadata.json +++ b/identity-access-manager-keycloak/package-metadata.json @@ -6,6 +6,14 @@ "version": "0.0.1", "dependencies": [], "environmentVariables": { + "POSTGRES_IMAGE": "bitnami/postgresql-repmgr:14", + "KEYCLOAK_POSTGRES_1": "node-1", + "KEYCLOAK_POSTGRES_2": "node-2", + "KEYCLOAK_POSTGRES_3": "node-3", + "POSTGRES_REPLICAS": "1", + "KEYCLOAK_IMAGE": "keycloak/keycloak:20.0", + "KEYCLOAK_REPLICAS": "1", + "KEYCLOAK_MAX_REPLICAS_PER_NODE": "1", "KEYCLOAK_ADMIN": "admin", "KEYCLOAK_ADMIN_PASSWORD": "dev_password_only", "KC_FRONTEND_URL": "http://localhost:9088", From 4340b7eba315083d7c0f8c36d3c5744aadc24739 Mon Sep 17 00:00:00 2001 From: Brett Onions Date: Thu, 18 Apr 2024 08:46:45 +0200 Subject: [PATCH 02/11] Update Docker Compose files and package metadata --- .../docker-compose-mongo.cluster.yml | 26 +++++++++---------- .../docker-compose-mongo.yml | 4 +-- .../docker-compose.await-helper-mongo.yml | 6 ++--- .../docker-compose.await-helper.yml | 6 ++--- .../docker-compose.yml | 10 +++---- .../package-metadata.json | 9 +++++++ 6 files changed, 35 insertions(+), 26 deletions(-) diff --git a/interoperability-layer-openhim/docker-compose-mongo.cluster.yml b/interoperability-layer-openhim/docker-compose-mongo.cluster.yml index 566ec6b5..79868fdf 100644 --- a/interoperability-layer-openhim/docker-compose-mongo.cluster.yml +++ b/interoperability-layer-openhim/docker-compose-mongo.cluster.yml @@ -1,23 +1,23 @@ -version: '3.9' +version: "3.9" services: mongo-1: - command: ['--replSet', 'mongo-set', '--wiredTigerCacheSizeGB', '0.5'] + command: ["--replSet", "mongo-set", "--wiredTigerCacheSizeGB", "0.5"] deploy: placement: constraints: - - "node.labels.name==node-1" + - "node.labels.name==${MONGO_1_PLACEMENT}" mongo-2: - image: mongo:4.2 + image: ${MONGO_IMAGE} volumes: - - 'openhim-mongo-02:/data/db' - - 'openhim-mongo-02-config:/data/configdb' - command: ['--replSet', 'mongo-set', '--wiredTigerCacheSizeGB', '0.5'] + - "openhim-mongo-02:/data/db" + - "openhim-mongo-02-config:/data/configdb" + command: ["--replSet", "mongo-set", "--wiredTigerCacheSizeGB", "0.5"] deploy: placement: constraints: - - "node.labels.name==node-2" + - "node.labels.name==${MONGO_2_PLACEMENT}" replicas: 1 resources: limits: @@ -32,15 +32,15 @@ services: mongo_backup_net: mongo-3: - image: mongo:4.2 + image: ${MONGO_IMAGE} volumes: - - 'openhim-mongo-03:/data/db' - - 'openhim-mongo-03-config:/data/configdb' - command: ['--replSet', 'mongo-set', '--wiredTigerCacheSizeGB', '0.5'] + - "openhim-mongo-03:/data/db" + - "openhim-mongo-03-config:/data/configdb" + command: ["--replSet", "mongo-set", "--wiredTigerCacheSizeGB", "0.5"] deploy: placement: constraints: - - "node.labels.name==node-3" + - "node.labels.name==${MONGO_3_PLACEMENT}" replicas: 1 resources: limits: diff --git a/interoperability-layer-openhim/docker-compose-mongo.yml b/interoperability-layer-openhim/docker-compose-mongo.yml index c67589f6..69117ee7 100644 --- a/interoperability-layer-openhim/docker-compose-mongo.yml +++ b/interoperability-layer-openhim/docker-compose-mongo.yml @@ -2,8 +2,8 @@ version: "3.9" services: mongo-1: - image: mongo:4.2 - command: ['--replSet', 'mongo-set', '--wiredTigerCacheSizeGB', '0.5'] + image: ${MONGO_IMAGE} + command: ["--replSet", "mongo-set", "--wiredTigerCacheSizeGB", "0.5"] volumes: - "openhim-mongo-01:/data/db" - "openhim-mongo-01-config:/data/configdb" diff --git a/interoperability-layer-openhim/docker-compose.await-helper-mongo.yml b/interoperability-layer-openhim/docker-compose.await-helper-mongo.yml index c02d4ffe..82729d17 100644 --- a/interoperability-layer-openhim/docker-compose.await-helper-mongo.yml +++ b/interoperability-layer-openhim/docker-compose.await-helper-mongo.yml @@ -1,10 +1,10 @@ -version: '3.9' +version: "3.9" services: await-helper: - image: jembi/await-helper:1.0.1 + image: ${AWAIT_HELPER_IMAGE} deploy: replicas: 1 restart_policy: condition: none - command: '-k http://mongo-1:27017' + command: "-k http://mongo-1:27017" diff --git a/interoperability-layer-openhim/docker-compose.await-helper.yml b/interoperability-layer-openhim/docker-compose.await-helper.yml index 8fe4c43e..9625820b 100644 --- a/interoperability-layer-openhim/docker-compose.await-helper.yml +++ b/interoperability-layer-openhim/docker-compose.await-helper.yml @@ -1,10 +1,10 @@ -version: '3.9' +version: "3.9" services: await-helper: - image: jembi/await-helper:1.0.1 + image: ${AWAIT_HELPER_IMAGE} deploy: replicas: 1 restart_policy: condition: none - command: '-k https://openhim-core:8080/heartbeat' + command: "-k https://openhim-core:8080/heartbeat" diff --git a/interoperability-layer-openhim/docker-compose.yml b/interoperability-layer-openhim/docker-compose.yml index 2a2073f3..778cc5e2 100644 --- a/interoperability-layer-openhim/docker-compose.yml +++ b/interoperability-layer-openhim/docker-compose.yml @@ -1,8 +1,8 @@ -version: '3.9' +version: "3.9" services: openhim-core: - image: jembi/openhim-core:v8.4.0 + image: ${OPENHIM_CORE_IMAGE} networks: kafka: hapi-fhir: @@ -25,7 +25,7 @@ services: deploy: replicas: ${OPENHIM_CORE_INSTANCES} placement: - max_replicas_per_node: 1 + max_replicas_per_node: ${OPENHIM_CORE_MAX_REPLICAS_PER_NODE} resources: limits: cpus: ${OPENHIM_CPU_LIMIT} @@ -39,7 +39,7 @@ services: - prometheus-port=8080 openhim-console: - image: jembi/openhim-console:v1.19.0 + image: ${OPENHIM_CONSOLE_IMAGE} environment: OPENHIM_CORE_MEDIATOR_HOSTNAME: ${OPENHIM_CORE_MEDIATOR_HOSTNAME} OPENHIM_MEDIATOR_API_PORT: ${OPENHIM_MEDIATOR_API_PORT} @@ -56,7 +56,7 @@ services: deploy: replicas: ${OPENHIM_CONSOLE_INSTANCES} placement: - max_replicas_per_node: 1 + max_replicas_per_node: ${OPENHIM_CONSOLE_MAX_REPLICAS_PER_NODE} resources: limits: cpus: ${OPENHIM_CONSOLE_CPU_LIMIT} diff --git a/interoperability-layer-openhim/package-metadata.json b/interoperability-layer-openhim/package-metadata.json index 3158f12f..09026554 100644 --- a/interoperability-layer-openhim/package-metadata.json +++ b/interoperability-layer-openhim/package-metadata.json @@ -6,9 +6,18 @@ "type": "infrastructure", "dependencies": [], "environmentVariables": { + "OPENHIM_CORE_IMAGE": "jembi/openhim-core:v8.4.0", + "OPENHIM_CONSOLE_IMAGE": "jembi/openhim-console:v1.19.0", + "MONGO_IMAGE": "mongo:4.2", + "AWAIT_HELPER_IMAGE": "jembi/await-helper:1.0.1", + "MONGO_1_PLACEMENT": "node-1", + "MONGO_2_PLACEMENT": "node-2", + "MONGO_3_PLACEMENT": "node-3", "MONGO_SET_COUNT": "1", "OPENHIM_CORE_INSTANCES": "1", + "OPENHIM_CORE_MAX_REPLICAS_PER_NODE": "1", "OPENHIM_CONSOLE_INSTANCES": "1", + "OPENHIM_CONSOLE_MAX_REPLICAS_PER_NODE": "1", "OPENHIM_CORE_MEDIATOR_HOSTNAME": "localhost", "OPENHIM_MEDIATOR_API_PORT": "8080", "OPENHIM_CPU_LIMIT": "0", From 6f3de82fabfa7a132d4f274c3736d507aef5f4f3 Mon Sep 17 00:00:00 2001 From: Brett Onions Date: Thu, 18 Apr 2024 08:48:50 +0200 Subject: [PATCH 03/11] Update job-scheduler-ofelia image and add JOB_SCHEDULER_OFELIA_IMAGE environment variable --- job-scheduler-ofelia/docker-compose.yml | 6 +++--- job-scheduler-ofelia/package-metadata.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/job-scheduler-ofelia/docker-compose.yml b/job-scheduler-ofelia/docker-compose.yml index 5cd0e3c8..00740f61 100644 --- a/job-scheduler-ofelia/docker-compose.yml +++ b/job-scheduler-ofelia/docker-compose.yml @@ -1,8 +1,8 @@ -version: '3.9' +version: "3.9" services: job-scheduler-ofelia: - image: mcuadros/ofelia:v0.3.6 + image: ${JOB_SCHEDULER_OFELIA_IMAGE} command: daemon --config=/tmp/config.ini configs: - target: /tmp/config.ini @@ -14,5 +14,5 @@ configs: ofelia-config.ini: file: ./config.ini name: ofelia-config.ini-${ofelia_config_ini_DIGEST:?err} - labels: + labels: name: ofelia diff --git a/job-scheduler-ofelia/package-metadata.json b/job-scheduler-ofelia/package-metadata.json index a4592a6d..719dffae 100644 --- a/job-scheduler-ofelia/package-metadata.json +++ b/job-scheduler-ofelia/package-metadata.json @@ -6,6 +6,7 @@ "version": "0.0.1", "dependencies": [], "environmentVariables": { + "JOB_SCHEDULER_OFELIA_IMAGE": "mcuadros/ofelia:v0.3.6", "RENEWAL_EMAIL": "dummy@jembi.org", "STAGING": "true", "DOMAIN_NAME": "localhost", From 57bf3609916380072833d920b7484cac70debab1 Mon Sep 17 00:00:00 2001 From: Brett Onions Date: Thu, 18 Apr 2024 10:52:32 +0200 Subject: [PATCH 04/11] Update docker-compose.yml and package-metadata.json --- openhim-mapping-mediator/docker-compose.yml | 4 ++-- openhim-mapping-mediator/package-metadata.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openhim-mapping-mediator/docker-compose.yml b/openhim-mapping-mediator/docker-compose.yml index cdfdd87b..3503fcf2 100644 --- a/openhim-mapping-mediator/docker-compose.yml +++ b/openhim-mapping-mediator/docker-compose.yml @@ -1,8 +1,8 @@ -version: '3.9' +version: "3.9" services: openhim-mapping-mediator: - image: jembi/openhim-mediator-mapping:v3.3.0 + image: ${OPENHIM_MAPPING_MEDIATOR_IMAGE} environment: OPENHIM_REGISTER: ${OPENHIM_REGISTER} MONGO_URL: ${OPENHIM_MONGO_URL} diff --git a/openhim-mapping-mediator/package-metadata.json b/openhim-mapping-mediator/package-metadata.json index 353515e5..f0b9cb0a 100644 --- a/openhim-mapping-mediator/package-metadata.json +++ b/openhim-mapping-mediator/package-metadata.json @@ -6,6 +6,7 @@ "version": "0.0.1", "dependencies": ["interoperability-layer-openhim"], "environmentVariables": { + "OPENHIM_MAPPING_MEDIATOR_IMAGE": "jembi/openhim-mediator-mapping:v3.3.0", "OPENHIM_URL": "https://openhim-core:8080", "OPENHIM_USERNAME": "root@openhim.org", "OPENHIM_MONGO_URL": "mongodb://mongo-1:27017/openhim", From e4e4780b3e5767d59841951cf9bf0e6afeb7540d Mon Sep 17 00:00:00 2001 From: Brett Onions Date: Wed, 8 May 2024 12:28:18 +0200 Subject: [PATCH 05/11] chore: update OPENHIM_CONSOLE_IMAGE to v1.18.2 in package-metadata.json --- interoperability-layer-openhim/package-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interoperability-layer-openhim/package-metadata.json b/interoperability-layer-openhim/package-metadata.json index e64e7bee..6825d8b4 100644 --- a/interoperability-layer-openhim/package-metadata.json +++ b/interoperability-layer-openhim/package-metadata.json @@ -7,7 +7,7 @@ "dependencies": [], "environmentVariables": { "OPENHIM_CORE_IMAGE": "jembi/openhim-core:v8.4.0", - "OPENHIM_CONSOLE_IMAGE": "jembi/openhim-console:v1.19.0", + "OPENHIM_CONSOLE_IMAGE": "jembi/openhim-console:v1.18.2", "MONGO_IMAGE": "mongo:4.2", "AWAIT_HELPER_IMAGE": "jembi/await-helper:1.0.1", "MONGO_1_PLACEMENT": "node-1", From 072e671ba427142e0d1a0da2abb47ccd56880d14 Mon Sep 17 00:00:00 2001 From: Brett Onions Date: Wed, 8 May 2024 13:33:11 +0200 Subject: [PATCH 06/11] responding to comments --- interoperability-layer-openhim/package-metadata.json | 1 - 1 file changed, 1 deletion(-) diff --git a/interoperability-layer-openhim/package-metadata.json b/interoperability-layer-openhim/package-metadata.json index 1f22c923..05bfa2f3 100644 --- a/interoperability-layer-openhim/package-metadata.json +++ b/interoperability-layer-openhim/package-metadata.json @@ -35,7 +35,6 @@ "OPENHIM_MONGO_MEMORY_RESERVE": "500M", "OPENHIM_MONGO_URL": "mongodb://mongo-1:27017/openhim", "OPENHIM_MONGO_ATNAURL": "mongodb://mongo-1:27017/openhim", - "OPENHIM_CONSOLE_VERSION": "jembi/openhim-console:microfrontend-poc", "KAFKA_HOSTS": "kafka-01:9092", "KC_REALM_NAME": "platform-realm", "KC_FRONTEND_URL": "http://localhost:9088", From 918c7f97c95212079ccd0bfa2c88cdac1114d16b Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Thu, 9 May 2024 15:03:54 +0200 Subject: [PATCH 07/11] fix breaking test --- test/cucumber/features/single-mode/recipe.feature | 1 - 1 file changed, 1 deletion(-) diff --git a/test/cucumber/features/single-mode/recipe.feature b/test/cucumber/features/single-mode/recipe.feature index 54a93c50..2de872d0 100644 --- a/test/cucumber/features/single-mode/recipe.feature +++ b/test/cucumber/features/single-mode/recipe.feature @@ -12,7 +12,6 @@ Scenario: Init the CDR recipe And The service "kafka-01" should be started with 1 replica And The service "kafdrop" should be started with 1 replica And The service "kafka-minion" should be started with 1 replica - And The service "keycloak-postgres-1" should be started with 1 replica And The service "identity-access-manager-keycloak" should be started with 1 replica And The service "jempi-ratel" should be started with 1 replica And The service "jempi-alpha-01" should be started with 1 replica From 909cc9e11df7c839598625889baf41a85f8a4a69 Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Thu, 9 May 2024 15:06:03 +0200 Subject: [PATCH 08/11] Clean Remove unused files --- .../docker-compose-postgres.cluster.yml | 74 ------------------- .../docker-compose-postgres.dev.yml | 8 -- .../docker-compose-postgres.yml | 40 ---------- 3 files changed, 122 deletions(-) delete mode 100644 identity-access-manager-keycloak/docker-compose-postgres.cluster.yml delete mode 100644 identity-access-manager-keycloak/docker-compose-postgres.dev.yml delete mode 100644 identity-access-manager-keycloak/docker-compose-postgres.yml diff --git a/identity-access-manager-keycloak/docker-compose-postgres.cluster.yml b/identity-access-manager-keycloak/docker-compose-postgres.cluster.yml deleted file mode 100644 index 4be183d9..00000000 --- a/identity-access-manager-keycloak/docker-compose-postgres.cluster.yml +++ /dev/null @@ -1,74 +0,0 @@ -version: "3.9" - -services: - keycloak-postgres-1: - environment: - REPMGR_PARTNER_NODES: ${KC_REPMGR_PARTNER_NODES} - deploy: - placement: - constraints: - - "node.labels.name==${KEYCLOAK_POSTGRES_1}" - - keycloak-postgres-2: - image: ${POSTGRES_IMAGE} - environment: - POSTGRESQL_PASSWORD: ${KC_POSTGRESQL_PASSWORD} - POSTGRESQL_USERNAME: ${KC_POSTGRESQL_USERNAME} - POSTGRESQL_DATABASE: ${KC_POSTGRESQL_DATABASE} - REPMGR_NODE_NETWORK_NAME: keycloak-postgres-2 - REPMGR_PASSWORD: ${KC_REPMGR_PASSWORD} - REPMGR_RECONNECT_INTERVAL: 3 - REPMGR_NODE_NAME: keycloak-postgres-2 - REPMGR_PRIMARY_HOST: ${KC_REPMGR_PRIMARY_HOST} - REPMGR_PARTNER_NODES: ${KC_REPMGR_PARTNER_NODES} - volumes: - - "keycloak-postgres-2-data:/bitnami/postgresql" - deploy: - placement: - constraints: - - "node.labels.name==${KEYCLOAK_POSTGRES_2}" - replicas: ${POSTGRES_REPLICAS} - resources: - limits: - cpus: ${KC_POSTGRES_CPU_LIMIT} - memory: ${KC_POSTGRES_MEMORY_LIMIT} - reservations: - cpus: ${KC_POSTGRES_CPU_RESERVE} - memory: ${KC_POSTGRES_MEMORY_RESERVE} - networks: - default: - keycloak_backup_net: {} - - keycloak-postgres-3: - image: ${POSTGRES_IMAGE} - environment: - POSTGRESQL_PASSWORD: ${KC_POSTGRESQL_PASSWORD} - POSTGRESQL_USERNAME: ${KC_POSTGRESQL_USERNAME} - POSTGRESQL_DATABASE: ${KC_POSTGRESQL_DATABASE} - REPMGR_NODE_NETWORK_NAME: keycloak-postgres-3 - REPMGR_PASSWORD: ${KC_REPMGR_PASSWORD} - REPMGR_RECONNECT_INTERVAL: 3 - REPMGR_NODE_NAME: keycloak-postgres-3 - REPMGR_PRIMARY_HOST: ${KC_REPMGR_PRIMARY_HOST} - REPMGR_PARTNER_NODES: ${KC_REPMGR_PARTNER_NODES} - volumes: - - "keycloak-postgres-3-data:/bitnami/postgresql" - deploy: - placement: - constraints: - - "node.labels.name==${KEYCLOAK_POSTGRES_3}" - replicas: ${POSTGRES_REPLICAS} - resources: - limits: - cpus: ${KC_POSTGRES_CPU_LIMIT} - memory: ${KC_POSTGRES_MEMORY_LIMIT} - reservations: - cpus: ${KC_POSTGRES_CPU_RESERVE} - memory: ${KC_POSTGRES_MEMORY_RESERVE} - networks: - default: - keycloak_backup_net: {} - -volumes: - keycloak-postgres-2-data: - keycloak-postgres-3-data: diff --git a/identity-access-manager-keycloak/docker-compose-postgres.dev.yml b/identity-access-manager-keycloak/docker-compose-postgres.dev.yml deleted file mode 100644 index 79e221ae..00000000 --- a/identity-access-manager-keycloak/docker-compose-postgres.dev.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '3.9' - -services: - keycloak-postgres-1: - ports: - - target: 5432 - published: 5434 - mode: host diff --git a/identity-access-manager-keycloak/docker-compose-postgres.yml b/identity-access-manager-keycloak/docker-compose-postgres.yml deleted file mode 100644 index 4fa41d41..00000000 --- a/identity-access-manager-keycloak/docker-compose-postgres.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: "3.9" - -services: - keycloak-postgres-1: - image: ${POSTGRES_IMAGE} - environment: - POSTGRESQL_PASSWORD: ${KC_POSTGRESQL_PASSWORD} - POSTGRESQL_USERNAME: ${KC_POSTGRESQL_USERNAME} - POSTGRESQL_DATABASE: ${KC_POSTGRESQL_DATABASE} - POSTGRESQL_POSTGRES_PASSWORD: ${KC_POSTGRESQL_PASSWORD} - REPMGR_NODE_NETWORK_NAME: keycloak-postgres-1 - REPMGR_PASSWORD: ${KC_REPMGR_PASSWORD} - REPMGR_RECONNECT_INTERVAL: 3 - REPMGR_NODE_NAME: keycloak-postgres-1 - REPMGR_PRIMARY_HOST: ${KC_REPMGR_PRIMARY_HOST} - REPMGR_PARTNER_NODES: ${KC_REPMGR_PARTNER_NODES} - volumes: - - "keycloak-postgres-1-data:/bitnami/postgresql" - deploy: - replicas: ${POSTGRES_REPLICAS} - resources: - limits: - cpus: ${KC_POSTGRES_CPU_LIMIT} - memory: ${KC_POSTGRES_MEMORY_LIMIT} - reservations: - cpus: ${KC_POSTGRES_CPU_RESERVE} - memory: ${KC_POSTGRES_MEMORY_RESERVE} - networks: - default: - keycloak_backup_net: {} - -volumes: - keycloak-postgres-1-data: - -networks: - default: - keycloak_backup_net: - name: keycloak_backup - driver: overlay - attachable: true From 3319148c90a16480a6b9bdf6a255d4e0b79a231e Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Wed, 15 May 2024 13:32:21 +0200 Subject: [PATCH 09/11] Temporarily disable clustered mode for jempi as it is not working --- .env.cluster | 6 +++--- client-registry-jempi/swarm.sh | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.env.cluster b/.env.cluster index b0f144a9..a1215e27 100644 --- a/.env.cluster +++ b/.env.cluster @@ -88,18 +88,18 @@ GF_SERVER_DOMAIN=grafana.domain KC_POSTGRES_REPLICA_SET=pgpool-1:5432,pgpool-2:5432,pgpool-3:5432 # Client Registry - JeMPI -JEMPI_WEB_INSTANCES=3 +JEMPI_WEB_INSTANCES=1 REACT_APP_JEMPI_BASE_API_HOST=https://jempi-api.domain REACT_APP_JEMPI_BASE_API_PORT=50000 JEMPI_SESSION_SECURE=true -JEMPI_REPMGR_PARTNER_NODES=jempi-postgresql-01,jempi-postgresql-02,jempi-postgresql-03 +JEMPI_REPMGR_PARTNER_NODES=jempi-postgresql-01 JEMPI_ASYNC_RECEIVER_INSTANCES=1 JEMPI_SYNC_RECEIVER_INSTANCES=1 JEMPI_PRE_PROCESSOR_INSTANCES=1 JEMPI_CONTROLLER_INSTANCES=1 JEMPI_EM_CALCULATOR_INSTANCES=1 JEMPI_LINKER_INSTANCES=1 -JEMPI_API_INSTANCES=3 +JEMPI_API_INSTANCES=1 # Resource limits OPENHIM_MEMORY_LIMIT=4G diff --git a/client-registry-jempi/swarm.sh b/client-registry-jempi/swarm.sh index d1323691..92e57aa2 100644 --- a/client-registry-jempi/swarm.sh +++ b/client-registry-jempi/swarm.sh @@ -52,11 +52,12 @@ function initialize_package() { log info "Running package in PROD mode" fi - if [[ "$CLUSTERED_MODE" == "true" ]]; then - dgraph_cluster_compose_param="docker-compose.dgraph-cluster.yml" - dgraph_zero_cluster_compose_param="docker-compose.dgraph-zero-cluster.yml" - combined_cluster_compose_param="docker-compose.combined-cluster.yml" - fi + # Jempi not working in clustered mode, temporarily disable + # if [[ "$CLUSTERED_MODE" == "true" ]]; then + # dgraph_cluster_compose_param="docker-compose.dgraph-cluster.yml" + # dgraph_zero_cluster_compose_param="docker-compose.dgraph-zero-cluster.yml" + # combined_cluster_compose_param="docker-compose.combined-cluster.yml" + # fi ( log info "Importing JeMPI Kafka topics" From 21eacab7645294273e76a14806049ca3275f801c Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Wed, 15 May 2024 13:52:17 +0200 Subject: [PATCH 10/11] Jempi only runs in single mode ata the moment --- .../features/cluster-mode/jempi.cluster.feature | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/test/cucumber/features/cluster-mode/jempi.cluster.feature b/test/cucumber/features/cluster-mode/jempi.cluster.feature index 81279549..96990800 100644 --- a/test/cucumber/features/cluster-mode/jempi.cluster.feature +++ b/test/cucumber/features/cluster-mode/jempi.cluster.feature @@ -23,8 +23,6 @@ Feature: Client Registry JeMPI? And The service "jempi-alpha-02" should be started with 1 replica And The service "jempi-alpha-03" should be started with 1 replica And The service "jempi-zero-01" should be started with 1 replica - And The service "jempi-zero-02" should be started with 1 replica - And The service "jempi-zero-03" should be started with 1 replica And The service "jempi-async-receiver" should be started with 1 replica And The service "jempi-async-receiver" should be connected to the networks | kafka_public | jempi_default | @@ -41,12 +39,10 @@ Feature: Client Registry JeMPI? And The service "jempi-linker" should be started with 1 replica And The service "jempi-linker" should be connected to the networks | kafka_public | jempi_default | - And The service "jempi-api" should be started with 3 replica + And The service "jempi-api" should be started with 1 replica And The service "jempi-api" should be connected to the networks | kafka_public | jempi_default | And The service "jempi-postgresql-01" should be started with 1 replica - And The service "jempi-postgresql-02" should be started with 1 replica - And The service "jempi-postgresql-03" should be started with 1 replica And The service "jempi-web" should be started with 3 replica And The service "jempi-web" should be connected to the networks | reverse-proxy_public | keycloak_public | jempi_default | @@ -74,13 +70,9 @@ Feature: Client Registry JeMPI? And The service "jempi-em-calculator" should be removed And The service "jempi-linker" should be removed And The service "jempi-zero-01" should be removed - And The service "jempi-zero-02" should be removed - And The service "jempi-zero-03" should be removed And The service "jempi-api" should be removed And The service "jempi-web" should be removed And The service "jempi-postgresql-01" should be removed - And The service "jempi-postgresql-02" should be removed - And The service "jempi-postgresql-03" should be removed And The service "mongo-1" should be removed And The service "mongo-2" should be removed And The service "mongo-3" should be removed From 98d6e135365d93c4e88c4afbf360f1470d0ee93d Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Wed, 15 May 2024 16:14:53 +0200 Subject: [PATCH 11/11] Remove repeating of test Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- test/cucumber/features/cluster-mode/jempi.cluster.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cucumber/features/cluster-mode/jempi.cluster.feature b/test/cucumber/features/cluster-mode/jempi.cluster.feature index 96990800..83210fd8 100644 --- a/test/cucumber/features/cluster-mode/jempi.cluster.feature +++ b/test/cucumber/features/cluster-mode/jempi.cluster.feature @@ -40,6 +40,7 @@ Feature: Client Registry JeMPI? And The service "jempi-linker" should be connected to the networks | kafka_public | jempi_default | And The service "jempi-api" should be started with 1 replica + And The service "mongo-1" should be started with 1 replica And The service "jempi-api" should be connected to the networks | kafka_public | jempi_default | And The service "jempi-postgresql-01" should be started with 1 replica