This repository has been archived by the owner on Feb 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from PhysiciansDataCollaborative/dev
0.1.2
- Loading branch information
Showing
3 changed files
with
139 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,26 +9,9 @@ | |
BUILD_MODE=prod | ||
|
||
|
||
# Release | ||
# | ||
RELEASE_VERSION=0.1.1 | ||
|
||
|
||
# Hub external IP/Address (10.0.2.2 for Vagrant/VirtualBox) | ||
# | ||
URL_HUB=hub.pdc.io | ||
|
||
|
||
# Notification addresses | ||
# | ||
EMAIL_ERRORS=[email protected] | ||
|
||
|
||
# ownCloud backup details | ||
# | ||
OWNCLOUD_ID=hub.pdc.io | ||
OWNCLOUD_PW= | ||
OWNCLOUD_URL= | ||
URL_HUB=10.0.2.2 | ||
|
||
|
||
# GitHub branch overrides | ||
|
@@ -37,15 +20,22 @@ OWNCLOUD_URL= | |
# | ||
# (Note: do not leave blank values!) | ||
# | ||
#BRANCH_AUTH=master | ||
#BRANCH_DCLAPI=master | ||
#BRANCH_ENDPOINT=master | ||
#BRANCH_EP=master | ||
#BRANCH_HAPI=master | ||
#BRANCH_HUB=master | ||
#BRANCH_HUBDB=master | ||
#BRANCH_QI=master | ||
#BRANCH_VIZ=master | ||
BRANCH_AUTH=0.1.2 | ||
BRANCH_DCLAPI=0.1.1 | ||
BRANCH_ENDPOINT=0.1.2 | ||
BRANCH_EPXCLOUD=0.1.1 | ||
BRANCH_HAPI=0.1.2 | ||
BRANCH_HUB=0.1.1 | ||
BRANCH_HUBDB=0.1.2 | ||
BRANCH_QI=0.1.1 | ||
BRANCH_VIZ=0.1.2 | ||
|
||
|
||
# ownCloud backup details | ||
# | ||
OWNCLOUD_ID=hub.pdc.io | ||
OWNCLOUD_PW=<password> | ||
OWNCLOUD_URL=<https://...> | ||
|
||
|
||
# DACS | ||
|
@@ -60,6 +50,11 @@ DACS_JURISDICTION=TEST | |
PATH_HOST=/pdc/data | ||
|
||
|
||
# Notification addresses | ||
# | ||
EMAIL_ERRORS=[email protected] | ||
|
||
|
||
# Node.js | ||
# | ||
NODE_TLS_REJECT_UNAUTHORIZED=0 | ||
|
@@ -118,46 +113,47 @@ URL_DCLAPI=http://dclapi:3007 | |
|
||
# Host data folders | ||
# | ||
PATH_HUB_AUTHKEYS=${PATH_HOST}/hub/etc/ssh | ||
PATH_HUB_AUTOSSH=${PATH_HOST}/hub/home/autossh/DOTssh | ||
PATH_HUB_AUTHKEYS=${PATH_HOST}/hub/etc/ssh/ | ||
PATH_HUB_AUTOSSH=${PATH_HOST}/hub/home/autossh/DOTssh/ | ||
PATH_EPX_AUTOSSH=${PATH_HOST}/epx/root/DOTssh/ | ||
PATH_CERT=${PATH_HOST}/cert | ||
PATH_DACS=${PATH_HOST}/dacs | ||
PATH_MONGO=${PATH_HOST}/mongo | ||
PATH_DRUGREF=${PATH_HOST}/drugref | ||
PATH_CERT=${PATH_HOST}/cert/ | ||
PATH_DACS=${PATH_HOST}/dacs/ | ||
PATH_MONGO_DB=${PATH_HOST}/mongo/db/ | ||
PATH_MONGO_DUMP=${PATH_HOST}/mongo/dump/ | ||
PATH_DRUGREF=${PATH_HOST}/drugref/ | ||
|
||
|
||
# DACS | ||
# | ||
DACS_KEYFILE=${DACS_STOREDIR}/federations/pdc.dev/federation_keyfile | ||
DACS_ROLEFILE=${DACS_STOREDIR}/federations/pdc.dev/roles | ||
DACS_KEYFILE=/etc/dacs/federations/pdc.dev/federation_keyfile | ||
DACS_ROLEFILE=/etc/dacs/federations/pdc.dev/roles | ||
|
||
|
||
# Containers | ||
# | ||
DOCKER_AUTH_PRODUCTION=-v ${PATH_DACS}:${DACS_STOREDIR}/:rw | ||
DOCKER_AUTH_DEV_APPEND=-p ${PORT_AUTH_M}:${PORT_AUTH_M} -p ${PORT_AUTH_C}:${PORT_AUTH_C} | ||
DOCKER_AUTH_PROD=-v ${PATH_DACS}:${DACS_STOREDIR}/:rw | ||
DOCKER_AUTH_SUPPLEMENT=-p ${PORT_AUTH_M}:${PORT_AUTH_M} -p ${PORT_AUTH_C}:${PORT_AUTH_C} | ||
# | ||
DOCKER_DCLAPI_PRODUCTION=-v ${PATH_DRUGREF}:/app/drugref/ | ||
DOCKER_DCLAPI_DEV_APPEND=-p ${PORT_DACS}:${PORT_DACS} | ||
DOCKER_DCLAPI_PROD=-v ${PATH_DRUGREF}:/app/drugref/ | ||
DOCKER_DCLAPI_JOIN=-p ${PORT_DACS}:${PORT_DACS} | ||
# | ||
DOCKER_ENDPOINT_PRODUCTION=-v $(PATH_EPX_AUTOSSH):/root/.ssh/:rw | ||
DOCKER_ENDPOINT_DEV_APPEND= | ||
DOCKER_ENDPOINT_PROD=-v $(PATH_EPX_AUTOSSH):/root/.ssh/:rw | ||
DOCKER_ENDPOINT_JOIN= | ||
# | ||
DOCKER_EPXCLOUD_PRODUCTION=-v $(PATH_EPX_AUTOSSH):/root/.ssh/:ro | ||
DOCKER_EPXCLOUD_DEV_APPEND= | ||
DOCKER_EPXCLOUD_PROD=-v $(PATH_EPX_AUTOSSH):/root/.ssh/:ro | ||
DOCKER_EPXCLOUD_JOIN= | ||
# | ||
DOCKER_HAPI_PRODUCTION=--link auth:auth --link hubdb:hubdb --link dclapi:dclapi | ||
DOCKER_HAPI_DEV_APPEND=-p ${PORT_HAPI}:${PORT_HAPI} | ||
DOCKER_HAPI_PROD=--link auth:auth --link hubdb:hubdb --link dclapi:dclapi | ||
DOCKER_HAPI_JOIN=-p ${PORT_HAPI}:${PORT_HAPI} | ||
# | ||
DOCKER_HUB_PRODUCTION=--link hubdb:hubdb -v ${PATH_HUB_AUTOSSH}:/home/autossh/.ssh/:rw -v ${PATH_HUB_AUTHKEYS}:/etc/ssh/:rw -p ${PORT_AUTOSSH}:22 -p ${PORT_HUB_WEB}:3002 | ||
DOCKER_HUB_DEV_APPEND= | ||
DOCKER_HUB_PROD=--link hubdb:hubdb -v ${PATH_HUB_AUTOSSH}:/home/autossh/.ssh/:rw -v ${PATH_HUB_AUTHKEYS}:/etc/ssh/:rw -p ${PORT_AUTOSSH}:22 -p ${PORT_HUB_WEB}:3002 | ||
DOCKER_HUB_JOIN= | ||
# | ||
DOCKER_HUBDB_PRODUCTION=-v ${PATH_MONGO}:/data/:rw | ||
DOCKER_HUBDB_DEV_APPEND=-p ${PORT_MONGO}:27017 | ||
DOCKER_HUBDB_PROD=-v ${PATH_MONGO_DB}:/data/db/:rw -v ${PATH_MONGO_DUMP}:/data/dump/:rw | ||
DOCKER_HUBDB_JOIN=-p ${PORT_MONGO}:27017 | ||
# | ||
DOCKER_QI_PRODUCTION=--link hubdb:hubdb | ||
DOCKER_QI_DEV_APPEND= | ||
DOCKER_QI_PROD=--link hubdb:hubdb | ||
DOCKER_QI_JOIN= | ||
# | ||
DOCKER_VIZ_PRODUCTION=--link auth:auth --link hapi:hapi -p 80:${PORT_VIZ} -p 443:${PORT_VIZ} -v ${PATH_CERT}:/app/cert/:ro | ||
DOCKER_VIZ_DEV_APPEND=-p ${PORT_VIZ}:${PORT_VIZ} | ||
DOCKER_VIZ_PROD=--link auth:auth --link hapi:hapi -p 443:${PORT_VIZ} -v ${PATH_CERT}:/app/cert/:ro | ||
DOCKER_VIZ_JOIN=-p ${PORT_VIZ}:${PORT_VIZ} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
# | ||
# | ||
set -e -o nounset | ||
|
||
|
||
# Expected input | ||
# | ||
# $0 this script | ||
# $1 Endpoint # | ||
# $2 Doctor ID | ||
|
||
|
||
# Check parameters | ||
# | ||
if([ $# -lt 2 ] || [ $# -gt 3 ]) | ||
then | ||
echo "" | ||
echo "Unexpected number of parameters." | ||
echo "" | ||
echo "Usage: viz_add.sh [endpointNumber] [doctorID] [more soon!]" | ||
echo "" | ||
exit | ||
fi | ||
|
||
|
||
# Set variables from parameters | ||
# | ||
export EP_NUM=$(printf "%04d" ${1}) | ||
export EP_NAME=pdc-${EP_NUM} | ||
export DOCTOR=${2} | ||
|
||
|
||
# Add Endpoint to the HubDB | ||
# | ||
#sudo docker exec hubdb /app/endpoint_add.sh $1 | grep WriteResult | ||
|
||
|
||
# Get ClinicID (Endpoint's MongoDB ObjectID) and provide it to Auth | ||
# | ||
sudo docker exec -ti auth /sbin/setuser app /app/dacs_add.sh \ | ||
${DOCTOR} $(sudo docker exec hubdb /app/endpoint_getClinicID.sh ${EP_NUM}) \ | ||
${EP_NAME} admin TEST sample |