Versions Compared

Key

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

...

Download Docker Images of QMetry

Pre-requisite

  • Docker installation is required before executing the following docker commands on the machine.

Follow these steps on the Internet-enabled machine on which the docker images of QMetry are to be downloaded.

Step 1. Execute the following command. Next, it will ask for docker's credentials. Enter the required credentials. Please contact QMetry Support, if you do not have the credentials.

  • docker login

       After entering docker credentials, it will show the success message as shown below. 

...

Step 2. Execute the following commands to pull QMetry application's docker image from the docker repository.

  • docker pull qmetry/qmetry:latest

       The download process is started. Wait till the time it gets finished.
        After the process gets finished, it will display the message as shown below.

Execute the following command to verify that docker image has been downloaded.

  • docker images  

         
Step 3. Execute the following command to save QMetry application's docker image as .tar file. You can change the path of .tar file in the following command.

  • docker save -o /opt/qtm/qmetryapp.tar qmetry/qmetry:latest

...

Step 4. Execute the following commands to download and save alpine's docker image.

  • docker pull alpine:latest

  • docker save -o /opt/qtm/alpine.tar alpine:latest

  • docker images

Step 5. Transfer the qmetryapp.tar and alpine.tar file to the QMetry application server.

Steps to upgrade existing QMetry to latest version

Pre-requisites

Important Pre-requisites to check before upgrade to the latest version.

  • Proceed with this upgrade ONLY IF your current QMetry version is on or above v8.6 and below v8.9.030.3. To check: Go to QMetry > About section.

  • Mysql version of QMetry Reports and QMetry Application should be 5.7.29.

  • SSL configuration would need to be re-done as a new docker gets installed. You refer the article SSL Certificate Configuration for Tomcat in Docker for reference.

  • With this upgrade, QMetry application data such as attachments, license and log files will be moved outside of the docker container for ease of access and stored in the specified directory at the time of the upgrade. Please ensure there is sufficient space on this location before beginning the upgrade.

  • Make sure to have minimum free disk space available is more than the size of (attachments + import + export + logs) files. 

...

Step 1: Download Required Files

  • You can generate a request on the QMetry Support Portal, to get the latest version of QMetry Upgrade Installer. 

  • Copy the QMetryUpgrade.zip file received from Support and the generated qmetryapp.tar and alpine.tar files in the same directory on QMetry application server. Please note that it must be downloaded outside docker.

...

  • Syntax : docker exec qmetry_rds_1 sh -c 'exec mysqldump -uroot -p<password> --triggers --routines --hex-blob --single-transaction --lock-tables --no-create-db qmetry' > /opt/qmetry_backup_<date>.sql

  • For example: docker exec qmetry_rds_1 sh -c 'exec mysqldump -uroot -pqmetry --triggers --routines --hex-blob --single-transaction --lock-tables --no-create-db qmetry' > /opt/qmetry_backup_2021-01-01.sql

Verify that your database has been backed up properly and is available for later use in case of any emergency.

...

1. Make sure QMetry and MySQL docker container must be running to ensure a successful upgrade. Check the running containers using the following command.

  • docker ps

If the docker containers are not running, start them using the below commands (replace container name according to the application container name).

  • docker start <container name>

2. On QMetry application server, navigate to the directory where .tar file has been placed and execute the following command.

  • sudo docker load -i qmetryapp.tar

  • sudo docker load -i alpine.tar

Execute the following command to check whether the docker images have been restored correctly or not.

  • sudo docker images

3. Execute following command to unzip the QMetryUpgrade.zip file.

  • unzip QMetryUpgrade.zip

4. Execute the following commands.

  • cd QMetryUpgrade

  • sudo su

5. Make sure to have existing docker volumes and docker container names as per following.

  • check docker volumes name using the below command.

    • docker volume ls

  • docker volume name should be qmetryapp_attachment.

  • check docker container name using the below command.

    • docker ps

  • docker container name should be qmetry_app_1 

  • If any of this name is not same as above, then update upgrade.sh file for changed value with the respective names using following steps.

    • Open the file – upgrade.sh in edit mode.

      • vi upgrade.sh

    • Update the file for changed value with the respective names of volume and container.

      • Press i to change the file mode to insert.

      • Update the variable value according to the existing docker volume and docker container name.

        • exist_attachment_volume → Value from docker volume ls for attachment 

        • exist_qmetry_container → Value from docker ps for qmetry

      • Press Esc, and then type :wq to save the changes.

...

6. Give permission to upgrade.sh file through the following command.

  • chmod +x upgrade.sh

  • sh upgrade.sh

7. While running script file will ask for enter directory path where QMetry application's data can be stored. This directory will now onwards store the QMetry application's files related data. 

...

  • Check the running containers using the following command.

    • docker ps

...

  • Restart both docker containers using the below commands (replace container name according to the application container name).

    • docker stop <container name>

    • docker start <container name>

Step 5: Installing / Upgrading Jira add-on for the Integration of QMetry and Jira.

...

  • After upgrade to latest QMetry docker container, if everything is working as expected with all existing data as previously exist then one can execute following commands to remove old versions of QMetry application's docker container, docker images, docker volumes, and backup.

    • docker rm qmetryapp_backup 

    • docker image prune -af

    • docker volume prune -f 

  • Additionally, delete directory "QMetryBackup" from the path where upgrade.sh file was executed for upgrade activity.  

If you are facing any issues during the installation process, kindly generate a support ticket on Support Portal for assistance.