Skip to content

Instantly share code, notes, and snippets.

@code-vagabond
Last active September 5, 2017 13:27
Show Gist options
  • Save code-vagabond/48b43b2ea7cbba54c3e13dd493512a0b to your computer and use it in GitHub Desktop.
Save code-vagabond/48b43b2ea7cbba54c3e13dd493512a0b to your computer and use it in GitHub Desktop.
Configuration guide for the OSSE suite

Use docker-compose to deploy mainzelliste in dev

Table of Contents

Why docker-compose ?

Service structure

Docker installation

Usage guide

Why docker-compose ?

The pseudonymization service which Mainzelliste offers is used as an abstraction upon which new layer of application can be built. Developing application that make use of this pseudonymization service at the time being means to download and configure the whole Mainzelliste Java project which adds an overhead to the developer, who migh not have any domain specific knowledge of Mainzelliste but simply wants to use the service. Another option would be to deploy a dedicated test server for Mainzelliste, even here docker-compose can help make deployment faster.

Compared to currently availabe deployment methods, docker offers following advantages:

Faster work-flow

Docker-compose makes getting a running Mainzelliste instance faster by automating tasks. Using docker-compose lets you build and turn a Mainzelliste on and off without spending valuable time on Tomcat configuration, Maven deployment or dependency errors and focus on your own project instead.

Ease of deployment

Eventhough this docker-compose file is built with developers in mind, using the same technology to ship production environment requires minimal effort. Also using Docker will significantlly reduce deploy time since it automates many tasks in this phase.

By letting user choose the code base from which the docker-compose should deploy, developer has the added flexibility of changing Mainzelliste version for testing purpose.

Technology support

Docker is a well established technology with a large community of users world wide. Developer with knowledge of docker can apply it to their workflow in other part of the project to make their workflow more efficient.

The security concern is technically irrational since these docker services run on self-sufficient containers which open it's port to the host machine. As long as the host-machine is secure, the Docker container behaves to requests similarly to other instances.

Database

Windows

Database for admin as well as other user are installed by MSI into C:\ProgrammData\OSSE\data\. After installation, user can login as admin with 'admin' as username and password. Afterwards user needs to create a Form via Form Editor, specify Location and then create Roles for other user to access.

Version installed per MSI runs on the following command:

C:\Program Files\IMBEI\OSSE\postgreSQL\bin\pg_ctl.exe" runservice -N "OSSE_Datenbank" -D "C:\ProgramData\OSSE\data" -w -l "C:\ProgramData\OSSE\log\postgreSQL.log"

backend.xml provides authentification information of the database to Mainzelliste as well as other component of OSSE and can be found in :

  1. C:\Users\EndSub\.config\osse\backend.xml
  2. C:\ProgrammData\OSSE\conf\backend.xml

Note: After OSSE deinstallation via MSI, the database as well as configurations will remain inside C:\ProgrammData\OSSE\data

Mainzelliste

Windows

Check for osse.xml in one of these directories:

  1. C:\Users\EndSub\.config\osse\
  2. C:\ProgrammData\OSSE\conf\

This config data contains the default configuration for port at which Mainzelliste ist accessible. However user can input this in frontend by logging in as admin and go to [osse_site]/admin.xhtml?form=mainzelliste. Settings from the frontend will have higher priority. The OSSE instance will generate a tokenID which is used to communicate with the Mainzelliste port or URL in this setting.

Logs are available at C:\ProgrammData\OSSE\log\mainzelliste.log

Deploy Mainzelliste for OSSE from dev environment

  1. Clone Git repository:
git clone https://bitbucket.org/medinfo_mainz/mainzelliste-osse
  1. Follow the instructions at https://maven.mitro.dkfz.de/external.html. In case the settings.xml doesn't exists one should be created.

  2. Build Jar file using maven:

mvn clean package
  1. Copy the following mainzelliste.conf into the project folder under /overlays/de.pseudonymisierung.mainzelliste-1.5.0/WEB-INF/classes/ : https://gist.github.com/code-vagabond/ecd7df18952b9b85ee3dbd1b5f0878df#file-mainzelliste-conf. This file contains configurations such as local database for Mainzelliste.
  2. Configure your tomcat server and deploy the exploded war file. Set /mainzelliste as application context in deployment settings to fit the default request path of the OSSE instance. The project is now ready to be deployed, for more documentation visit the official Mainzelliste page.

