Steps required to build cda2vmr docker image:
- Download opencds-cdstovmr-docker
- Install Mercurial
- Clone and build cda-web-service project
- Copy cda-ws-web.war and cda-ws-ear.ear into docker folder
- Download terminology files and place them into docker folder
- Define the URL of the opencds instance on ejb-jar.xml
- Build and deploy container
Code Block | ||||
---|---|---|---|---|
| ||||
git clone https://bitbucket.org/opencds/opencds-cdstovmr-docker |
...
In order to build this image you will need cda-ws-ear.ear and cda-ws-web.war files. These files can be obtained by cloning and building the cda-web-service project. First you need to install Mercurial (https://mercurial.selenic.com/) which is the control management tool used in this project.
Code Block | ||||
---|---|---|---|---|
| ||||
sudo apt-get install mercurial |
...
Code Block | ||||
---|---|---|---|---|
| ||||
cp cda-web-service/cda-ws-ear/target/cda-ws-ear.ear opencds-cdstovmr-docker/ cp cda-web-service/cda-ws-webapp/target/cda-ws-web.war opencds-cdstovmr-docker/ |
Also you need the following terminology resources:
...
Code Block | ||||
---|---|---|---|---|
| ||||
<session> <ejb-name>OpenCdsServiceMGR</ejb-name> <env-entry> <env-entry-name>OPENCDS_ENDPOINT</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>http://192.168.1.101:8081/opencds-decision-support-service-1.2.0-SNAPSHOT/evaluate</env-entry-value> </env-entry> |
Code Block | ||||
---|---|---|---|---|
| ||||
sudo docker build -t="opencds/cdatovmr" .
sudo docker run -p 8080:8080 -p 2222:22 -p 4848:4848 -p 8181:8181 -p 9009:9009 --name cdatovmr -i -t opencds/cdatovmr |
By default the image includes the following four applications:
- Inference analyzer - http://locahost:8080/SimplePredicateReducerVisualizer-1.0-SNAPSHOT
- opencds service - http://localhost:8080/opencds-decision-support-service-1.2.0-SNAPSHOT/evaluate?wsdl
- Predicate reducer Web service - http://localhost:8080/CdaService/Evaluate?wsdl
- Predicate reducer web application - http://localhost:8080/cda-ws-web/
It is important to note that you can remove any of these applications by editing the Dockerfile.