Difference between revisions of "Docker Installation"

From Lingoport Wiki
Jump to: navigation, search
(Prereq)
(LocalyzerQA Docker Installation)
Line 12: Line 12:
   
 
=== Prereq ===
 
=== Prereq ===
* Make sure you have MySQL installed
 
 
** on disk
 
** on disk
** Dockerized: [https://towardsdatascience.com/connect-to-mysql-running-in-docker-container-from-a-local-machine-6d996c574e55 MySQL in Docker Container ]
 
 
* Make sure you have the logs and config locations setup, for example:
 
* Make sure you have the logs and config locations setup, for example:
 
centos > pwd
 
centos > pwd
Line 33: Line 31:
   
 
You may have previous LocalyzerQA images. You may want to remove them.
 
You may have previous LocalyzerQA images. You may want to remove them.
  +
  +
=== Use mysql container===
  +
docker network create mysqlnet
  +
docker run --network-alias mysqlserver --network mysqlnet -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_DATABASE=lreviewer mysql:5.7
  +
  +
=== Run the container ===
  +
  +
docker run -dp 8085:8080 --network mysqlnet -v "/home/centos/localyzerqa/log":/usr/local/tomcat/log -v "/home/centos/localyzerqa/logs":/usr/local/tomcat/logs -v "/home/centos/localyzerqa/config":/usr/local/tomcat/lingoport ljilingoport/localyzerqadev
  +
docker ps
  +
  +
   
 
=== Open port 8085 ===
 
=== Open port 8085 ===

Revision as of 19:56, 17 June 2022

Work in Progress

This installation is for a future release.

General Installation Page

https://docs.docker.com/engine/install/

Centos Docker Installation

See: https://docs.docker.com/engine/install/centos/

LocalyzerQA Docker Installation

Prereq

    • on disk
  • Make sure you have the logs and config locations setup, for example:
   centos > pwd
   /home/centos/localyzerqa
   centos > ls -l
   total 0
   drwxrwxr-x. 2 centos centos 6 Jun 16 21:32 config
   drwxrwxr-x. 2 centos centos 6 Jun 16 21:32 log
   drwxrwxr-x. 2 centos centos 6 Jun 16 21:32 logs
  • Make sure you have the configuration file for the application (from Lingoport)
   centos > ls -l localyzerqa/config/
   total 4
   -rw-rw-r--. 1 centos centos 1445 Jun 16 21:39 LocalyzerQAConfig.groovy
  • Check the local images
   docker ps

You may have previous LocalyzerQA images. You may want to remove them.

Use mysql container

  docker network create mysqlnet
  docker run --network-alias mysqlserver --network mysqlnet  -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_DATABASE=lreviewer mysql:5.7

Run the container

  docker run -dp 8085:8080 --network mysqlnet -v "/home/centos/localyzerqa/log":/usr/local/tomcat/log -v "/home/centos/localyzerqa/logs":/usr/local/tomcat/logs -v "/home/centos/localyzerqa/config":/usr/local/tomcat/lingoport ljilingoport/localyzerqadev
   docker ps


Open port 8085

Login to AWS EC2
Edit Security Group to add Dockerdev group

Allow access database remotely

  mysql -u root -p 
  grant all privileges on *.* to root@'%' identified by 'ROOT_PASSWORD';
  flush privileges;
  vi /etc/my.cnf

Add/Modify

  bind-address = 0.0.0.0
  sudo systemctl restart mysqld

Run the container

   docker run -dp 8085:8080 -v "/home/centos/localyzerqa/log":/usr/local/tomcat/log -v "/home/centos/localyzerqa/logs":/usr/local/tomcat/logs -v "/home/centos/localyzerqa/config":/usr/local/tomcat/lingoport ljilingoport/localyzerqadev
   docker ps