Skip to content

Commit

Permalink
Merge pull request #233 from jembi/PLAT-707-openhim-kafka-integration
Browse files Browse the repository at this point in the history
PLAT-707 Openhim kafka integration
  • Loading branch information
michaelloosen authored Jun 1, 2023
2 parents 20d0ef9 + 1dbbcd4 commit eeed245
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 13 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
jobs:
Expand Down Expand Up @@ -81,10 +81,9 @@ jobs:
id: changed-files
uses: tj-actions/[email protected]
with:
since_last_remote_commit: 'true'
dir_names: 'true'
since_last_remote_commit: "true"
dir_names: "true"
- run: ./get-cli.sh linux
- run: ./build-image.sh
- run: sudo sh -c 'echo " ServerAliveInterval 30" >> /etc/ssh/ssh_config'
- run: sudo sh -c 'echo " ServerAliveCountMax 999" >> /etc/ssh/ssh_config'
- run: sudo service ssh restart
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
jobs:
Expand Down Expand Up @@ -80,10 +80,9 @@ jobs:
id: changed-files
uses: tj-actions/[email protected]
with:
since_last_remote_commit: 'true'
dir_names: 'true'
since_last_remote_commit: "true"
dir_names: "true"
- run: ./get-cli.sh linux
- run: ./build-image.sh
- run: sudo sh -c 'echo " ServerAliveInterval 30" >> /etc/ssh/ssh_config'
- run: sudo sh -c 'echo " ServerAliveCountMax 999" >> /etc/ssh/ssh_config'
- run: sudo service ssh restart
Expand Down
2 changes: 1 addition & 1 deletion build-image.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
TAG_NAME=${1:-latest}
docker build -t jembi/platform:$TAG_NAME .
docker build -t jembi/platform:"$TAG_NAME" .
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
projectName: platform
image: jembi/platform
image: jembi/platform:2.3.0
logPath: /tmp/logs

packages:
Expand Down
5 changes: 3 additions & 2 deletions interoperability-layer-openhim/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.9'

services:
openhim-core:
image: jembi/openhim-core:v7.2.1
image: jembi/openhim-core:v7.3.0
networks:
reverse-proxy:
keycloak:
Expand All @@ -13,6 +13,7 @@ services:
- mongo_atnaUrl=${OPENHIM_MONGO_ATNAURL}
- api_authenticationTypes=["token", "basic", "openid", "local"]
- authentication_enableCustomTokenAuthentication=true
- router_kafkaBrokers=${KAFKA_HOSTS}
- api_openid_url=${KC_FRONTEND_URL}/realms/${KC_REALM_NAME}
- api_openid_callbackUrl=${KC_OPENHIM_ROOT_URL}
- api_openid_clientId=${KC_OPENHIM_CLIENT_ID}
Expand All @@ -30,7 +31,7 @@ services:
memory: ${OPENHIM_MEMORY_RESERVE}

openhim-console:
image: jembi/openhim-console:v1.17.0
image: jembi/openhim-console:v1.18.0
environment:
OPENHIM_CORE_MEDIATOR_HOSTNAME: ${OPENHIM_CORE_MEDIATOR_HOSTNAME}
OPENHIM_MEDIATOR_API_PORT: ${OPENHIM_MEDIATOR_API_PORT}
Expand Down
1 change: 1 addition & 0 deletions interoperability-layer-openhim/package-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"OPENHIM_MONGO_MEMORY_RESERVE": "500M",
"OPENHIM_MONGO_URL": "mongodb://mongo-1:27017/openhim",
"OPENHIM_MONGO_ATNAURL": "mongodb://mongo-1:27017/openhim",
"KAFKA_HOSTS": "kafka-01:9092",
"KC_REALM_NAME": "platform-realm",
"KC_FRONTEND_URL": "http://localhost:9088",
"KC_OPENHIM_SSO_ENABLED": false,
Expand Down
14 changes: 13 additions & 1 deletion remote-img-load.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ if [ -z "${HOST}" ]; then
exit 1
fi

./build-image.sh
TAG_NAME=${1:-latest} #Default to latest if no parameter supplied and no version is specified in the config.yaml file
CONFIG_TAG=$(docker run --rm -v "${PWD}":/workdir mikefarah/yq:4.24.5 '.image' "config.yaml")
if [ "$CONFIG_TAG" != "null" ]; then
TagVersion=${CONFIG_TAG:15}
if [ -n "$TagVersion" ]; then
if [[ -z "$1" ]]; then
#Override the TAG_NAME with the one specified in config.yaml only if no parameter was supplied
TAG_NAME=$TagVersion
fi
fi
fi

./build-image.sh "$TAG_NAME"
echo "Transfering image to ${HOST} ..."
docker save jembi/platform:latest | bzip2 | ssh "${USER}@${HOST}" docker load
echo "Image transfered"

0 comments on commit eeed245

Please sign in to comment.