Start the Docker Quickstart Terminal from the applications folder:
Code Block | ||||
---|---|---|---|---|
| ||||
Applications/Docker/Docker Quickstart Terminal.app |
...
Install Docker from https://www.docker.com/products/docker#mac
If you are not familiar with Docker, read and study https://docs.docker.com/engine/getstarted/ - This goes through the "getting started" support of Docker, with Kitematic, the new GUI interface engine.
The first instructions below are for Kitematic (for Mac, Windows is similar), but they are incomplete... If you are already comfortable with the command-line version of Docker, then you can probably use the Linux instructions on the separate page at HSPC Sandbox container.
1. If you want to use the new Kitematic GUI interface, then this what you will see in the Mac Applications Folder :
Click on the Kitematic button, and you will get this:
Any Docker containers that are already installed are listed on the left-hand side. You can start a container that is already installed by selecting it, and clicking the start button that appears. There is also another button that will appear when you click in the left-hand side of the window for adding a new Docker image from the official Docker repository.
2. The rest of these instructions are for the use of the command-line tool started by clicking the "Docker Quickstart Terminal" button shown above.
Start Docker from the Mac applications folder, and select the Docker Quickstart Terminal icon:
- Determine a <parent directory> where you want to have the <hspc-docker local directory> local> installed.
- Change In a separate terminal, change directories to the <parent directory>.
- Copy the archive file furnished by Salvador to the <parent directory>, and expand it.
- Change Switch back to the Docker terminal, and change directories to the expanded <hspc-docker localpath> local> directory:
- Build the hspc image in the Docker terminal:
Code Block | ||||
---|---|---|---|---|
| ||||
cd <hspc-docker localpath> docker build -t="opencds/hspc" . |
Create volume for hspc mysql data:
Code Block | ||||
---|---|---|---|---|
| ||||
docker create -v /var/lib/mysql --name hspc-mysql-data opencds/hspc /bin/true |
Create volume for hspc webapps:
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --volumes-from hspc-webapps --volumes-from hspc-mysql-data -d -p 8080:8080 --name hspc opencds/hspc |
...
3. Populate patients
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker create -v /usr/local/tomcat/webapps --name hspc-webapps opencds/hspc /bin/true |
...
:
a. Open a separate command prompt (NOT the Docker Quickstart Prompt), and change to a directory that is not internal to the hspc-webapps location you created above.
b. Using GIT, clone project bitbucket.org/hspconsortium/tools.git
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker create -v /usr/local/tomcat/webapps --name hspc-webapps opencds/hspc /bin/true |
...
(in my case, it is something like this: git clone https://davidshields@bitbucket.org/hspconsortium/tools.git)
c. Compile the tools (and save this project so that you don't have to re-do it later, because it takes along time to create and load all the data into mysql):
Code Block | ||||
---|---|---|---|---|
| ||||
mvn clean install |
d. Change to the tools/target subdirectory
Code Block | ||||
---|---|---|---|---|
| ||||
cd tools/target |
java -jar hspc-tools.jar org.hspconsortium.DataLoad -url http://localhost:8080/hspc-reference-api/
e. Load data
Code Block | ||||
---|---|---|---|---|
| ||||
java -jar hspc-tools.jar org.hspconsortium.DataLoad -url http://localhost:8080/hspc-reference-api/data |
...
f. Load dstu2/usecase/schedule
Code Block | ||||
---|---|---|---|---|
| ||||
java -jar hspc-tools.jar org.hspconsortium.DataLoad -url http://localhost:8080/hspc-reference-api/data -in datapack/dstu2/usecase/schedule |
...
g. Load dstu2/starter
Code Block | ||||
---|---|---|---|---|
| ||||
java -jar hspc-tools.jar org.hspconsortium.DataLoad -url http://localhost:8080/hspc-reference-api/data -in datapack/dstu2/starter |
...
4. Verify Correct Installation:
Code Block | ||||
---|---|---|---|---|
| ||||
docker inspect hspc |
...