Create Images - Make a directory and copy files from http://platform.cogdevops.com/docker/UIWarImage/ - dos2unix *
- dockerfile
- insightsUI.sh
- config.env
Note |
---|
Make sure that you have connection with the instance where you have other components ( Postgres, Rabbitmq, Neo4j ) |
Overview of variables to be set in config.env Variables | Details |
---|
elasticIP | IP of Elastic Search | postgresIP | IP of PostgreSQL | neo4jIP | IP of Neo4j | mqIP | IP of Rabbit MQ | ldapUrl | URL of LDAP | bindDN | Bind DN of LDAP | bindPassword | Password for Bind DN | searchBaseDN | Base DN for LDAP Search | jdkURL | URL of Java JDK | insightsConfigURL | URL of InSightsConfig.zip | grafanaURL | URL of Grafana | grafanaLDAP | URL of ldap.toml | grafanaDefaults | URL of defaults.ini | insightsUI | URL of InSightsUI.zip | insightsWar | URL of PlatformService.war | tomcatURL | URL of apache tomcat |
Update config.env variables and run the below command from the path of copied files. docker build -t tag_name .
Example : docker build -t insights/ui . The above command create an image with unique id which will be used to create the containers. Check the list of images created by,
docker images
Create containers -
Run the image built to create containers
docker run -dit -p 3000:3000 -p 8080:8080 --env-file config.env imageID ping -t localhost
Let ' e10aca6729db ' be the imageID created.
Example : docker run -dit -p 3000:3000 -p 8080:8080 --env-file config.env e10aca6729db ping -t localhost
Info |
---|
- dit runs the container in detached mode. For interactive mode use - it.
- p helps to expose specified ports. If port is already in use, try with other port of host to connect. Make sure that Grafana runs on 3000 by default. |
To list the containers - docker ps [ For active containers ] docker ps -a [ For all containers ]
Check logs of container - docker logs containerID
Let '614bcc4546de' be the containerID created, Example : docker logs 614bcc4546de
Connect to the container - User can get into the newly created container where jar is running by ,
docker exec -it containerID bash
Example : docker exec -it 614bcc4546de bash
Check the URLs -
Note |
---|
Note: insightsUI.sh file fetches publicIP of the host that you are using and run Grafana, Tomcat on relevant ports of it. If any of the container orchestration utility (like kubernetes) is used in order to run this UI image, then 'ping -t localhost' is not needed at the end of 'docker run' command |
http://hostPublicIP:3000 for grafana http://hostPublicIP:8080/app for Insights UI
|