QMetry Offline Upgrade Document

 

Steps to upgrade existing QMetry to the latest version

Pre-requisites

Important Pre-requisites to check before upgrade to 8.8.1.1

  • Proceed with this upgrade ONLY IF your current QMetry version is v8.6 or above. 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 to the article SSL Certificate Configuration for Tomcat in Docker for reference.

Follow the steps mentioned below to upgrade your existing QMetry installation:

Step 1: Download Required Files

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

  • Download the QMetryUpgrade.zip and QMetryApp.tar file in the same place to your QMetry Application Server once you receive it. Please note that it must be downloaded outside docker.

Step 2: IMPORTANT: Backup your existing QMetry Database

Take the backup of your existing “qmetry” database. You can replace the username, password, location of the backup file (currently default /opt).

  • 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.

Step 3: Run the QMetry Upgrade

1. Check the running containers using the following command. The dockers must be running to ensure a successful upgrade.

  • docker ps

  • If the dockers are not running, start them using the following commands (replace container names according to the application container name seen in the command above).

    • docker start qmetry_rds_1

    • docker start qmetry_app_1

2. Go to the directory where the QMetryUpgrade.zip file is downloaded and unzip the file using the following command.

  • unzip QMetryUpgrade.zip

3. QMetryApp.tar move the file under QMetryUpgrade/qmetry folder using the following command.

  • mv QMetryApp.tar  QMetryUpgrade/qmetry/

4. Execute the following commands.

  • cd QMetryUpgrade

  • sudo su

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

  • chmod +x upgrade.sh

6. Enter the following command to check docker image

  • docker ps

 

→ If docker image is qmetry/qmetry:qmetry, then run the following command:

  • sudo sh upgrade.sh

→ or else, to pass docker image as an argument, run the following command:

  • sudo sh upgrade.sh {docker_image}

Wait for the process to complete. Docker is upgraded during this process followed by QMetry version upgrade to 8.8.1.1

Wait till you see the message: “QMetry latest version has been migrated successfully”. 

Note: If the docker volume name is incorrect, then you will see an error message like “Incorrect volume name found, please follow the steps as mentioned in the document”.

If you come across the above message related to an incorrect volume name, follow the steps mentioned below. Then continue from Step 4.

  • Find the volume name inside docker

1. First check the current link using the following command for verification.

  • - docker inspect --format="{{json .Mounts}}" qmetry_app_1 | grep -o '"Name":"[^"]*_attachment\b"' | cut -d'"' -f4

2. It should not be “qmetry_attachment” or “qmetryapp_attachment”. Check other volume names using the command:

  • docker volume ls

3. In the docker volume list, if you find the volume name with “qmetry_attachment” or “qmetryapp_attachment”, then we need to take a backup (optional) and remove the volume.

  • Command for backup:
    cp -a /var/lib/docker/volumes/qmetry_attachment $backup_location

(where $backup_location = the location path where you want to take back up)

or
cp -a /var/lib/docker/volumes/qmetryapp_attachment $backup_location

  • Command for removing specific volume name:

docker volume rm $volume_name

(where $volume_name = “qmetry_attachment” or “qmetryapp_attachment”)

4. Now run upgrade.sh with the following command.

→ Enter the following command to check docker image

  • docker ps

→ If docker image is qmetry/qmetry:qmetry then run the following command.

  • sh upgrade.sh '' True

→ or else, pass docker image as an argument, then run the following command.

  • sh upgrade.sh {docker_image} True

Wait for the process to complete. Docker is upgraded during this process followed by QMetry version upgrade to 8.8.1.1

Step 4: Additional Tomcat and MySQL Configuration (Mandatory)

QMetry is installed with a default configuration of minimum and maximum heap memory utilization. You should modify these settings depending on your hardware configuration. Refer to Additional Configuration for more details.

Step 5: Restart QMetry and MySQL Docker Container

  • Check the running containers using the following command.

    • docker ps

  • Restart both docker containers using the following commands (Note : QMetry DB docker container name is changed from qmetry85_mysql_1 to qmetry_rds_1 )

    • docker stop qmetry_app_1 qmetry_rds_1

    • docker start qmetry_rds_1

    • docker start qmetry_app_1

  • Note: In case you have configured Redis Caching for QMetry installed on the same server OR a separate server - connect to that server and run the following commands:

    • To view existing containers: docker ps

    • Replace the container name seen in the above command: docker exec -it container-name redis-cli FLUSHALL

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

Note: It is important to have the correct version of the Jira add-on installed in Jira based on your upgraded and current QMetry version. Refer to the following table for the right version of  "QMetry Jira Integration".

QMetry Version

Jira-addon version required

QMetry Version

Jira-addon version required

8.8.1.1

2.1.5

8.8.1

2.1.4

8.8

2.1.3

8.7.1

2.1.1

8.7

2.1.0

 

Upgrade your Jira add-on as per the above compatibility matrix. In case you have not installed the QMetry Jira Integration app for integration, follow the Steps to Install and Configure the QMetry Jira Integration app.

Important Note

If you are having any issues during the upgrade process, write to us at qtmprofessional@qmetrysupport.atlassian.net. This will automatically open a ticket with our support team and help you follow the progress.