Skip to content

Commit

Permalink
Merge pull request #48 from yatharthranjan/dev
Browse files Browse the repository at this point in the history
Integrated the Redcap -integration web app into the stack
  • Loading branch information
afolarin authored Sep 25, 2017
2 parents 81388ee + 9d25c6a commit c5ba936
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dcompose-stack/radar-cp-hadoop-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

## Configuration

First move `etc/env.template` file to `./.env` and check and modify all its variables. To have a valid HTTPS connection for a public host, set `SELF_SIGNED_CERT=no`.
First move `etc/env.template` file to `./.env` and check and modify all its variables. To have a valid HTTPS connection for a public host, set `SELF_SIGNED_CERT=no`. You need to provide a public valid DNS name as `SERVER_NAME` for SSL certificate to work. IP addresses will not work.

Modify `etc/smtp.env.template` to set a SMTP host to send emails with, and move it to `etc/smtp.env`. The configuration settings are passed to a [namshi/smtp](https://hub.docker.com/r/namshi/smtp/) Docker container. This container supports a.o. regular SMTP and GMail.

Modify the `etc/redcap-integration/radar.yml.template` to configure the properties of Redcap instance and the management portal, and move it to `etc/redcap-integration/radar.yml`. For reference on cofiguration of this file look at the Readme file here - https://github.com/RADAR-CNS/RADAR-RedcapIntegration#configuration
In the REDcap portal under Project Setup, define the Data Trigger as `https://<YOUR_HOST_URL>/redcapint/trigger`

Finally, move `etc/radar.yml.template` to `etc/radar.yml` and edit it, especially concerning the monitor email address configuration.

## Usage
Expand Down
27 changes: 26 additions & 1 deletion dcompose-stack/radar-cp-hadoop-stack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ networks:
hotstorage:
driver: bridge
internal: true
redcap:
driver: bridge
internal: true

volumes:
kafka-1-data: {}
Expand Down Expand Up @@ -205,6 +208,26 @@ services:
timeout: 5s
retries: 3


#---------------------------------------------------------------------------#
# RADAR REDCap Integration #
#---------------------------------------------------------------------------#
radar-integration:
image: radarcns/radar-redcapintegration:latest
networks:
- redcap
- default
#depends_on:
#- hotstorage
restart: always
volumes:
- "./etc/redcap-integration:/usr/local/tomcat/conf/radar"
healthcheck:
test: ["CMD", "curl", "-IX", "POST", "http://localhost:8080/redcap/trigger"]
interval: 1m
timeout: 5s
retries: 3

#---------------------------------------------------------------------------#
# RADAR Dashboard #
#---------------------------------------------------------------------------#
Expand Down Expand Up @@ -410,7 +433,7 @@ services:
restart: always
environment:
KAFKA_REST_PROXY: http://rest-proxy-1:8082
TOPIC_LIST: ${RADAR_TOPIC_LIST}
TOPIC_LIST: ${RADAR_TOPIC_LIST}

#---------------------------------------------------------------------------#
# Docker Monitoring #
Expand Down Expand Up @@ -445,6 +468,7 @@ services:
restart: always
networks:
- api
- redcap
- monitor
- default
depends_on:
Expand All @@ -454,6 +478,7 @@ services:
- schema-registry-1
- rest-proxy-1
- dashboard
- radar-integration
ports:
- "80:80"
- "443:443"
Expand Down
4 changes: 4 additions & 0 deletions dcompose-stack/radar-cp-hadoop-stack/etc/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ http {
proxy_pass http://rest-api:8080/radar/api/;
proxy_set_header Host $host;
}
location /redcapint/ {
proxy_pass http://radar-integration:8080/redcap/;
proxy_set_header Host $host;
}
location /frontend/config/ {
proxy_pass http://rest-api:8080/radar/frontend/;
proxy_set_header Host $host;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 0.1-alpha
released: 2017-08-29

# ManagementPortal configuration
oauth_client_id: #OAuth2 clientId used by the webApp for making requests
oauth_client_secret: #OAuth2 client secrete
management_portal_url: #URL pointing Management Portal
token_endpoint: #URL managing tokens
project_endpoint: #URL managing project function
subject_endpoint: #URL managing subject functions

# Set of supported projects
projects:
- redcap_info:
url: #URL pointing REDCap instance
project_id: #REDCap project identifier
enrolment_event: #Unique identifier for the enrolment event
integration_form: #Name of integration REDCap form
token: #REDCap API Token used to identify the REDCap user against the REDCap instance
mp_info:
project_id: #Management Portal project identifier
3 changes: 3 additions & 0 deletions dcompose-stack/radar-cp-hadoop-stack/install-radar-stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ echo "==> Configuring REST-API"
copy_template_if_absent etc/rest-api/radar.yml
copy_template_if_absent etc/rest-api/device-catalog.yml

echo "==> Configuring REDCap-Integration"
copy_template_if_absent etc/redcap-integration/radar.yml

# Set MongoDb credential
inline_variable 'usr:[[:space:]]' $HOTSTORAGE_USERNAME etc/rest-api/radar.yml
inline_variable 'pwd:[[:space:]]' $HOTSTORAGE_PASSWORD etc/rest-api/radar.yml
Expand Down

0 comments on commit c5ba936

Please sign in to comment.