Skip to content

Commit fa95e7a

Browse files
Merge branch 'main' into PLAT-663-run-tests-sh-bug-fix
2 parents 08dc394 + 5d6bbe0 commit fa95e7a

30 files changed

+544
-570
lines changed

.github/workflows/main.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
run: ./get-cli.sh
2121

2222
- name: Test binaries
23-
run: ./platform-linux help
23+
run: ./instant-linux help
2424

2525
- name: Release
2626
uses: softprops/action-gh-release@v1
2727
with:
2828
files: |
29-
./platform-linux
30-
./platform-macos
31-
./platform.exe
29+
./instant-linux
30+
./instant-macos
31+
./instant.exe
3232
./config.yml
3333
./banner.txt

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@ typings/
8181
platform-linux
8282
platform.exe
8383
platform-macos
84+
instant-linux
85+
instant.exe
86+
instant-macos

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
1. Initialise Docker Swarm mode: `docker swarm init`
1515
1. Run `go cli` binary to launch the project:
1616

17-
- **Linux**. From terminal run: `./platform-linux`
18-
- Mac. From terminal run: `./platform-macos`
17+
- **Linux**. From terminal run: `./instant-linux` with your selected arguments. A list of available arguments can be found in the help menu by running `./instant-linux help`
18+
- Mac. From terminal run: `./instant-macos` with your selected arguments. A list of available arguments can be found in the help menu by running `./instant-macos help`
1919
> Warning: Mac has an issue with the binary as it views the file as a security risk. See [this article](https://www.lifewire.com/fix-developer-cannot-be-verified-error-5183898) to bypass warning
20-
- Windows. Double click: `platform.exe`
21-
1. Choose your options and deploy!
20+
- Windows. Double click: `platform.exe` (Windows users will need to use a release version below 2.0.0)
2221

2322
## Quick Start for devs (remote cluster)
2423

@@ -30,17 +29,13 @@ To set up a remote cluster environment, see [readme](https://github.com/jembi/cl
3029

3130
> Each Package contains a `metadata.json` file which lists the configurable Env vars and their default values
3231
33-
1. Run `go cli` binary to launch the project (*Make sure to add the `DOCKER_HOST` variable indicating your **lead Swarm manager***, i.e. DOCKER_HOST=ssh://{lead_ip} ./platform-linux):
32+
1. Run `go cli` binary to launch the project (*Make sure to add the `DOCKER_HOST` variable indicating your **lead Swarm manager***, i.e. DOCKER_HOST=ssh://{lead_ip} ./instant-linux):
3433

35-
1. Check the current cli version in `./get-cli.sh` and run to download binaries
36-
- **Linux**. From terminal run: `./platform-linux`
37-
- Mac. From terminal run: `./platform-macos`
38-
> Warning: Mac has an issue with the binary as it views the file as a security risk
39-
- Windows. Double click: `platform.exe`
40-
41-
1. Choose the **Custom Setup** option
42-
1. Specify your environment variable file (or type them all out :| )
43-
1. Add your package IDs, etc. and deploy!
34+
1. Check the current cli version in `./get-cli.sh` and run to download the binaries. This script can be run with the OS as the first parameter to download only the binary for your prefered OS.
35+
- **Linux**. From terminal run: `./instant-linux` with your selected arguments. A list of available arguments can be found in the help menu by running `./instant-linux help`
36+
- Mac. From terminal run: `./instant-macos` with your selected arguments. A list of available arguments can be found in the help menu by running `./instant-macos help`
37+
> Warning: Mac has an issue with the binary as it views the file as a security risk. See [this article](https://www.lifewire.com/fix-developer-cannot-be-verified-error-5183898) to bypass warning
38+
- Windows. Double click: `platform.exe` (Windows users will need to use a release version below 2.0.0)
4439

4540
## Go Cli Dev
4641

@@ -56,7 +51,7 @@ The Go Cli runs all services from the `jembi/platform` docker image. When develo
5651
./build-image.sh
5752
```
5853

59-
As you add new packages to the platform remember to list them in `config.yml` file. This config file controls what packages the Go Cli can launch from the UI.
54+
As you add new packages to the platform remember to list them in `config.yaml` file. This config file controls what packages the GO CLI can launch.
6055

6156
For logging all output to a file, ensure that you have created the file and it has the required permissions to be written to.
6257
The default log file with it's path is set in `.env.local` in `BASHLOG_FILE_PATH`.

config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
projectName: platform
2+
image: jembi/platform
3+
logPath: /tmp/logs
4+
5+
packages:
6+
- interoperability-layer-openhim
7+
- reverse-proxy-nginx
8+
- fhir-datastore-hapi-fhir
9+
- message-bus-kafka
10+
- analytics-datastore-elastic-search
11+
- dashboard-visualiser-kibana
12+
- data-mapper-logstash
13+
- dashboard-visualiser-jsreport
14+
- client-registry-santempi
15+
- message-bus-helper-hapi-proxy
16+
- job-scheduler-ofelia
17+
- kafka-mapper-consumer
18+
- kafka-unbundler-consumer
19+
- analytics-datastore-clickhouse
20+
- dashboard-visualiser-superset
21+
- monitoring
22+
- mpi-mediator
23+
- client-registry-jempi
24+
- identity-access-manager-keycloak
25+
- openhim-mapping-mediator

config.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

documentation/disaster-recovery-process/hapi-fhir-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ After running the preliminary steps, run the following commands on the node host
7474
docker exec -t <postgres_leader_container_id> pg_ctl start -D /bitnami/postgresql/data
7575
```
7676
8. Do a `down` of `fhir-datastore-hapi-fhir` using the CLI binary\
77-
Example: `./platform-linux down fhir-datastore-hapi-fhir env-file=.env.*`
77+
Example: `./instant-linux package down -n=fhir-datastore-hapi-fhir --env-file=.env.*`
7878
9. Wait for the `down` operation to complete
7979
10. Do an `init` of `fhir-datastore-hapi-fhir` using the CLI binary\
80-
Example: `./platform-linux init fhir-datastore-hapi-fhir env-file=.env.*`
80+
Example: `./instant-linux package init -n=fhir-datastore-hapi-fhir --env-file=.env.*`
8181
8282
Postgres should now be recovered
8383

fhir-datastore-hapi-fhir/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ To start up Hapi FHIR and ensure that the backups can be made, ensure that you h
9292

9393
Preliminary steps:
9494

95-
1. Do a `destroy` of `fhir-datastore-hapi-fhir` using the CLI binary (./platform-linux for linux)
95+
1. Do a `destroy` of `fhir-datastore-hapi-fhir` using the CLI binary (./instant-linux for linux)
9696
1. Make sure the Postgres volumes on nodes other than the swarm leader have been removed as well! You will need to ssh into each server and manually remove them.
9797
1. Do an `init` of `fhir-datastore-hapi-fhir` using the CLI binary
9898

get-cli.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@ cli_version=${2:-latest}
66
case ${option} in
77
linux)
88
echo "Downloading linux binary version: ${cli_version}"
9-
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/gocli-linux -o platform-linux
10-
chmod +x ./platform-linux
9+
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/instant-linux -o instant-linux
10+
chmod +x ./instant-linux
1111
exit 0
1212
;;
1313
macos)
1414
echo "Downloading macos binary version: ${cli_version}"
15-
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/gocli-macos -o platform-macos
16-
chmod +x ./platform-macos
15+
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/instant-macos -o instant-macos
16+
chmod +x ./instant-macos
1717
exit 0
1818
;;
1919
windows)
2020
echo "Downloading windows binary version: ${cli_version}"
21-
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/gocli.exe -o platform.exe
22-
chmod +x ./platform.exe
21+
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/instant.exe -o instant.exe
22+
chmod +x ./instant.exe
2323
exit 0
2424
;;
2525
all)
2626
echo "Downloading all binaries, version: ${cli_version}"
27-
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/gocli-linux -o platform-linux
28-
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/gocli-macos -o platform-macos
29-
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/gocli.exe -o platform.exe
30-
chmod +x ./platform-linux
31-
chmod +x ./platform-macos
32-
chmod +x ./platform.exe
27+
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/instant-linux -o instant-linux
28+
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/instant-macos -o instant-macos
29+
curl -L https://github.com/openhie/package-starter-kit/releases/download/"$cli_version"/instant.exe -o instant.exe
30+
chmod +x ./instant-linux
31+
chmod +x ./instant-macos
32+
chmod +x ./instant.exe
3333
exit 0
3434
;;
3535
--help)
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
Feature: Analytics Datastore Clickhouse?
22
Does the Analytics Datastore Clickhouse package work as expected
33

