Interoperability Layer - OpenHIM
The Interoperability Layer is the base of the Platform architecture.
This component consists of two services:
- Interoperability Layer - OpenHIM
Accessing the services
OpenHIM
- Console: http://localhost:9000
- Username: root@openhim.org
- Password: instant101
Testing the Interoperability Component
As part of the Interoperability Layer setup we also do some initial config import for connecting the services together.
- OpenHIM: Import a channel configuration that routes requests to the Data Store - HAPI FHIR service
Backup restore
Single node
The following job may be used to set up a backup job for a single node mongo
[job-run "mongo-backup"]
schedule= @every 24h
image= mongo:4.2
network= mongo_backup
volume= /backups:/tmp/backups
command= sh -c 'mongodump --uri=${OPENHIM_MONGO_URL} --gzip --archive=/tmp/backups/mongodump_$(date +%s).gz'
delete= true
Cluster
The following job may be used to set up a backup job for clustered mongo
[job-run "mongo-backup"]
schedule= @every 24h
image= mongo:4.2
network= mongo_backup
volume= /backups:/tmp/backups
command= sh -c 'mongodump --uri=${OPENHIM_MONGO_URL} --gzip --archive=/tmp/backups/mongodump_$(date +%s).gz'
delete= true
Restore
In order to restore from a backup you would need to launch a mongo container with access to the backup file and the mongo_backup network:
docker run -d --network=mongo_backup --mount type=bind,source=/backups,target=/backups mongo:4.2
Then exec into the container and run mongorestore:
mongorestore --uri="mongodb://mongo-1:27017,mongo-2:27017,mongo-3:27017/openhim?replicaSet=mongo-set" --gzip --archive=/backups/<NAME_OF_BACKUP_FILE>