Upgrade Document (from v8.5.4 or below) - QMetry v8.6, Open JDK 11, MySQL 5.7.29 & Tomcat 9 Upgrades

Steps to upgrade existing QMetry to latest version


With the upgrade to 8.6 and above, docker container also gets updated containing QMetry installation on Apache Tomcat 9.x, Open JDK 11 and MySQL v5.7.29

Pre-requisites

Important Pre-requisites to check before upgrade to 8.6.


  • Proceed with this upgrade ONLY IF your current QMetry version is v8.5.4 or below. To check : Go to QMetry > About section.
  • Check space occupied by QMetry installation on your server. QMetry dockers use space under /var/lib directory. Ensure you have 2x space of your current QMetry, as free space on your server, before proceeding with the upgrade.
  • Ensure internet connectivity is enabled on the server for this upgrade.
  • 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.
  • Run docker ps command and ensure that your MySQL docker name is not qmetry_rds_1

Below are the steps to be followed to upgrade your existing QMetry installation:

Step 1 : Download Required Files

  • Please write to QMetry Support by sending an Email at qtmprofessional@qmetrysupport.atlassian.net,  to get the latest version of QMetry Upgrade Installer. 

  • Download the upgrade.sh and UpgradeMysql.zip files to your QMetry Application Server once you receive it.

Step 2 : IMPORTANT : Backup your existing QMetry Database

  • To Backup QMetry Database :
    • Take the backup of your existing “qmetry” database. You can replace username, password, location of backup file (currently default /opt). Replace x with the mysql docker name seen in the output of command : docker ps
    • Syntax : docker exec qmetry85x_mysql_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 qmetry85x_mysql_1 sh -c 'exec mysqldump -uroot -pqmetry --triggers --routines --hex-blob --single-transaction --lock-tables --no-create-db qmetry' > /opt/qmetry_backup_2020-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 MySQL Upgrade Utility.

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 below commands (replace x according to the application container name seen in command above)
    • docker start qmetry85x_mysql_1
    • docker start qmetry85x_qtm_1

2. Go to the directory where the "upgrade.sh" and "UpgradeMysql.zip" files are downloaded.

  • Extract upgrademysql.zip file using unzip command:
    • unzip upgrademysql.zip
    • cd UpgradeMysql/QMetry
  • Give permission to upgrademysql.sh file through the following command
    • chmod +x upgrademysql.sh
  • Enter the following command and then pass the parameters mentioned
    • sudo sh upgrademysql.sh
  • The upgrade script will prompt the following options:
 
OptionsTypeDefault ValueComments/ Example
Please enter MySQL Docker Release Prefix (e.g. qmerty85)Mandatory

qmetry85

If docker name is qmetry85_mysql_1, it means the release prefix is qmetry85 (output available from docker ps command)

Wait for the process to complete.

3. Verify only 2 dockers should be running now : docker ps - and find qmetry_rds_1 and qmetry85_qtm_1

4. Restart the dockers :

  • docker stop qmetry85_qtm_1 qmetry_rds_1
  • docker start qmetry_rds_1
  • docker start qmetry85_qtm_1

Step 4 : Run the QMetry Upgrade Utility

  1. Go to the directory where the "upgrade.sh"  is downloaded.
  2. Give permission to upgrade.sh file through the following command
    • chmod +x upgrade.sh
  3. Enter the following command and then pass the parameters mentioned
    • sudo sh upgrade.sh
  4. The upgrade script will prompt the following options


OptionsTypeDefault ValueComments/ Example
Please enter QMetry Docker Release Prefix (e.g. qmerty85)Mandatory

qmetry85

If docker name is qmetry85_qtm_1, it means the release prefix is qmetry85 (output available from docker ps command)

Do you want to copy license file [Y/N]

Mandatory-

Copy the license file by hitting - Y (Uppercase)

Do you have any changes in MySQL configurations like username/database/password ? [Y/N]Mandatory-

Important :

  • 3 Tier Installs (Separate DB Server) or RDS; irrespective of any config changes - Type Y
  • 2 Tier installs (QMetry App and DB on same server) - Type N
    • For any changes in DB details like username, password and schema name - Type Y


  • Wait for the process to complete. Docker is upgraded during this process followed by QMetry version upgrade to 8.6
  • Press Ctrl+C when prompted at the end of the upgrade, and wait till you see the message : QMetry v8.6 has been migrated successfully.

Step 5 : Additional Tomcat and MySQL Configuration (Mandatory)

Make the below changes if they're pending or not completed before.

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 Additional Configuration for more details.

Step 6 : Restart QMetry and MySQL Docker Container

  • Check the running containers using the following command:
    • docker ps
  • Restart both docker containers using below commands:  (Note : QMetry App docker container name changes to qmetry_app_1 and MySQL 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 same server OR a separate server - connect to that server and run the below commands :
    • To view existing containers : docker ps
    • Replace the container name seen in above command : docker exec -it container-name redis-cli FLUSHALL

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

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

QMetry VersionJira-addon version required
On 8.5.62.0.2 or above
On 8.5.6.32.0.3 or above
On 8.62.0.4 or above


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

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