4-
Scenario: Init Analytics Datastore Clickhouse
5-
Given I use parameters "init analytics-datastore-clickhouse --dev --env-file=.env.cluster"
6-
When I launch the platform with params
7-
Then The service "analytics-datastore-clickhouse-01" should be started with 1 replica
8-
And The service "analytics-datastore-clickhouse-02" should be started with 1 replica
9-
And The service "analytics-datastore-clickhouse-03" should be started with 1 replica
10-
And The service "analytics-datastore-clickhouse-04" should be started with 1 replica
11-
And The service "clickhouse-config-importer" should be removed
12-
And There should be 4 services
4+
Scenario: Init Analytics Datastore Clickhouse
5+
Given I use parameters "package init -n=analytics-datastore-clickhouse --dev --env-file=.env.cluster"
6+
When I launch the platform with params
7+
Then The service "analytics-datastore-clickhouse-01" should be started with 1 replica
8+
And The service "analytics-datastore-clickhouse-02" should be started with 1 replica
9+
And The service "analytics-datastore-clickhouse-03" should be started with 1 replica
10+
And The service "analytics-datastore-clickhouse-04" should be started with 1 replica
11+
And The service "clickhouse-config-importer" should be removed
12+
And There should be 4 services
1313

14-
Scenario: Destroy Analytics Datastore Clickhouse
15-
Given I use parameters "destroy analytics-datastore-clickhouse --dev --env-file=.env.cluster"
16-
When I launch the platform with params
17-
Then The service "analytics-datastore-clickhouse-01" should be removed
18-
And The service "analytics-datastore-clickhouse-02" should be removed
19-
And The service "analytics-datastore-clickhouse-03" should be removed
20-
And The service "analytics-datastore-clickhouse-04" should be removed
21-
And There should be 0 service
22-
And There should be 0 volume
23-
And There should be 0 config
14+
Scenario: Destroy Analytics Datastore Clickhouse
15+
Given I use parameters "package destroy -n=analytics-datastore-clickhouse --dev --env-file=.env.cluster"
16+
When I launch the platform with params
17+
Then The service "analytics-datastore-clickhouse-01" should be removed
18+
And The service "analytics-datastore-clickhouse-02" should be removed
19+
And The service "analytics-datastore-clickhouse-03" should be removed
20+
And The service "analytics-datastore-clickhouse-04" should be removed
21+
And There should be 0 service
22+
And There should be 0 volume
23+
And There should be 0 config
Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
11
Feature: Analytics Datastore Elasticsearch - Dashboard Visualiser Kibana - Data Mapper Logstash ?
22
Does the ELK stack work as expected
33

