Skip to content

Commit

Permalink
Merge pull request #289 from jembi/CU-86bygzkm5_Images-Placement-for-…
Browse files Browse the repository at this point in the history
…Interoperability-proxy-identity

Cu 86bygzkm5 images placement for interoperability proxy identity
  • Loading branch information
bradsawadye authored May 15, 2024
2 parents 5ba58ca + 98d6e13 commit 67e1a49
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 174 deletions.
6 changes: 3 additions & 3 deletions .env.cluster
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions client-registry-jempi/swarm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

This file was deleted.

This file was deleted.

40 changes: 0 additions & 40 deletions identity-access-manager-keycloak/docker-compose-postgres.yml

This file was deleted.

8 changes: 4 additions & 4 deletions identity-access-manager-keycloak/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions identity-access-manager-keycloak/package-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
"version": "0.0.1",
"dependencies": ["database-postgres"],
"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",
Expand Down
26 changes: 13 additions & 13 deletions interoperability-layer-openhim/docker-compose-mongo.cluster.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions interoperability-layer-openhim/docker-compose-mongo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 3 additions & 3 deletions interoperability-layer-openhim/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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}
Expand All @@ -41,7 +41,7 @@ services:
- prometheus-port=8080

openhim-console:
image: ${OPENHIM_CONSOLE_VERSION}
image: ${OPENHIM_CONSOLE_IMAGE}
environment:
OPENHIM_CORE_MEDIATOR_HOSTNAME: ${OPENHIM_CORE_MEDIATOR_HOSTNAME}
OPENHIM_MEDIATOR_API_PORT: ${OPENHIM_MEDIATOR_API_PORT}
Expand All @@ -58,7 +58,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}
Expand Down
9 changes: 8 additions & 1 deletion interoperability-layer-openhim/package-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
"dependencies": [],
"environmentVariables": {
"OPENHIM_CORE_IMAGE": "jembi/openhim-core:microfrontends-3.0.0-beta",
"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",
"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",
Expand All @@ -27,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",
Expand Down
6 changes: 3 additions & 3 deletions job-scheduler-ofelia/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,5 +14,5 @@ configs:
ofelia-config.ini:
file: ./config.ini
name: ofelia-config.ini-${ofelia_config_ini_DIGEST:?err}
labels:
labels:
name: ofelia
1 change: 1 addition & 0 deletions job-scheduler-ofelia/package-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"version": "0.0.1",
"dependencies": [],
"environmentVariables": {
"JOB_SCHEDULER_OFELIA_IMAGE": "mcuadros/ofelia:v0.3.6",
"RENEWAL_EMAIL": "[email protected]",
"STAGING": "true",
"DOMAIN_NAME": "localhost",
Expand Down
4 changes: 2 additions & 2 deletions openhim-mapping-mediator/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
1 change: 1 addition & 0 deletions openhim-mapping-mediator/package-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"OPENHIM_MONGO_URL": "mongodb://mongo-1:27017/openhim",
Expand Down
Loading

0 comments on commit 67e1a49

Please sign in to comment.