Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top1
top1


Pre-requisite :

Install Docker -
 On RHEL/Centos7 :
  • yum update
  • yum install docker
  • systemctl start docker
  • systemctl status docker
  • systemctl enable docker [ start docker at system boot ]

On Ubuntu :

  • apt-get update
  • apt-get upgrade
  • apt-get install docker.io
  • systemctl start docker
  • systemctl enable docker
    Tip
    Expand
    titleInstallation using Docker [ Linux ]
    Info

    For docker commands https://docs.docker.com/edge/engine/reference/commandline/docker/

           
          Run docker containers :



    Pre-requisite :


    Install Docker:

    On RHEL/Centos7 :

    • yum update
    • yum install docker
    • systemctl start docker
    • systemctl status docker
    • systemctl enable docker [ start docker at system boot ]

    On Ubuntu :

    • apt-get update
    • apt-get upgrade
    • apt-get install docker.io
    • systemctl start docker
    • systemctl enable docker
    Info

    For docker commands https://docs.docker.com/edge/engine/reference/commandline/docker/

     

    Run docker containers:


    Expand
    titleEngine Jar

    Create Images -
    Make a directory and copy files from   http://platform.cogdevops.com/docker/EngineJarImage/

    • dockerfile
    • insightsJar.sh
    • config.env

    Overview of property to be set in config.env file :
     

    VariablesDetails
    postgresIPIP of PostgreSQL 
    neo4jIPIP of Neo4j
    mqIPIP of Rabbit MQ
    insightsConfigURL of InSightsConfig.zip
    jdkURLURL of Java JDK
    jarURLURL for updated PlatformEngine.jar

      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/engine  .
      
    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  --env-file  config.env  imageID  

            Let ' e10aca6729db ' be  the imageID created.

            Example :   docker run -dit  --env-file  config.env   e10aca6729db

    This command will create a container and return a code,  details of  the container can be viewed by running the command ' docker ps '

    Info

     -dit runs the container in detached mode. For interactive mode use  -it.

      Ensure that  docker run   command is executed from the path where config.env is present.

    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    


    Expand
    titleDeploy war

    Create Images - 
    Make a directory and copy files from   http://platform.cogdevops.com/docker/UIWarImage/

    • dockerfile
    • insightsUI.sh
    • config.env

    Overview of variables to be set in config.env

    VariablesDetails 
    elasticIPIP of Elastic Search 
    postgresIPIP of PostgreSQL 
    neo4jIPIP of Neo4j
    mqIPIP of Rabbit MQ
    ldapUrlURL of LDAP
    bindDNBind DN of LDAP
    bindPasswordPassword for Bind DN
    searchBaseDN

    Base DN for LDAP Search

    jdkURLURL of Java JDK
    insightsConfigURLURL of InSightsConfig.zip
    grafanaURLURL of Grafana
    grafanaLDAPURL of ldap.toml
    grafanaDefaultsURL of defaults.ini
    insightsUIURL of InSightsUI.zip
    insightsWarURL of PlatformService.war
    tomcatURLURL 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


    Top Section