From e0d2d5a20dbb0d312bb3d9c63153ca30c102114f Mon Sep 17 00:00:00 2001 From: drono Date: Wed, 15 May 2024 17:19:41 +0300 Subject: [PATCH 1/9] Platform beta release --- config.yaml | 3 +- fhir-ig-importer/docker-compose.dev.yml | 2 +- .../importer/volume/ig-importer-app.json | 2 +- fhir-ig-importer/package-metadata.json | 4 +- .../package-metadata.json | 4 +- kafka-mapper-consumer/package-metadata.json | 4 +- mpi-mediator/docker-compose.yml | 2 +- .../importer/volume/openhim-import.json | 31 ++---- reprocess-mediator/docker-compose.dev.yml | 2 +- reprocess-mediator/package-metadata.json | 32 +++--- test/cucumber/features/steps/recipesSteps.js | 105 +++++++++++------- 11 files changed, 103 insertions(+), 88 deletions(-) diff --git a/config.yaml b/config.yaml index 54977b16..862a5df6 100644 --- a/config.yaml +++ b/config.yaml @@ -44,6 +44,8 @@ profiles: - openhim-mapping-mediator - kafka-mapper-consumer - kafka-unbundler-consumer + - fhir-ig-importer + - reprocess-mediator envFiles: - cdr-dw.env @@ -75,4 +77,3 @@ profiles: - openhim-mapping-mediator envFiles: - mpi.env - diff --git a/fhir-ig-importer/docker-compose.dev.yml b/fhir-ig-importer/docker-compose.dev.yml index 25714fbd..c33a9169 100644 --- a/fhir-ig-importer/docker-compose.dev.yml +++ b/fhir-ig-importer/docker-compose.dev.yml @@ -10,5 +10,5 @@ services: fhir-ig-importer-ui: ports: - target: 8080 - published: 3000 + published: 3334 mode: host diff --git a/fhir-ig-importer/importer/volume/ig-importer-app.json b/fhir-ig-importer/importer/volume/ig-importer-app.json index a86b0cc8..102b6eac 100644 --- a/fhir-ig-importer/importer/volume/ig-importer-app.json +++ b/fhir-ig-importer/importer/volume/ig-importer-app.json @@ -3,7 +3,7 @@ "description": "FHIR IG microfrontend app", "category": "HIE Configuration", "type": "esmodule", - "url": "http://localhost:3000/jembi-fhir-ig-importer.js", + "url": "http://localhost:3334/jembi-fhir-ig-importer.js", "showInPortal": true, "showInSideBar": true, "access_roles": ["admin"], diff --git a/fhir-ig-importer/package-metadata.json b/fhir-ig-importer/package-metadata.json index 1db85f0a..27f4de82 100644 --- a/fhir-ig-importer/package-metadata.json +++ b/fhir-ig-importer/package-metadata.json @@ -14,7 +14,7 @@ "FHIR_IG_IMPORTER_CORE_PORT": 3001, "FHIR_IG_IMPORTER_CORE_HOST": "0.0.0.0", "FHIR_IG_IMPORTER_CORE_URL": "http://0.0.0.0:3001/fhir/ig/v1.0", - "FHIR_IG_IMPORTER_UI_VERSION": "0.1.0", - "FHIR_IG_IMPORTER_CORE_VERSION": "1.0.0" + "FHIR_IG_IMPORTER_UI_VERSION": "v1.0.0", + "FHIR_IG_IMPORTER_CORE_VERSION": "v1.0.0" } } diff --git a/interoperability-layer-openhim/package-metadata.json b/interoperability-layer-openhim/package-metadata.json index a866f05c..82272031 100644 --- a/interoperability-layer-openhim/package-metadata.json +++ b/interoperability-layer-openhim/package-metadata.json @@ -6,8 +6,8 @@ "type": "infrastructure", "dependencies": [], "environmentVariables": { - "OPENHIM_CORE_IMAGE": "jembi/openhim-core:microfrontends-3.0.0-beta", - "OPENHIM_CONSOLE_IMAGE": "jembi/openhim-console:v1.18.2", + "OPENHIM_CORE_IMAGE": "jembi/openhim-core:v8.4.3", + "OPENHIM_CONSOLE_IMAGE": "jembi/openhim-console:poc-microfrontend", "MONGO_IMAGE": "mongo:4.2", "AWAIT_HELPER_IMAGE": "jembi/await-helper:1.0.1", "MONGO_1_PLACEMENT": "node-1", diff --git a/kafka-mapper-consumer/package-metadata.json b/kafka-mapper-consumer/package-metadata.json index a28cd5da..0c0b17a9 100644 --- a/kafka-mapper-consumer/package-metadata.json +++ b/kafka-mapper-consumer/package-metadata.json @@ -17,7 +17,7 @@ "REGISTER_MEDIATOR": "true", "CLICKHOUSE_HOST": "analytics-datastore-clickhouse", "CLICKHOUSE_PORT": "8123", - "KAFKA_CONSUMER_MAPPER_MEDIATOR_VERSION": "jembi/kafka-mapper-consumer:0.1.0", - "KAFKA_CONSUMER_MAPPER_UI_VERSION": "jembi/kafka-mapper-consumer-ui:0.1.1-alpha" + "KAFKA_CONSUMER_MAPPER_MEDIATOR_VERSION": "jembi/kafka-mapper-consumer:v0.0.1", + "KAFKA_CONSUMER_MAPPER_UI_VERSION": "jembi/kafka-mapper-consumer-ui:v0.0.1" } } diff --git a/mpi-mediator/docker-compose.yml b/mpi-mediator/docker-compose.yml index 084d7e39..8f39f082 100644 --- a/mpi-mediator/docker-compose.yml +++ b/mpi-mediator/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.9' services: mpi-mediator: - image: jembi/mpi-mediator:v2.1.1 + image: jembi/mpi-mediator:v2.2.0 networks: openhim: kafka: diff --git a/mpi-mediator/importer/volume/openhim-import.json b/mpi-mediator/importer/volume/openhim-import.json index 5a1b11b9..cb40af5d 100644 --- a/mpi-mediator/importer/volume/openhim-import.json +++ b/mpi-mediator/importer/volume/openhim-import.json @@ -5,9 +5,7 @@ "surname": "User", "email": "root@openhim.org", "provider": "token", - "groups": [ - "admin" - ], + "groups": ["admin"], "passwordAlgorithm": "sha512", "passwordHash": "ea3824f17cf1379eb118a36bc7c8cf0f45712e2af7748567fca5313dec6fa66d61064e82a5e5cb88e998486ee3c7d0dac235bbeda8c341d6edc1c77406be2ab6", "passwordSalt": "d4f622c0404f09bd959bfb263efa3452", @@ -21,9 +19,7 @@ { "clientID": "test", "name": "Test Client", - "roles": [ - "instant" - ], + "roles": ["instant"], "customTokenID": "test" } ], @@ -98,7 +94,7 @@ "urlPattern": "^/fhir.*$", "methods": ["GET", "POST"], "type": "http", - "priority": null, + "priority": 2, "tcpPort": null, "tcpHost": null, "pollingSchedule": null, @@ -147,9 +143,7 @@ { "name": "MPI Orchestration for fhir bundles - Asynchronous flow", "urlPattern": "^/async/fhir/?$", - "methods": [ - "POST" - ], + "methods": ["POST"], "type": "http", "priority": null, "tcpPort": null, @@ -157,9 +151,7 @@ "pollingSchedule": null, "requestBody": true, "responseBody": true, - "allow": [ - "instant" - ], + "allow": ["instant"], "whitelist": [], "authType": "private", "routes": [ @@ -240,9 +232,7 @@ "pollingSchedule": null, "requestBody": true, "responseBody": true, - "allow": [ - "instant" - ], + "allow": ["instant"], "whitelist": [], "authType": "private", "routes": [ @@ -328,14 +318,9 @@ { "name": "MPI mediator", "urlPattern": "^(/async)?/fhir.*$", - "methods": [ - "POST", - "GET" - ], + "methods": ["POST", "GET"], "type": "http", - "allow": [ - "instant" - ], + "allow": ["instant"], "whitelist": [], "authType": "private", "routes": [ diff --git a/reprocess-mediator/docker-compose.dev.yml b/reprocess-mediator/docker-compose.dev.yml index ee40381a..e376b2f1 100644 --- a/reprocess-mediator/docker-compose.dev.yml +++ b/reprocess-mediator/docker-compose.dev.yml @@ -4,7 +4,7 @@ services: reprocess-mediator: ports: - target: 3000 - published: 3000 + published: 3335 mode: host reprocess-mediator-ui: diff --git a/reprocess-mediator/package-metadata.json b/reprocess-mediator/package-metadata.json index 4393bc6e..97ca4643 100644 --- a/reprocess-mediator/package-metadata.json +++ b/reprocess-mediator/package-metadata.json @@ -1,18 +1,18 @@ { - "id": "reprocess-mediator", - "name": "Reprocess Mediator", - "description": "A mediator that allows for configuring and reprocessing of transactions", - "type": "use-case", - "version": "1.4.2", - "dependencies": ["interoperability-layer-openhim"], - "environmentVariables": { - "TRUST_SELF_SIGNED": "true", - "OPENHIM_MEDIATOR_URL": "https://openhim-core:8080", - "OPENHIM_USERNAME": "root@openhim.org", - "OPENHIM_PASSWORD": "instant101", - "REGISTER_MEDIATOR": "true", - "REPROCESSOR_API_BASE_URL": "http://reprocess-mediator:3000", - "REPROCESS_CORE_VERSION": "latest", - "REPROCESS_UI_VERSION": "latest" - } + "id": "reprocess-mediator", + "name": "Reprocess Mediator", + "description": "A mediator that allows for configuring and reprocessing of transactions", + "type": "use-case", + "version": "1.4.2", + "dependencies": ["interoperability-layer-openhim"], + "environmentVariables": { + "TRUST_SELF_SIGNED": "true", + "OPENHIM_MEDIATOR_URL": "https://openhim-core:8080", + "OPENHIM_USERNAME": "root@openhim.org", + "OPENHIM_PASSWORD": "instant101", + "REGISTER_MEDIATOR": "true", + "REPROCESSOR_API_BASE_URL": "http://reprocess-mediator:3000", + "REPROCESS_CORE_VERSION": "v0.1.0", + "REPROCESS_UI_VERSION": "v0.1.0" } +} diff --git a/test/cucumber/features/steps/recipesSteps.js b/test/cucumber/features/steps/recipesSteps.js index 9c119150..8d24c0b3 100644 --- a/test/cucumber/features/steps/recipesSteps.js +++ b/test/cucumber/features/steps/recipesSteps.js @@ -1,16 +1,15 @@ -"use strict" +"use strict"; const axios = require("axios"); const fs = require("fs"); -const path = require('path'); +const path = require("path"); const chai = require("chai"); -const { ClickHouse } = require('clickhouse'); +const { ClickHouse } = require("clickhouse"); const { Given, When, Then, setDefaultTimeout } = require("@cucumber/cucumber"); setDefaultTimeout(30 * 60 * 1000); -const HOST = - process.env.HOST || 'localhost'; -const CLICKHOUSE_PORT = parseInt(process.env.CLICKHOUSE_PORT || '8124'); +const HOST = process.env.HOST || "localhost"; +const CLICKHOUSE_PORT = parseInt(process.env.CLICKHOUSE_PORT || "8124"); const CLICKHOUSE_DEBUG = Boolean(process.env.CLICKHOUSE_DEBUG || false); const { expect } = chai; @@ -22,69 +21,99 @@ const clickhouse = new ClickHouse({ raw: true, }); -const query = table => `SELECT * FROM ${table}`; +const query = (table) => `SELECT * FROM ${table}`; -const sendRequest = (url, method='POST', data={}) => { +const sendRequest = (url, method = "POST", data = {}) => { return axios({ url, headers: { - 'Content-Type': 'application/fhir+json', - Authorization: `Custom test` + "Content-Type": "application/fhir+json", + Authorization: `Custom test`, }, data, - method - }) + method, + }); }; let PatientID; Given("I have configured the cdr", async function () { await new Promise((resolve) => { - setTimeout(() => resolve(), 300000) + setTimeout(() => resolve(), 300000); }); const organization = JSON.parse( - fs.readFileSync(path.resolve(__dirname, '..' , 'resources', 'organization.json')) + fs.readFileSync( + path.resolve(__dirname, "..", "resources", "organization.json") + ) ); - this.cdrConfigResult = await sendRequest(`http://${HOST}:5001/fhir`, 'POST', organization); + this.cdrConfigResult = await sendRequest( + `http://${HOST}:5001/fhir`, + "POST", + organization + ); }); When("I send a fhir patient bundle", async function () { const fhirBundle = JSON.parse( - fs.readFileSync(path.resolve(__dirname, '..' , 'resources', 'fhirBundle.json')) + fs.readFileSync( + path.resolve(__dirname, "..", "resources", "fhirBundle.json") + ) ); - this.fhirBundleSentResult = await sendRequest(`http://${HOST}:5001/fhir`, 'POST', fhirBundle); + this.fhirBundleSentResult = await sendRequest( + `http://${HOST}:5001/fhir`, + "POST", + fhirBundle + ); }); When("I then send a fhir patient summary request", async function () { - this.IPSResult = await sendRequest(`http://${HOST}:5001/fhir/Patient/${PatientID}/$summary`, 'GET'); -}); - -When("I then send a request for all the patient's clinical data", async function () { - this.EverythingResult = await sendRequest(`http://${HOST}:5001/fhir/Patient/${PatientID}/$everything?_mdm=true`, 'GET'); + this.IPSResult = await sendRequest( + `http://${HOST}:5001/fhir/Patient/${PatientID}/$summary`, + "GET" + ); }); -When("I wait for the services to start up", async function() { +When( + "I then send a request for all the patient's clinical data", + async function () { + this.EverythingResult = await sendRequest( + `http://${HOST}:5001/fhir/Patient/${PatientID}/$everything?_mdm=true`, + "GET" + ); + } +); + +When("I wait for the services to start up", async function () { await new Promise((resolve) => { setTimeout(() => resolve(), 1500000); }); }); Then("the clinical data should be stored in hapi fhir", async function () { - this.fhirBundleSentResult.data.entry.forEach(rec => { + this.fhirBundleSentResult.data.entry.forEach((rec) => { expect(rec.response.status).to.match(/201|200/); }); }); Then("the patient data in the Jempi client registry", async function () { - const patientResource = this.fhirBundleSentResult.data.entry.filter(rec => rec.response.location.match('Patient'))[0]; + const patientResource = this.fhirBundleSentResult.data.entry.filter((rec) => + rec.response.location.match("Patient") + )[0]; - PatientID = patientResource.response.location.split('/')[1]; + PatientID = patientResource.response.location.split("/")[1]; - const patient = await sendRequest(`http://${HOST}:5001/fhir/links/Patient/${PatientID}`, 'GET'); + const patient = await sendRequest( + `http://${HOST}:5001/fhir/Patient/${PatientID}`, + "GET" + ); - expect(patient.data.link.filter(pat => pat.other.reference.match(`Patient/${PatientID}`)).length).to.equal(1); + expect( + patient.data.link.filter((pat) => + pat.other.reference.match(`Patient/${PatientID}`) + ).length + ).to.equal(1); }); Then("I should get a successful summary response", function () { @@ -96,22 +125,22 @@ Then("I should get a successful everything response", function () { }); Then("a request to fetch data from the cdr should fail", async function () { - await sendRequest(`http://${HOST}:5001/fhir/links/Patient/${PatientID}`).catch(err => { - expect(err.message).to.match(/ECONNREFUSED|socket hang up|ETIMEDOUT/); - }); + await sendRequest(`http://${HOST}:5001/fhir/Patient/${PatientID}`).catch( + (err) => { + expect(err.message).to.match(/ECONNREFUSED|socket hang up|ETIMEDOUT/); + } + ); }); Then("the data should be stored in clickhouse", async function () { await new Promise((resolve) => { - setTimeout(() => resolve(), 20000) + setTimeout(() => resolve(), 20000); }); - const patient = await clickhouse.query( - query("patient_example"), - ).toPromise(); - const observation = await clickhouse.query( - query("observation_example") - ).toPromise(); + const patient = await clickhouse.query(query("patient_example")).toPromise(); + const observation = await clickhouse + .query(query("observation_example")) + .toPromise(); expect(JSON.parse(patient).rows).to.be.greaterThan(0); expect(JSON.parse(observation).rows).to.be.greaterThan(0); From 4da745e1e089a430a62c3a2b1aad35e264988643 Mon Sep 17 00:00:00 2001 From: drono Date: Thu, 16 May 2024 06:34:15 +0300 Subject: [PATCH 2/9] Fix failing tests --- fhir-ig-importer/docker-compose.yml | 2 ++ fhir-ig-importer/importer/docker-compose.config.yml | 1 + kafka-mapper-consumer/docker-compose.config.yml | 1 + kafka-mapper-consumer/docker-compose.yml | 7 ++++++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/fhir-ig-importer/docker-compose.yml b/fhir-ig-importer/docker-compose.yml index 43c0be1a..1faf0253 100644 --- a/fhir-ig-importer/docker-compose.yml +++ b/fhir-ig-importer/docker-compose.yml @@ -6,6 +6,7 @@ services: networks: hapi-fhir: openhim: + default: environment: HAPI_FHIR_BASE_URL: ${HAPI_FHIR_BASE_URL} HAPI_FHIR_INSTANCES: ${HAPI_FHIR_INSTANCES} @@ -27,4 +28,5 @@ networks: openhim: name: openhim_public external: true + default: diff --git a/fhir-ig-importer/importer/docker-compose.config.yml b/fhir-ig-importer/importer/docker-compose.config.yml index c6398016..0d11921a 100644 --- a/fhir-ig-importer/importer/docker-compose.config.yml +++ b/fhir-ig-importer/importer/docker-compose.config.yml @@ -46,3 +46,4 @@ networks: openhim: name: openhim_public external: true + default: diff --git a/kafka-mapper-consumer/docker-compose.config.yml b/kafka-mapper-consumer/docker-compose.config.yml index 168dd4b8..2e1b4db5 100644 --- a/kafka-mapper-consumer/docker-compose.config.yml +++ b/kafka-mapper-consumer/docker-compose.config.yml @@ -39,3 +39,4 @@ networks: openhim: name: openhim_public external: true + default: diff --git a/kafka-mapper-consumer/docker-compose.yml b/kafka-mapper-consumer/docker-compose.yml index c146a75c..cc031e00 100644 --- a/kafka-mapper-consumer/docker-compose.yml +++ b/kafka-mapper-consumer/docker-compose.yml @@ -21,7 +21,8 @@ services: networks: clickhouse: kafka: - + openhim: + default: kafka-mapper-consumer-ui: image: ${KAFKA_CONSUMER_MAPPER_UI_VERSION} networks: @@ -41,3 +42,7 @@ networks: kafka: name: kafka_public external: true + openhim: + name: openhim_public + external: true + default: From 28902f85f2c55af37b0c29f0194f31e7fe9fcbae Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Thu, 16 May 2024 09:27:55 +0200 Subject: [PATCH 3/9] Add correct assertion THe mpi mediator has been modified and the returned response has a different structure --- test/cucumber/features/steps/recipesSteps.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/cucumber/features/steps/recipesSteps.js b/test/cucumber/features/steps/recipesSteps.js index 8d24c0b3..5785eaf4 100644 --- a/test/cucumber/features/steps/recipesSteps.js +++ b/test/cucumber/features/steps/recipesSteps.js @@ -109,11 +109,7 @@ Then("the patient data in the Jempi client registry", async function () { "GET" ); - expect( - patient.data.link.filter((pat) => - pat.other.reference.match(`Patient/${PatientID}`) - ).length - ).to.equal(1); + expect(patient.data.id).to.be.equal(PatientID); }); Then("I should get a successful summary response", function () { From a9687fd52616227660aa6339a65b3685ac5ffd1e Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Thu, 16 May 2024 09:29:39 +0200 Subject: [PATCH 4/9] Ensure that the entry property in the bundle is always an array --- client-registry-jempi/importer/mapping-mediator/searchAll.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-registry-jempi/importer/mapping-mediator/searchAll.json b/client-registry-jempi/importer/mapping-mediator/searchAll.json index 49134fca..c555e89f 100644 --- a/client-registry-jempi/importer/mapping-mediator/searchAll.json +++ b/client-registry-jempi/importer/mapping-mediator/searchAll.json @@ -9,7 +9,7 @@ }, "inputTransforms": { "total": "$count(lookupRequests.jempiSearchAll.data.goldenRecords)", - "entry": "$map(lookupRequests.jempiSearchAll.data.goldenRecords, function($v) {{'fullUrl': 'Patient/' & $v.goldenId, 'resource': {'resourceType': 'Patient','id': $v.goldenId,'name': {'given': [$v.demographicData.givenName],'family': $v.demographicData.familyName},'address': [{'city': $v.demographicData.city}],'birthDate': $v.demographicData.dob,'telecom': [{'value': $v.demographicData.phoneNumber,'system': 'phone'}],'identifier': [{'system': $v.sourceId.facility,'value': $v.sourceId.patient},{'system': 'NationalID','value': $v.demographicData.nationalId}],'gender': $v.demographicData.gender}}})" + "entry": "$append([], $map(lookupRequests.jempiSearchAll.data.goldenRecords, function($v) {{'fullUrl': 'Patient/' & $v.goldenId, 'resource': {'resourceType': 'Patient','id': $v.goldenId,'name': {'given': [$v.demographicData.givenName],'family': $v.demographicData.familyName},'address': [{'city': $v.demographicData.city}],'birthDate': $v.demographicData.dob,'telecom': [{'value': $v.demographicData.phoneNumber,'system': 'phone'}],'identifier': [{'system': $v.sourceId.facility,'value': $v.sourceId.patient},{'system': 'NationalID','value': $v.demographicData.nationalId}],'gender': $v.demographicData.gender}}}))" }, "inputMapping": { "constants.resourceType": "resourceType", From 29ec53058a2c4cdff108cb81d70db4f1e88a9050 Mon Sep 17 00:00:00 2001 From: drono Date: Thu, 16 May 2024 10:56:50 +0300 Subject: [PATCH 5/9] Fix kafka consumer failing test --- test/cucumber/features/single-mode/kafka-packages.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/cucumber/features/single-mode/kafka-packages.feature b/test/cucumber/features/single-mode/kafka-packages.feature index c37b8f08..6b398d79 100644 --- a/test/cucumber/features/single-mode/kafka-packages.feature +++ b/test/cucumber/features/single-mode/kafka-packages.feature @@ -18,11 +18,11 @@ Feature: Kafka and its dependent packages? And There should be 1 volumes Scenario: Init Kafka Mapper Consumer - Given I use parameters "package init -n=kafka-mapper-consumer --only --dev --env-file=.env.local" + Given I use parameters "package init -n=interoperability-layer-openhim,kafka-mapper-consumer --only --dev --env-file=.env.local" When I launch the platform with params Then The service "kafka-mapper-consumer" should be started with 1 replica And The service "kafka-mapper-consumer" should be connected to the networks - | clickhouse_public | kafka_public | + | clickhouse_public | kafka_public | openhim_public | Scenario: Init Message Bus Kafka Given I use parameters "package init -n=kafka-unbundler-consumer --only --dev --env-file=.env.local" @@ -32,7 +32,7 @@ Feature: Kafka and its dependent packages? | kafka_public | Scenario: Destroy Kafka and its dependent packages - Given I use parameters "package destroy -n=kafka-mapper-consumer,kafka-unbundler-consumer --dev --env-file=.env.local" + Given I use parameters "package destroy -n=kafka-mapper-consumer,kafka-unbundler-consumer,interoperability-layer-openhim --dev --env-file=.env.local" When I launch the platform with params And The service "kafka-01" should be removed And The service "kafdrop" should be removed @@ -43,4 +43,4 @@ Feature: Kafka and its dependent packages? And There should be 0 volume And There should be 0 config And There should not be network - | kafka_public | clickhouse_public | prometheus_public | + | kafka_public | clickhouse_public | prometheus_public | openhim_public | From fa9ad5bf1426b0292bf1ff2a6aea4a39104d5095 Mon Sep 17 00:00:00 2001 From: Ryan Crichton Date: Thu, 16 May 2024 15:33:52 +0200 Subject: [PATCH 6/9] Bump instant version to latest --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 87777566..8667516a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openhie/package-base:2.3.1 +FROM openhie/package-base:2.3.2 # Install yq RUN curl -L https://github.com/mikefarah/yq/releases/download/v4.23.1/yq_linux_amd64 -o /usr/bin/yq From 56abcb3688416207d00976c555f8ea0f8911a1dd Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Fri, 17 May 2024 11:42:48 +0200 Subject: [PATCH 7/9] Add jempi network for the services to communicate This also adds bootstrapper node placement. Has to be on the leader where the commands are run as we run a command in the bootstrapper docker container --- client-registry-jempi/docker-compose.api.yml | 5 +++++ .../docker-compose.combined-cluster.yml | 17 ++++++++++++++++- .../docker-compose.combined.yml | 12 +++++++++++- .../docker-compose.dgraph-zero-cluster.yml | 13 ++++++++++++- .../docker-compose.dgraph-zero.yml | 7 +++++++ client-registry-jempi/docker-compose.dgraph.yml | 13 +++++++++++++ client-registry-jempi/swarm.sh | 11 +++++------ 7 files changed, 69 insertions(+), 9 deletions(-) diff --git a/client-registry-jempi/docker-compose.api.yml b/client-registry-jempi/docker-compose.api.yml index 4cf156de..7d218748 100644 --- a/client-registry-jempi/docker-compose.api.yml +++ b/client-registry-jempi/docker-compose.api.yml @@ -33,6 +33,7 @@ services: reverse-proxy: kafka: default: + jempi: jempi-api-kc: @@ -77,6 +78,7 @@ services: reverse-proxy: kafka: default: + jempi: volumes: @@ -87,6 +89,9 @@ networks: reverse-proxy: name: reverse-proxy_public external: true + jempi: + name: jempi_public + external: true kafka: name: kafka_public external: true diff --git a/client-registry-jempi/docker-compose.combined-cluster.yml b/client-registry-jempi/docker-compose.combined-cluster.yml index ea3bd37d..2781e809 100644 --- a/client-registry-jempi/docker-compose.combined-cluster.yml +++ b/client-registry-jempi/docker-compose.combined-cluster.yml @@ -6,7 +6,13 @@ services: placement: constraints: - "node.labels.name==node-1" - + + jempi-bootstrapper: + deploy: + placement: + constraints: + - "node.labels.name==node-1" + jempi-postgresql-02: image: bitnami/postgresql-repmgr:15.2.0 environment: @@ -36,6 +42,8 @@ services: configs: - target: /docker-entrypoint-initdb.d/jempi_psql_init_db.sql source: jempi_psql_init_db.sql + networks: + jempi: jempi-postgresql-03: image: bitnami/postgresql-repmgr:15.2.0 @@ -66,7 +74,14 @@ services: configs: - target: /docker-entrypoint-initdb.d/jempi_psql_init_db.sql source: jempi_psql_init_db.sql + networks: + jempi: volumes: jempi-psql-02-data: jempi-psql-03-data: + +networks: + jempi: + name: jempi_public + external: true diff --git a/client-registry-jempi/docker-compose.combined.yml b/client-registry-jempi/docker-compose.combined.yml index 3bca3f1e..0e6a1a2b 100644 --- a/client-registry-jempi/docker-compose.combined.yml +++ b/client-registry-jempi/docker-compose.combined.yml @@ -19,6 +19,7 @@ services: networks: kafka: default: + jempi: jempi-etl: @@ -37,6 +38,7 @@ services: networks: kafka: default: + jempi: jempi-controller: @@ -70,6 +72,7 @@ services: networks: kafka: default: + jempi: jempi-linker: @@ -104,6 +107,7 @@ services: networks: kafka: default: + jempi: jempi-bootstrapper: image: jembi/jempi-bootstrapper:${JEMPI_BOOTSTRAPPER_IMAGE_TAG} @@ -124,6 +128,7 @@ services: networks: kafka: default: + jempi: jempi-postgresql-01: image: bitnami/postgresql-repmgr:15.2.0 @@ -151,6 +156,8 @@ services: configs: - target: /docker-entrypoint-initdb.d/jempi_psql_init_db.sql source: jempi_psql_init_db.sql + networks: + jempi: volumes: jempi-psql-01-data: @@ -161,7 +168,10 @@ networks: kafka: name: kafka_public external: true - defualt: + default: + jempi: + name: jempi_public + external: true configs: diff --git a/client-registry-jempi/docker-compose.dgraph-zero-cluster.yml b/client-registry-jempi/docker-compose.dgraph-zero-cluster.yml index 853f7c7f..fe7e61f8 100644 --- a/client-registry-jempi/docker-compose.dgraph-zero-cluster.yml +++ b/client-registry-jempi/docker-compose.dgraph-zero-cluster.yml @@ -7,7 +7,9 @@ services: constraints: - node.labels.name == node-1 command: dgraph zero --my=jempi-zero-01:5080 --replicas 3 --bindall --raft "idx=1" - + networks: + jempi: + jempi-zero-02: image: dgraph/dgraph:v22.0.0 volumes: @@ -25,6 +27,8 @@ services: restart_policy: condition: on-failure command: dgraph zero --my=jempi-zero-02:5080 --replicas 3 --peer=jempi-zero-01:5080 --raft "idx=2" + networks: + jempi: jempi-zero-03: image: dgraph/dgraph:v22.0.0 @@ -43,7 +47,14 @@ services: restart_policy: condition: on-failure command: dgraph zero --my=jempi-zero-03:5080 --replicas 3 --peer=jempi-zero-01:5080 --raft "idx=3" + networks: + jempi: volumes: jempi-zero-02-data: jempi-zero-03-data: + +networks: + jempi: + name: jempi_public + external: true diff --git a/client-registry-jempi/docker-compose.dgraph-zero.yml b/client-registry-jempi/docker-compose.dgraph-zero.yml index ac1974e3..8b8da6d0 100644 --- a/client-registry-jempi/docker-compose.dgraph-zero.yml +++ b/client-registry-jempi/docker-compose.dgraph-zero.yml @@ -15,6 +15,13 @@ services: restart_policy: condition: on-failure command: dgraph zero --my=jempi-zero-01:5080 --replicas 1 + networks: + jempi: volumes: jempi-zero-01-data: + +networks: + jempi: + name: jempi_public + external: true diff --git a/client-registry-jempi/docker-compose.dgraph.yml b/client-registry-jempi/docker-compose.dgraph.yml index 296aff7d..93ada3f7 100644 --- a/client-registry-jempi/docker-compose.dgraph.yml +++ b/client-registry-jempi/docker-compose.dgraph.yml @@ -16,6 +16,8 @@ services: 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: dgraph/dgraph:v22.0.0 @@ -32,6 +34,8 @@ services: 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: dgraph/dgraph:v22.0.0 @@ -48,6 +52,8 @@ services: 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: image: dgraph/ratel:v21.03.2 @@ -61,8 +67,15 @@ services: restart_policy: condition: on-failure command: dgraph-ratel + networks: + jempi: volumes: jempi-alpha-01-data: jempi-alpha-02-data: jempi-alpha-03-data: + +networks: + jempi: + name: jempi_public + external: true diff --git a/client-registry-jempi/swarm.sh b/client-registry-jempi/swarm.sh index 92e57aa2..d1323691 100644 --- a/client-registry-jempi/swarm.sh +++ b/client-registry-jempi/swarm.sh @@ -52,12 +52,11 @@ function initialize_package() { log info "Running package in PROD mode" 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 + 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 1cac0f7a79031b1e3489f2cd99776dd5c73fd489 Mon Sep 17 00:00:00 2001 From: drono Date: Mon, 20 May 2024 08:02:51 +0300 Subject: [PATCH 8/9] fix version and disable cert verification in console. --- config.yaml | 2 +- interoperability-layer-openhim/docker-compose.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index 862a5df6..638db7b1 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,5 @@ projectName: platform -image: jembi/platform:3.0.0-beta +image: jembi/platform:latest logPath: /tmp/logs packages: diff --git a/interoperability-layer-openhim/docker-compose.yml b/interoperability-layer-openhim/docker-compose.yml index 518d93dc..1413642a 100644 --- a/interoperability-layer-openhim/docker-compose.yml +++ b/interoperability-layer-openhim/docker-compose.yml @@ -50,6 +50,8 @@ services: KC_REALM_NAME: ${KC_REALM_NAME} KC_FRONTEND_URL: ${KC_FRONTEND_URL} OPENHIM_CONSOLE_SHOW_LOGIN: ${OPENHIM_CONSOLE_SHOW_LOGIN} + REACT_APP_OPENHIM_API_BASE_URL: ${OPENHIM_API_BASE_URL} + NODE_TLS_REJECT_UNAUTHORIZED: 0 networks: reverse-proxy: keycloak: From 370bd14936c15a2f4e999ce06704e2962901e925 Mon Sep 17 00:00:00 2001 From: bradsawadye Date: Tue, 21 May 2024 12:08:13 +0200 Subject: [PATCH 9/9] Update version for mpi mediator --- mpi-mediator/docker-compose.yml | 2 +- mpi-mediator/package-metadata.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mpi-mediator/docker-compose.yml b/mpi-mediator/docker-compose.yml index 8f39f082..9497ecf8 100644 --- a/mpi-mediator/docker-compose.yml +++ b/mpi-mediator/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.9' services: mpi-mediator: - image: jembi/mpi-mediator:v2.2.0 + image: jembi/mpi-mediator:${MPI_MEDIATOR_VERSION} networks: openhim: kafka: diff --git a/mpi-mediator/package-metadata.json b/mpi-mediator/package-metadata.json index 85c1f07e..ce30f0a9 100644 --- a/mpi-mediator/package-metadata.json +++ b/mpi-mediator/package-metadata.json @@ -7,6 +7,7 @@ "dependencies": ["fhir-datastore-hapi-fhir", "client-registry-jempi"], "environmentVariables": { "MPI_MEDIATOR_INSTANCES": 1, + "MPI_MEDIATOR_VERSION": "v2.3.0", "OPENHIM_MEDIATOR_URL": "https://openhim-core:8080", "TRUST_SELF_SIGNED": "true", "OPENHIM_USERNAME": "root@openhim.org",