Containerizing ZMC

Table of contents
  1. 1. Prerequisites:

Version as of 20:37, 18 May 2024

to this version.

Return to Version archive.

View current version

Containerizing would isolate ZMC from all other applications, which will reduce the setup failures due to customer environment issues by a huge margin and yields better performance. We will also be able to create multiple Backup Servers for same IP address with exclusive ports.

Prerequisites:

  1. Docker engine
  2. Docker-compose

Installation of Docker Engine 

1.     Install yum-utils 

                  sudo yum install-y yum-utils 

2.     Add the Docker repository 

                  sudo yum-config-manager \ 
                    --add-repo\ 
                  https://download.docker.com/linux/centos/docker-ce.repo 

3.     Install Docker  

                  sudo yum install docker-ce docker-ce-cli containerd.io 

       4.     Start Docker  

                  sudo systemctl start docker              

       5.     Run the hello-world image to make sure everything works

                  sudo docker run helo-world

 

Installation of Docker-Compose 

1.     Download Docker Compose 

sudo curl -L "https://github.com/docker/compose/re...ompose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 

2.     Add execution perms to the download 

sudo chmod +x /usr/local/bin/docker-compose 

3.     Link to the docker-compose command 

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose 

4.      Run “docker-compose –version” to confirm

 

Deployment - Rest server  

1.      tar -xvf zmc_latest.tar  

2.      cd zmc-pre-f [all the following steps must be executed from within this directory] 

3.      docker load < zmc_4-1-> this will create a local copy of the our zmc-rest-server image.  

4.      Delete file zmc_4-1 

5.      Use zmcDB_v5.sql in "zmc-pre-f" to create the remote db with the following cmd  

a.      mysql -u<user> -p [name of empty db] <  zmcDB_v5.sql 

6.      vi db_params/my.cnf then update your remote db connection params . 

7.      [SKIP this step if already performed while deploying backup server] Create file 'port_ranges' in the directory path '/var/lib/amanda/', this file must contain the range of port numbers that can be used  by zmc containers.  

Format of the must be: The file will contain only 2 lines, 1st line will be the lower limit of the range and 2nd line will be the upper limit of the range.  

Example:  

                             10020  

                             10030  

        8.      Run "./run-docker.dist/run-docker", to start the container. 

9.      Now, go to "https:/[hostname]:[port number]/" to access Zmanda Console, to get the port number, open "run_docker-compose.yml" and then copy the left hand side value under "ports:" section. Your zmc ui will be accessible with the credentials: Username = admin, password = Bet$0l@2020                      //This can be changed after login.  

     10.  To check mac address:  

docker-compose exec app ip addr list              //license should be generated using this mac                    address.  

11.  [Optional] Restart services:  

docker-compose exec app systemctl restart __sub-zmc-rest.service __sub-zmc-ui.service run-zmanda-zmc.service   

   

Deployment - Backup server:  

1.      tar -xvf aee_latest.tar  

2.      Rename the extracted directory  

3.      cd <extracted dir> [all the following steps must to be executed from within this directory]  

4.      docker load < aee_4-1  

5.      ./create-aee-network                                             //Should be run only once  

6.      Delete file aee_4-1  

7.      [SKIP this step if already performed while deploying backup server]  

Create file 'port_ranges' in the directory path '/var/lib/amanda/', this file must contain the range of port numbers that can be used  by zmc containers.  

Format of the must be: The file will contain only 2 lines, 1st line will be the lower limit of the range and 2nd line will be the upper limit of the range.  

Example:  

                             10020  

                             10030  

        8. echo "">custom_volumes

9. [Optional] Update "custom_volumes" to add new volume mappings to the        containers, in the              following format: 

a. /home:/home, i.e., <host path>:<container path> 

    By default, this file will be empty. 

 

10. Run "./run-docker.dist/run-docker", to start the container.  

11.   Now, for all successive backup-server container deployment:  

a.      Follow steps 1 through 3, then 8, 9 and 10