4-
Scenario: Init Dashboard Visualiser Kibana
5-
Given I use parameters "init dashboard-visualiser-kibana --dev --env-file=.env.cluster"
6-
When I launch the platform with params
7-
Then The service "analytics-datastore-elastic-search-01" should be started with 1 replica
8-
And The service "analytics-datastore-elastic-search-02" should be started with 1 replica
9-
And The service "analytics-datastore-elastic-search-03" should be started with 1 replica
10-
And The service "dashboard-visualiser-kibana" should be started with 1 replica
11-
And The service "elastic-search-config-importer" should be removed
12-
And The service "kibana-config-importer" should be removed
13-
And There should be 4 services
14-
And The service "dashboard-visualiser-kibana" should have healthy containers
4+
Scenario: Init Dashboard Visualiser Kibana
5+
Given I use parameters "package init -n=dashboard-visualiser-kibana --dev --env-file=.env.cluster"
6+
When I launch the platform with params
7+
Then The service "analytics-datastore-elastic-search-01" should be started with 1 replica
8+
And The service "analytics-datastore-elastic-search-02" should be started with 1 replica
9+
And The service "analytics-datastore-elastic-search-03" should be started with 1 replica
10+
And The service "dashboard-visualiser-kibana" should be started with 1 replica
11+
And The service "elastic-search-config-importer" should be removed
12+
And The service "kibana-config-importer" should be removed
13+
And There should be 4 services
14+
And The service "dashboard-visualiser-kibana" should have healthy containers
1515

16-
Scenario: Init Data Mapper Logstash
17-
Given I use parameters "init data-mapper-logstash --dev --only --env-file=.env.cluster"
18-
When I launch the platform with params
19-
And The service "data-mapper-logstash" should be started with 3 replicas
20-
And There should be 5 services
21-
And The service "data-mapper-logstash" should have healthy containers
22-
23-
Scenario: Destroy ELK stack
24-
Given I use parameters "destroy dashboard-visualiser-kibana data-mapper-logstash --dev --env-file=.env.cluster"
25-
When I launch the platform with params
26-
Then The service "analytics-datastore-elastic-search-01" should be removed
27-
And The service "analytics-datastore-elastic-search-02" should be removed
28-
And The service "analytics-datastore-elastic-search-03" should be removed
29-
And The service "dashboard-visualiser-kibana" should be removed
30-
And The service "data-mapper-logstash" should be removed
31-
And There should be 0 service
32-
And There should be 0 volume
33-
And There should be 0 config
16+
Scenario: Init Data Mapper Logstash
17+
Given I use parameters "package init -n=data-mapper-logstash --dev --only --env-file=.env.cluster"
18+
When I launch the platform with params
19+
And The service "data-mapper-logstash" should be started with 3 replicas
20+
And There should be 5 services
21+
And The service "data-mapper-logstash" should have healthy containers
3422

23+
Scenario: Destroy ELK stack
24+
Given I use parameters "package destroy -n=dashboard-visualiser-kibana,data-mapper-logstash --dev --env-file=.env.cluster"
25+
When I launch the platform with params
26+
Then The service "analytics-datastore-elastic-search-01" should be removed
27+
And The service "analytics-datastore-elastic-search-02" should be removed
28+
And The service "analytics-datastore-elastic-search-03" should be removed
29+
And The service "dashboard-visualiser-kibana" should be removed
30+
And The service "data-mapper-logstash" should be removed
31+
And There should be 0 service
32+
And There should be 0 volume
33+
And There should be 0 config

0 commit comments

Comments
 (0)