Installation
- Download and Install Docker Toolbox for Windows Docker Toolbox
- Check whether you have everything up and running properly
$ docker version
Dec 2018 update - Option1: Type in individual Docker commands
Tagged images of GTAS are available on Docker Hub - run these commands to start testing GTAS in your local env.
$ docker network create gtas_default
$ docker container run -d --name mariahost -p 3306:3306 --network gtas_default sanandreas/gtas_mariadb:v3
$ docker container run -d --name redis -p 6379:6379 --network gtas_default redis
$ docker container run -d --name activemq -p 61616:61616 -p 8161:8161 --network gtas_default rmohr/activemq
Update this following command with your local volume mounts (place where you drop files to be parsed) to help the application pick API/PNR files from your local hard drive.
Replace this < your local folder> with your local mappings
$ docker container run -d --name tomcat -p 8080:8080 --network gtas_default -v //c/db/input: < your local input folder> -v //c/db/output: < your local output folder> sanandreas/gtas_tomcat:v3
Option2: Let docker-compose handle the process of building and deploying
-
From under <gtas-parent/docker> folder, look up this file docker-compose.yml
-
Run these two following lines to update docker with your local file structure for input and output API/ PNR files - change the Right Hand Side with your local file system values
-
Ex: LOCAL_DRIVE_MAPPING_INPUT=<your_local_path>
-
Note that for Windows file system - we use two forward slashes // and for Linux/Unix/Mac file system - we use single forward slash /
echo LOCAL_DRIVE_MAPPING_INPUT=//C/Message > .env
echo LOCAL_DRIVE_MAPPING_OUTPUT=//C/MessageOld >> .env
Then go ahead and issue this command
$ docker-compose up
This will get you up and running with GTAS in your local env. Access the application at http://localhost:8080/gtas
Build Instructions
There are couple of ways to engage Docker within GTAS
- Option1: Type in individual Docker commands
- Option2: Let docker-compose handle the process of building and deploying
Option 1 - Docker commands You would need to build two images for GTAS to run , Image 1: gtas_tomcatgtas Image 2: gtas_mariahost
From under GTAS root folder, issue these commands
$ docker build -f gtas-parent/docker/tomcat.Dockerfile .
This would build you a gtas_tomcatgtas image, the following command will let you check whether this image has been created or not.
$ docker images
This should display something like this
λ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
gtas_tomcatgtas latest 28c1f48c7838 2 days ago 549MB
Repeat similar process to build gtas_mariahost image
From under gtas-parent/gtas-commons directory
$ docker build -f db.Dockerfile .
This would build you a gtas_mariahost image, again check it with
$ docker images
This should display something like this
gtas_mariahost latest 85a27e79b2bb 2 days ago 339MB
Once you are done with these steps, skip to Run Containers section
Option 2 - docker-compose
An easier option is to kick-off docker-compose YAML file that will build images and run containers for us.
From under the GTAS root directory, issue this command
$ docker-compose build
This single command will build you two images, gtas_mariahost and gtas_tomcatgtas.
Now, you can check the images again with
$ docker images
and proceed to Run Containers section
Run Containers
These following commands help you to start Docker containers
- Start with mariahost first
$ docker run -d --rm --name mariahost -p 3306:3306 gtas_mariahost
- Then kick off Tomcat
$ docker run -d --rm --name tomcat -p 8080:8080 --link mariahost:mariahost gtas_tomcatgtas
Give it a couple mins
and then open up the login screen going to http://localhost:8080/gtas