Skip to content

Commit

Permalink
update jempi docker config and set new defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewErispe committed Sep 12, 2024
1 parent 3876e49 commit cbb2d88
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 98 deletions.
16 changes: 0 additions & 16 deletions client-registry-jempi/docker-compose.combined-dev.yml

This file was deleted.

45 changes: 42 additions & 3 deletions client-registry-jempi/docker-compose.dgraph-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,60 @@ services:
placement:
constraints:
- node.labels.name == node-1

jempi-alpha-02:
image: ${JEMPI_ZERO_IMAGE}
hostname: alpha-02
volumes:
- jempi-alpha-02-data:/dgraph
deploy:
placement:
constraints:
- node.labels.name == node-2
replicas: 1
resources:
limits:
memory: ${JEMPI_ALPHA_02_MEMORY_LIMIT}
reservations:
memory: ${JEMPI_ALPHA_02_MEMORY_RESERVE}
restart_policy:
condition: on-failure
command: dgraph alpha --my=jempi-alpha-02:7081 --zero=jempi-zero-01:5080 --security whitelist=0.0.0.0/0 -o 1 --telemetry "sentry=false;"
networks:
jempi:

jempi-alpha-03:
image: ${JEMPI_ZERO_IMAGE}
hostname: alpha-03
volumes:
- jempi-alpha-03-data:/dgraph
deploy:
placement:
constraints:
- node.labels.name == node-3
constraints:
- node.labels.name == node-3
replicas: 1
resources:
limits:
memory: ${JEMPI_ALPHA_03_MEMORY_LIMIT}
reservations:
memory: ${JEMPI_ALPHA_03_MEMORY_RESERVE}
restart_policy:
condition: on-failure
command: dgraph alpha --my=jempi-alpha-03:7082 --zero=jempi-zero-01:5080 --security whitelist=0.0.0.0/0 -o 2 --telemetry "sentry=false;"
networks:
jempi:

jempi-ratel:
deploy:
placement:
constraints:
- node.labels.name == node-1

volumes:
jempi-alpha-02-data:
jempi-alpha-03-data:

networks:
jempi:
name: jempi_public
external: true
22 changes: 0 additions & 22 deletions client-registry-jempi/docker-compose.dgraph-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,6 @@ services:
protocol: tcp
mode: host

jempi-alpha-02:
ports:
- published: 8071
target: 8081
protocol: tcp
mode: host
- published: 9081
target: 9081
protocol: tcp
mode: host

jempi-alpha-03:
ports:
- published: 8072
target: 8082
protocol: tcp
mode: host
- published: 9082
target: 9082
protocol: tcp
mode: host

jempi-ratel:
ports:
- published: 8010
Expand Down
40 changes: 1 addition & 39 deletions client-registry-jempi/docker-compose.dgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,7 @@ services:
memory: ${JEMPI_ALPHA_01_MEMORY_RESERVE}
restart_policy:
condition: on-failure
command: dgraph alpha --my=jempi-alpha-01:7080 --zero=jempi-zero-01:5080 --security whitelist=0.0.0.0/0 --telemetry "sentry=false;"
networks:
jempi:

jempi-alpha-02:
image: ${JEMPI_ZERO_IMAGE}
hostname: alpha-02
volumes:
- jempi-alpha-02-data:/dgraph
deploy:
replicas: 1
resources:
limits:
memory: ${JEMPI_ALPHA_02_MEMORY_LIMIT}
reservations:
memory: ${JEMPI_ALPHA_02_MEMORY_RESERVE}
restart_policy:
condition: on-failure
command: dgraph alpha --my=jempi-alpha-02:7081 --zero=jempi-zero-01:5080 --security whitelist=0.0.0.0/0 -o 1 --telemetry "sentry=false;"
networks:
jempi:

jempi-alpha-03:
image: ${JEMPI_ZERO_IMAGE}
hostname: alpha-03
volumes:
- jempi-alpha-03-data:/dgraph
deploy:
replicas: 1
resources:
limits:
memory: ${JEMPI_ALPHA_03_MEMORY_LIMIT}
reservations:
memory: ${JEMPI_ALPHA_03_MEMORY_RESERVE}
restart_policy:
condition: on-failure
command: dgraph alpha --my=jempi-alpha-03:7082 --zero=jempi-zero-01:5080 --security whitelist=0.0.0.0/0 -o 2 --telemetry "sentry=false;"
command: dgraph alpha --my=jempi-alpha-01:7080 --zero=jempi-zero-01:5080 --cache "size-mb=4096; percentage=50,30,20;" --security whitelist=0.0.0.0/0 --telemetry "sentry=false;"
networks:
jempi:

Expand All @@ -72,8 +36,6 @@ services:

volumes:
jempi-alpha-01-data:
jempi-alpha-02-data:
jempi-alpha-03-data:

networks:
jempi:
Expand Down
2 changes: 1 addition & 1 deletion client-registry-jempi/importer/openhim/openhimConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const path = require("path");
const OPENHIM_CORE_SERVICE_NAME = 'openhim-core'
const OPENHIM_MEDIATOR_API_PORT = 8080
const OPENHIM_API_PASSWORD =
process.env.OPENHIM_API_PASSWORD || 'openhim-password'
process.env.OPENHIM_API_PASSWORD || 'instant101'
const OPENHIM_API_USERNAME =
process.env.OPENHIM_API_USERNAME || '[email protected]'

Expand Down
28 changes: 14 additions & 14 deletions client-registry-jempi/package-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"environmentVariables": {
"KAFKA_HOSTS": "kafka-01:9092",
"JEMPI_POSTGRESQL_IMAGE": "bitnami/postgresql-repmgr:15.2.0",
"JEMPI_ZERO_IMAGE": "dgraph/dgraph:v22.0.0",
"JEMPI_ZERO_IMAGE": "dgraph/dgraph:v23.1.1",
"JEMPI_RATEL_IMAGE": "dgraph/ratel:v21.03.2",
"JEMPI_ZERO_MEMORY_LIMIT": "3G",
"JEMPI_ZERO_MEMORY_RESERVE": "500M",
"JEMPI_ZERO_01_PLACEMENT": "node-1",
"JEMPI_ZERO_02_PLACEMENT": "node-2",
"JEMPI_ZERO_03_PLACEMENT": "node-3",
"JEMPI_ALPHA_01_MEMORY_LIMIT": "3G",
"JEMPI_ALPHA_01_MEMORY_LIMIT": "6G",
"JEMPI_ALPHA_01_MEMORY_RESERVE": "500M",
"JEMPI_ALPHA_02_MEMORY_LIMIT": "3G",
"JEMPI_ALPHA_02_MEMORY_RESERVE": "500M",
Expand All @@ -40,23 +40,23 @@
"JEMPI_ETL_MEMORY_RESERVE": "500M",
"JEMPI_API_INSTANCES": 1,
"JEMPI_KAFKA_TOPICS": "JeMPI-async-etl,JeMPI-interaction-controller,JeMPI-interaction-em,JeMPI-interaction-linker,JeMPI-mu-linker,JeMPI-audit-trail,JeMPI-notifications",
"JEMPI_ASYNC_RECEIVER_IMAGE_TAG": "1.0.1-beta",
"JEMPI_CONTROLLER_IMAGE_TAG": "1.0.1-beta",
"JEMPI_LINKER_IMAGE_TAG": "1.0.1-beta",
"JEMPI_API_IMAGE_TAG": "1.0.1-beta",
"JEMPI_API_KC_IMAGE_TAG": "1.0.1-beta",
"JEMPI_ETL_IMAGE_TAG": "1.0.1-beta",
"JEMPI_ASYNC_RECEIVER_IMAGE_TAG": "1.1.0",
"JEMPI_CONTROLLER_IMAGE_TAG": "1.1.0",
"JEMPI_LINKER_IMAGE_TAG": "1.1.1",
"JEMPI_API_IMAGE_TAG": "1.1.1",
"JEMPI_API_KC_IMAGE_TAG": "1.1.1",
"JEMPI_ETL_IMAGE_TAG": "1.1.0",
"JEMPI_ASYNC_RECEIVER_INSTANCES": 1,
"JEMPI_CONTROLLER_INSTANCES": 1,
"JEMPI_LINKER_INSTANCES": 1,
"JEMPI_LINKER_INSTANCES": 3,
"JEMPI_ETL_INSTANCES": 1,
"JEMPI_OPENHIM_PASSWORD": "instant101",
"JEMPI_SESSION_SECRET": "c05ll3lesrinf39t7mc5h6un6r0c69lgfno69dsak3vabeqamouq4328cuaekros401ajdpkh60rrt",
"JEMPI_FILE_IMPORT_MAX_SIZE_BYTE": "128m",
"REACT_APP_JEMPI_BASE_API_HOST": "http://localhost",
"REACT_APP_JEMPI_BASE_API_PORT": "50000",
"REACT_APP_MOCK_BACKEND": "false",
"JEMPI_WEB_VERSION": "1.0.1-beta",
"JEMPI_WEB_VERSION": "1.1.0",
"JEMPI_WEB_INSTANCES": 1,
"JEMPI_WEB_MEMORY_LIMIT": "2G",
"JEMPI_WEB_MEMORY_RESERVE": "500M",
Expand All @@ -69,7 +69,7 @@
"KC_JEMPI_ROOT_URL": "http://localhost:3033",
"POSTGRES_SERVICE": "postgres-1",
"JEMPI_POSTGRES_DB": "postgres-1",
"JEMPI_POSTGRESQL_USERNAME": "jempi",
"JEMPI_POSTGRESQL_USERNAME": "postgres",
"JEMPI_POSTGRESQL_PASSWORD": "instant101",
"POSTGRESQL_USERS_DB": "users_db",
"POSTGRESQL_NOTIFICATIONS_DB": "notifications_db",
Expand All @@ -82,8 +82,8 @@
"JEMPI_SESSION_DOMAIN_NAME": "localhost",
"DOMAIN_NAME": "",
"KAFKA_APPLICATION_ID_API": "api-app-id",
"DGRAPH_HOSTS": "jempi-alpha-01,jempi-alpha-02,jempi-alpha-03",
"DGRAPH_PORTS": "9080,9081,9082",
"DGRAPH_HOSTS": "jempi-alpha-01",
"DGRAPH_PORTS": "9080",
"LOG4J2_LEVEL": "DEBUG",
"KAFKA_APPLICATION_ID_INTERACTIONS": "app-id-link1",
"KAFKA_APPLICATION_ID_MU": "app-id-link2",
Expand All @@ -95,7 +95,7 @@
"KAFKA_APPLICATION_ID_CTRL": "app-id-ctrl",
"KAFKA_CLIENT_ID_CTRL": "client-id-ctrl",
"KAFKA_APPLICATION_ID_BOOTSTRAPPER": "app-id-bootstrapper",
"JEMPI_BOOTSTRAPPER_IMAGE_TAG": "1.0.1-beta",
"JEMPI_BOOTSTRAPPER_IMAGE_TAG": "1.1.0",
"JEMPI_EM_SCALA_IMAGE_TAG": "dev",
"JEMPI_EM_SCALA_INSTANCES": "1",
"JEMPI_EM_SCALA_MEMORY_LIMIT": "3G",
Expand Down
4 changes: 1 addition & 3 deletions client-registry-jempi/swarm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function import_sources() {
function initialize_package() {
local dgraph_dev_compose_param=""
local dgraph_zero_dev_compose_param=""
local combined_dev_compose_param=""
local combined_cluster_compose_param=""
local api_dev_compose_param=""
local web_dev_compose_param=""
Expand All @@ -45,7 +44,6 @@ function initialize_package() {
log info "Running package in DEV mode"
dgraph_dev_compose_param="docker-compose.dgraph-dev.yml"
dgraph_zero_dev_compose_param="docker-compose.dgraph-zero-dev.yml"
combined_dev_compose_param="docker-compose.combined-dev.yml"
api_dev_compose_param="docker-compose.api-dev.yml"
web_dev_compose_param="docker-compose.web-dev.yml"
else
Expand Down Expand Up @@ -74,7 +72,7 @@ function initialize_package() {
docker::deploy_service $STACK "${COMPOSE_FILE_PATH}" "docker-compose.dgraph.yml" "$dgraph_dev_compose_param" "$dgraph_cluster_compose_param"

log info "Deploy other combined services"
docker::deploy_service $STACK "${COMPOSE_FILE_PATH}" "docker-compose.combined.yml" "$combined_dev_compose_param" "$combined_cluster_compose_param"
docker::deploy_service $STACK "${COMPOSE_FILE_PATH}" "docker-compose.combined.yml" "$combined_cluster_compose_param"

log info "Deploy JeMPI API"
docker::deploy_service $STACK "${COMPOSE_FILE_PATH}" "docker-compose.api.yml" "$api_dev_compose_param"
Expand Down

0 comments on commit cbb2d88

Please sign in to comment.