Skip to content

Commit

Permalink
Merge pull request #35 from bento-platform/qa/v2.5
Browse files Browse the repository at this point in the history
v2.5.4 rc-1
  • Loading branch information
brouillette committed Apr 1, 2022
2 parents 36e367b + 0d6873f commit 6ec5ecc
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 37 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -269,29 +269,30 @@ run-drs-dev:


#>>>
# run a specified service
# run a specific service
#<<<
run-%:
@if [[ $* == gateway ]]; then \
echo "Setting up gateway prerequisites"; \
envsubst < ./lib/gateway/nginx.conf.tpl > ./lib/gateway/nginx.conf.pre; \
if [[ ${BENTOV2_USE_EXTERNAL_IDP} == 1 ]]; then \
echo "Fine tuning nginx.conf to use an External IDP"; \
sed '/-- Internal IDP Starts Here --/,/-- Internal IDP Ends Here --/d' ./lib/gateway/nginx.conf.pre > ./lib/gateway/nginx.conf; \
sed -i '/-- Internal IDP Starts Here --/,/-- Internal IDP Ends Here --/d' ./lib/gateway/nginx.conf.pre; \
else \
echo "Fine tuning nginx.conf to use an Internal IDP"; \
cat ./lib/gateway/nginx.conf.pre > ./lib/gateway/nginx.conf; \
fi && \
if [[ ${BENTOV2_USE_BENTO_PUBLIC} == 1 ]]; then \
echo "Fine tuning nginx.conf to use Bento-Public"; \
\
sed '/-- Do Not Use Bento-Public Starts Here --/,/-- Do Not Use Bento-Public Ends Here --/d' ./lib/gateway/nginx.conf.pre > ./lib/gateway/nginx.conf; \
sed -i '/-- Do Not Use Bento-Public Starts Here --/,/-- Do Not Use Bento-Public Ends Here --/d' ./lib/gateway/nginx.conf.pre; \
else \
echo "Fine tuning nginx.conf to disable Bento-Public"; \
\
sed '/-- Use Bento-Public Starts Here --/,/-- Use Bento-Public Ends Here --/d' ./lib/gateway/nginx.conf.pre > ./lib/gateway/nginx.conf; \
sed -i '/-- Use Bento-Public Starts Here --/,/-- Use Bento-Public Ends Here --/d' ./lib/gateway/nginx.conf.pre; \
\
fi && \
cat ./lib/gateway/nginx.conf.pre > ./lib/gateway/nginx.conf; \
rm ./lib/gateway/nginx.conf.pre; \
elif [[ $* == web ]]; then \
echo "Cleaning web before running"; \
Expand Down
103 changes: 101 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,114 @@ The Makefile contains a set of tools to faciliate testing, development, and depl

## Installation

### Setup configuration file
### Provision configuration files
First, run --

```
cp ./etc/bento.env .env
cp ./etc/katsu.config.example.json ./lib/katsu/config.json
```

And fill the `XXX_USER` and `XXX_PASSWORD` variables with custom values.
-then modify the values as seen applicable..
For example;

```
.env
BENTOV2_DOMAIN=bentov2.local
BENTOV2_PORTAL_DOMAIN=portal.${BENTOV2_DOMAIN}
BENTOV2_AUTH_DOMAIN=bentov2auth.local
MODE=dev
BENTOV2_USE_EXTERNAL_IDP=0
BENTOV2_USE_BENTO_PUBLIC=1
BENTOV2_PRIVATE_MODE=false
BENTOV2_ROOT_DATA_DIR=~/bentov2/data
```
If the internal IdP is being used (by default, Keycloak), credential variables should also be provided

```
BENTOV2_AUTH_ADMIN_USER=testadmin
BENTOV2_AUTH_ADMIN_PASSWORD=testpassword123
BENTOV2_AUTH_TEST_USER=testuser
BENTOV2_AUTH_TEST_PASSWORD=testpassword123
```
Otherwise, adjust the following AUTH variables according to the extenal IdP's specifications;
```
BENTOV2_AUTH_CLIENT_ID=local_bentov2
BENTOV2_AUTH_REALM=bentov2
BENTOV2_AUTH_WELLKNOWN_PATH=/auth/realms/${BENTOV2_AUTH_REALM}/.well-known/openid-configuration
```

```
./lib/katsu/config.json
{
"age": {
"type": "number",
"title": "Age",
"bin_size": 10,
"is_range": true,
"queryable": true,
"taper_left": 40,
"taper_right": 60,
"units": "years",
"minimum": 0,
"description": "Age at arrival"
},
"sex": {
"type": "string",
"enum": [
"Male",
"Female"
],
"title": "Sex",
"queryable": true,
"description": "Sex at birth"
},
"extra_properties": {
"date_of_consent": {
"type": "string",
"format": "date",
"title": "Consent date",
"chart": "bar",
"queryable": true
},
"smoking": {
"type": "string",
"enum": [
"Non-smoker",
"Smoker",
"Former smoker",
"Passive smoker",
"Not specified"
],
"title": "Smoking",
"queryable": true,
"description": "Smoking status"
},
"lab_test_result_value": {
"type": "number",
"title": "Lab Test Result",
"bin_size": 50,
"is_range": true,
"queryable": true,
"taper_left": 50,
"taper_right": 800,
"units": "mg/L",
"minimum": 0,
"maximum": 999,
"description": ""
}
}
}
```

### Create self-signed TLS certificates

Expand Down
86 changes: 55 additions & 31 deletions etc/katsu.config.example.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,60 @@
{
"age": {
"type": "number",
"title": "Age",
"bin_size": 10,
"is_range": true,
"queryable": true,
"taper_left": 40,
"taper_right": 60,
"units": "years",
"minimum": 0,
"description": "Age at arrival"
},
"sex": {
"type": "array",
"items": {
"type": "string",
"enum": ["male", "female"]
},
"title": "Sex"
"type": "string",
"enum": [
"Male",
"Female"
],
"title": "Sex",
"queryable": true,
"description": "Sex at birth"
},
"extra_properties": {
"age": {
"type": "range",
"title": "Age"
},
"disease.label": {
"type": "string",
"title": "Disease"
},
"covidstatus": {
"type": "array",
"items": {
"type": "string",
"enum": ["positive", "negative", "indeterminate"]
},
"title": "Covid Status"
},
"smoking": {
"type": "array",
"items": {
"type": "string",
"enum": ["smoker", "former smoker", "non-smoker", "not specified"]
},
"title": "Smoking"
}
"date_of_consent": {
"type": "string",
"format": "date",
"title": "Consent date",
"chart": "bar",
"queryable": true
},
"smoking": {
"type": "string",
"enum": [
"Non-smoker",
"Smoker",
"Former smoker",
"Passive smoker",
"Not specified"
],
"title": "Smoking",
"queryable": true,
"description": "Smoking status"
},
"lab_test_result_value": {
"type": "number",
"title": "Lab Test Result",
"bin_size": 50,
"is_range": true,
"queryable": true,
"taper_left": 50,
"taper_right": 800,
"units": "mg/L",
"minimum": 0,
"maximum": 999,
"description": ""
}
}
}
}

0 comments on commit 6ec5ecc

Please sign in to comment.