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> installed.
- In a separate terminal, change directories to the <parent directory>.
- Copy the archive file furnished by Salvador to the <parent directory>, and expand it.
- Switch back to the Docker terminal, and change directories to the expanded <hspc-docker local> directory:
- Build the hspc image in the Docker terminal:
cd <hspc-docker localpath> docker build -t="opencds/hspc" .
Create volume for hspc mysql data:
docker create -v /var/lib/mysql --name hspc-mysql-data opencds/hspc /bin/true
Create volume for hspc webapps:
docker create -v /usr/local/tomcat/webapps --name hspc-webapps opencds/hspc /bin/true
Create hspc container:
docker run --volumes-from hspc-webapps --volumes-from hspc-mysql-data -d -p 8080:8080 --name hspc opencds/hspc
3. Populate patients:
a. Using GIT, clone project bitbucket.org/hspconsortium/tools.git
b. Compile:
mvn clean install
c. Change to the tools/target subdirectory
cd tools/target
d. Load data
java -jar hspc-tools.jar org.hspconsortium.DataLoad -url http://localhost:8080/hspc-reference-api/data
e. Load dstu2/usecase/schedule
java -jar hspc-tools.jar org.hspconsortium.DataLoad -url http://localhost:8080/hspc-reference-api/data -in datapack/dstu2/usecase/schedule
f. Load dstu2/starter
java -jar hspc-tools.jar org.hspconsortium.DataLoad -url http://localhost:8080/hspc-reference-api/data -in datapack/dstu2/starter
4. Verify Correct Installation:
docker inspect hspc
# The sandbox must be running cd hspc/hsp-tools/tools/target java -jar hsp-tools.jar org.hspconsortium.DataLoad -url http://localhost:8080/hsp-api/data
Test the Installation
- Open a browser and go to: http://localhost:8080/hsp-reference-apps
- Log in with "demo/demo"
- Select a patient
- Select an application
Issue a Test Query Against Your Unsecured RESTful API Server
http://localhost:8080/hsp-api/data/Patient?_format=json - This should result in aJSON FHIR bundle containing all the default patients in the system.