Skip to content

Commit b3b7a92

Browse files
committed
Merge branch 'dev'.Minor adjustments to README detailing requirements to
build process using Docker
2 parents 5acd314 + 00da53e commit b3b7a92

File tree

11 files changed

+127
-102
lines changed

11 files changed

+127
-102
lines changed

README.md

-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ MME has gained international support via the GA4GH and currently has many member
2020

2121
A significant amount of development is typically required to join the MME; this has a detrimental effect on network growth. To address this and facilitate growth, we developed <i>matchbox</i> to be completely portable and easily usable in any center wishing to join the MME.
2222

23-
## To use <i>matchbox</i>, you will need:
24-
25-
* Java 1.8
26-
27-
* Maven 3.1 (available from https://maven.apache.org/)
28-
29-
* An authenticated MongoDB instance (available from https://www.mongodb.org/). This application requires a password protected MongoDB instance for tests and build to succeed (you can build without tests and MongoDB and configure MongoDB later if required as described below).
3023

3124
## Build:
3225

deploy/docker/README.md

+4-94
Original file line numberDiff line numberDiff line change
@@ -7,103 +7,13 @@ usernames, passwords, and tokens etc.
77

88
Please also remember to change any default passwords built into system before production!
99

10-
## To use this docker build, you will need:
1110

12-
1. Docker (https://www.docker.com/)
11+
## Build:
1312

14-
2. Reference data for the Exomiser dependency fetched from:
15-
```
16-
Please note, this is a large file
17-
18-
wget https://storage.googleapis.com/seqr-reference-data/1711_phenotype.tar.gz
19-
20-
Once you download this file, please uncompress it, and remember the file path. For example,
21-
/data/reference_data/
22-
23-
Also make sure this directory is accessible to your docker daemon since it needs to be mounted
24-
via the -v option at docker "run command"
25-
```
26-
27-
28-
29-
## Build process:
30-
31-
1. First update the Dockerfile empty fields at the bottom,
32-
33-
For example:
34-
35-
```
36-
env MONGODB_HOSTNAME=192.168.1.4
37-
env MONGODB_PORT=27017
38-
env MONGODB_USERNAME=username
39-
env MONGODB_PASSWORD=pwd
40-
env MONGODB_DATABASE=mme_primary
41-
```
42-
43-
If you want to serve as HTTPS, please uncomment following by removing "#" and populate as needed. You can ignore otherwise
44-
45-
```
46-
env USE_HTTPS=true
47-
env SERVER_PORT=8443
48-
env HTTPS_SSL_KEY_STORE=matchbox_keystore
49-
env HTTPS_SSL_KEY_STORE_PASSWORD=changeit
50-
env HTTPS_SSL_KEY_PASSWORD=<temp_ks_pwd__change_me!>
51-
52-
RUN keytool -genkey -noprompt \
53-
-alias matchbox \
54-
-dname "CN=, OU=, O=, L=, S=, C=" \
55-
-keystore $HTTPS_SSL_KEY_STORE \
56-
-storepass $HTTPS_SSL_KEY_STORE_PASSWORD \
57-
-keypass $HTTPS_SSL_KEY_PASSWORD
58-
```
59-
60-
61-
2. In the deploy/docker directory there are two files that should be handled extra carefully in production given that they will contain tokens and access information for your instance and other nodes.
62-
```
63-
config.xml : this XML file is used to configure the token to give access to your matchbox instance.
64-
nodes,json : this JSON file contains tokens that give your matchbox instance access to other MME nodes
65-
```
66-
67-
Using guidance from the example data inside them, populate as needed.
68-
69-
Please remember to remove default values before production!
70-
71-
Possibly use a secrets-file management system to keep fully populate files that can inserted in at deployment.
72-
73-
74-
3. Then, from the matchbox docker directory, do a build (should take 6-10mins max)
75-
```
76-
docker build -t matchbox-docimg .
77-
```
78-
79-
4. Assuming,
80-
81-
* You have already downloaded the necessary reference data for Exomiser (for example to /data/reference_data/)
82-
83-
* And reference data directory is accessible to Docker daemon,
84-
85-
* And you have a MongoDB instance running and you have added its credentials and details to the Dockerfile before the build step,
86-
87-
88-
For example, if you are using the default HTTP settings and didn't change any port numbers:
89-
```
90-
docker run -ti -p 9020:9020 -v "/data/reference_data/":/Exomiser/matchbox/data/data matchbox-docimg
91-
```
92-
93-
OR
94-
95-
For example, if you uncommented the HTTPS settings and didn't change any HTTPS port numbers:
96-
```
97-
docker run -ti -p 8443:8443 -v "/reference_data/exomiser-cli/data":/Exomiser/matchbox/data/data matchbox-docimg
98-
```
99-
100-
101-
6. You can test your instance with (make sure to adjust the URL "http://localhost:9020/patient/view" with the port you used),
102-
103-
```
104-
curl -X GET -H "X-Auth-Token: abcd" -H "Accept: application/vnd.ga4gh.matchmaker.v1.0+json" -H "Content-Type: application/x-www-form-urlencoded" http://localhost:9020/patient/view
105-
```
13+
<i>matchbox</i> requires a reference dataset to help build it's phenotype scoring model. This dataset can be downloaded separately and mounted to the Docker container or you can rely on Docker to take care of all these details!
10614

15+
1. [Build via having the reference data mounted into the container](with_data_mounted_to_container/README.md)
10716

17+
2. [Rely on Docker to get the reference data into the container (Easiest)](with_data_in_container/README.md)
10818

10919

deploy/docker/with_data_in_container/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Please also remember to change any default passwords built into system before pr
1010
## To use this docker build, you will need:
1111

1212
1. Docker (https://www.docker.com/)
13+
14+
2. An authenticated (ideally) MongoDB instance (https://www.mongodb.com/)
1315

1416

1517
## Build process:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# <i>matchbox Docker build process (beta)</i>
2+
3+
We are still in the process of designing a best practices build and deployment process using Docker and Kubernetes, so please consider this a work in progress.
4+
5+
Please be careful to not check in Docker files with private secure
6+
usernames, passwords, and tokens etc.
7+
8+
Please also remember to change any default passwords built into system before production!
9+
10+
## To use this docker build, you will need:
11+
12+
1. Docker (https://www.docker.com/)
13+
14+
2. Reference data for the Exomiser dependency fetched from:
15+
```
16+
Please note, this is a large file
17+
18+
wget https://storage.googleapis.com/seqr-reference-data/1711_phenotype.tar.gz
19+
20+
Once you download this file, please uncompress it, and remember the file path. For example,
21+
/data/reference_data/
22+
23+
Also make sure this directory is accessible to your docker daemon since it needs to be mounted
24+
via the -v option at docker "run command"
25+
```
26+
27+
3. An authenticated (ideally) MongoDB instance (https://www.mongodb.com/)
28+
29+
30+
## Build process:
31+
32+
1. First update the Dockerfile empty fields at the bottom,
33+
34+
For example:
35+
36+
```
37+
env MONGODB_HOSTNAME=192.168.1.4
38+
env MONGODB_PORT=27017
39+
env MONGODB_USERNAME=username
40+
env MONGODB_PASSWORD=pwd
41+
env MONGODB_DATABASE=mme_primary
42+
```
43+
44+
If you want to serve as HTTPS, please uncomment following by removing "#" and populate as needed. You can ignore otherwise
45+
46+
```
47+
env USE_HTTPS=true
48+
env SERVER_PORT=8443
49+
env HTTPS_SSL_KEY_STORE=matchbox_keystore
50+
env HTTPS_SSL_KEY_STORE_PASSWORD=changeit
51+
env HTTPS_SSL_KEY_PASSWORD=<temp_ks_pwd__change_me!>
52+
53+
RUN keytool -genkey -noprompt \
54+
-alias matchbox \
55+
-dname "CN=, OU=, O=, L=, S=, C=" \
56+
-keystore $HTTPS_SSL_KEY_STORE \
57+
-storepass $HTTPS_SSL_KEY_STORE_PASSWORD \
58+
-keypass $HTTPS_SSL_KEY_PASSWORD
59+
```
60+
61+
62+
2. In the deploy/docker directory there are two files that should be handled extra carefully in production given that they will contain tokens and access information for your instance and other nodes.
63+
```
64+
config.xml : this XML file is used to configure the token to give access to your matchbox instance.
65+
nodes,json : this JSON file contains tokens that give your matchbox instance access to other MME nodes
66+
```
67+
68+
Using guidance from the example data inside them, populate as needed.
69+
70+
Please remember to remove default values before production!
71+
72+
Possibly use a secrets-file management system to keep fully populate files that can inserted in at deployment.
73+
74+
75+
3. Then, from the matchbox docker directory, do a build (should take 6-10mins max)
76+
```
77+
docker build -t matchbox-docimg .
78+
```
79+
80+
4. Assuming,
81+
82+
* You have already downloaded the necessary reference data for Exomiser (for example to /data/reference_data/)
83+
84+
* And reference data directory is accessible to Docker daemon,
85+
86+
* And you have a MongoDB instance running and you have added its credentials and details to the Dockerfile before the build step,
87+
88+
89+
For example, if you are using the default HTTP settings and didn't change any port numbers:
90+
```
91+
docker run -ti -p 9020:9020 -v "/data/reference_data/":/Exomiser/matchbox/data/data matchbox-docimg
92+
```
93+
94+
OR
95+
96+
For example, if you uncommented the HTTPS settings and didn't change any HTTPS port numbers:
97+
```
98+
docker run -ti -p 8443:8443 -v "/reference_data/exomiser-cli/data":/Exomiser/matchbox/data/data matchbox-docimg
99+
```
100+
101+
102+
6. You can test your instance with (make sure to adjust the URL "http://localhost:9020/patient/view" with the port you used),
103+
104+
```
105+
curl -X GET -H "X-Auth-Token: abcd" -H "Accept: application/vnd.ga4gh.matchmaker.v1.0+json" -H "Content-Type: application/x-www-form-urlencoded" http://localhost:9020/patient/view
106+
```
107+
108+
109+
110+
File renamed without changes.

deploy/maven/README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
## Build directly via Maven:
22

3-
To build directly via Maven, the following steps are needed. <i>matchbox</i> relies on a modified version of Exomiser (https://github.com/exomiser/Exomiser), its reference data and libraries for the phenotype matching algorithm. Given that these libraries are currently not in a maven repository, we obtain this dependency via first building Exomiser and then followed by <i>matchbox</i>. By building Exomiser first, we put its jars in the local maven repository, where the <i>matchbox</i> build is able to see and use them.
3+
### You will need:
4+
5+
* Java 1.8
6+
7+
* Maven 3.1 (available from https://maven.apache.org/)
8+
9+
* An authenticated (ideally) MongoDB instance (https://www.mongodb.com/)
10+
11+
### Process:
12+
13+
<i>matchbox</i> relies on a modified version of Exomiser (https://github.com/exomiser/Exomiser), its reference data and libraries for the phenotype matching algorithm. Given that these libraries are currently not in a maven repository, we obtain this dependency via first building Exomiser and then followed by <i>matchbox</i>. By building Exomiser first, we put its jars in the local maven repository, where the <i>matchbox</i> build is able to see and use them.
414

515
* Clone the Exomiser package
616
- Make sure you have a settings.xml file in your ~/.m2/ directory with the following entry (to activate a local repsitory for Maven to use)

0 commit comments

Comments
 (0)