If EDC.OSSE and Mainzelliste are both being deployed locally, to connect these two instances first login to EDC.OSSE instance as admin, then change URL of Mainzelliste to the path where Mainzelliste is deployed (e.g http://localhost:8082/mainzelliste) then modify mainzelliste.conf to allow cross orgin access. Assuming that Mainzelliste is at localhost:8082 where as EDC.OSSE is at localhost:8080 following line would be added:

servers.allowedOrigins = http://127.0.0.1:8080;http://localhost:8080;http://127.0.0.1:8082;http://localhost:8082

Configuration guide for the OSSE suite

Table of Contents

General configuration

Database

Mainzelliste

Deploy Mainzelliste from dev environment

General configuration

Windows

Both development and production enviroment will be looking for configuration (config.xml, backend.xml, osse.xml) in the following folders:

  1. C:\Users\EndSub\.config\osse\
  2. C:\ProgrammData\OSSE\conf\

Version installed per MSI:

Registry:

HKEY_LOCAL_MACHINE -> SOFTWARE -> OSSE

ConfDir:

C:\ProgrammData\OSSE\conf

Tomcat version for OSSE form MSI:

C:\Program Files\IMBEI\OSSE\tomcat  

Database

Windows

Database for admin as well as other user are installed by MSI into C:\ProgrammData\OSSE\data\. After installation, user can login as admin with 'admin' as username and password. Afterwards user needs to create a Form via Form Editor, specify Location and then create Roles for other user to access.

Version installed per MSI runs on the following command:

C:\Program Files\IMBEI\OSSE\postgreSQL\bin\pg_ctl.exe" runservice -N "OSSE_Datenbank" -D "C:\ProgramData\OSSE\data" -w -l "C:\ProgramData\OSSE\log\postgreSQL.log"

backend.xml provides authentification information of the database to Mainzelliste as well as other component of OSSE and can be found in :

  1. C:\Users\EndSub\.config\osse\backend.xml
  2. C:\ProgrammData\OSSE\conf\backend.xml

Note: After OSSE deinstallation via MSI, the database as well as configurations will remain inside C:\ProgrammData\OSSE\data

Mainzelliste

Windows

Check for osse.xml in one of these directories:

  1. C:\Users\EndSub\.config\osse\
  2. C:\ProgrammData\OSSE\conf\

This config data contains the default configuration for port at which Mainzelliste ist accessible. However user can input this in frontend by logging in as admin and go to [osse_site]/admin.xhtml?form=mainzelliste. Settings from the frontend will have higher priority. The OSSE instance will generate a tokenID which is used to communicate with the Mainzelliste port or URL in this setting.

Logs are available at C:\ProgrammData\OSSE\log\mainzelliste.log

Deploy Mainzelliste for OSSE from dev environment

  1. Clone Git repository:
git clone https://bitbucket.org/medinfo_mainz/mainzelliste-osse
  1. Follow the instructions at https://maven.mitro.dkfz.de/external.html. In case the settings.xml doesn't exists one should be created.

  2. Build Jar file using maven:

mvn clean package
  1. Copy the following mainzelliste.conf into the project folder under /overlays/de.pseudonymisierung.mainzelliste-1.5.0/WEB-INF/classes/ : https://gist.github.com/code-vagabond/ecd7df18952b9b85ee3dbd1b5f0878df#file-mainzelliste-conf. This file contains configurations such as local database for Mainzelliste.
  2. Configure your tomcat server and deploy the exploded war file. Set /mainzelliste as application context in deployment settings to fit the default request path of the OSSE instance. The project is now ready to be deployed, for more documentation visit the official Mainzelliste page.

If EDC.OSSE and Mainzelliste are both being deployed locally, to connect these two instances first login to EDC.OSSE instance as admin, then change URL of Mainzelliste to the path where Mainzelliste is deployed (e.g http://localhost:8082/mainzelliste) then modify mainzelliste.conf to allow cross orgin access. Assuming that Mainzelliste is at localhost:8082 where as EDC.OSSE is at localhost:8080 following line would be added:

servers.allowedOrigins = http://127.0.0.1:8080;http://localhost:8080;http://127.0.0.1:8082;http://localhost:8082
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment