QMetry and Reports Installation on AWS Cloud Linux - 3 Tier (v8.14.0.4)

In this guide, we'll run you through installing QMetry Database on AWS RDS, QMetry Test Management application, and QMetry Reporting Tool in a 3 Tier Architecture on AWS.

AWS 3 Tier Architecture

Server 1

QMetry App

Server 2

QMetry Reports

AWS RDS 1

QMetry DB

AWS RDS 2

QMetry Reports DB

Pre-requisites

For additional information on verifying pre-requisites refer this article. This installation requires MySQL v8.0.32 on AWS RDS and installs QMetry over Apache Tomcat 10.x and Open JDK 17.0.2 in a docker container.

  1. QMetry Installation is supported only on Linux  - CentOS 7 and 8, and RHEL 7 and 8. No other OS is certified for QMetry Installation.

  2. Four Servers are required: 2 AWS RDS for QMetry and Reports Databases, QMetry Application, and QMetry Reporting. These servers should be able to communicate with each other on respective ports as mentioned in the table below. Security groups should be configured accordingly. Refer QMetry Deployment Document for the requirements. All the servers should have the support of these commands: unzip, wget, curl and vim.

  3. Ensure internet access is enabled on all servers. Internet access is required to download and install docker and QMetry installation images.

  4. Ensure Proxy Servers are not blocking downloads from the Internet.

  5. Firewall and selinux must be disabled on the server while installing QMetry and Reports.

  6. QMetry Application and Report Servers should be able to communicate over 80/443 and Database Server 3306/DB Ports. Ports 8080 and 33061 should be enabled/open on Reports Server to allow connections from QMetry application server. The ports 80/443 and 3306 on the respective servers should be free and should not be in use by other applications. QMetry App server should be able to communicate with the reports server on port 3306.

  7. Docker installation requires root user access. To install using a non-root user, follow the steps specified here before starting the install on both QMetry and Report servers.

  8. By default, docker is managing storage under “/var/lib/” directory on the host machine. Installer will ask you to set up a storage location for QMetry application files related data during the installation of QMetry. Hence, make sure that both the directories have required disk space available as per usage requirement of QMetry application.

  9. Get the following files from QMetry Support : QMetryApp.zip, QMetryReport.zip and docker credentials required for installation. Post-installation, QMetry Application and Report tool both should be configured either on https or http.

  10. If you are planning Jira integration with QMetry and Jira is running on https, make sure your QMetry is also running over https protocol. QMetry and Jira should run on the same protocol.

  11. Following Ports should be open for incoming connections on the respective servers:

Installation

Ports that need to be enabled

Installation

Ports that need to be enabled

AWS RDS - QMetry Application Database & QMetry Reports Databases

3306 for both RDS

QMetry Application

80/443

QMetry Reports

80/443, 8080, & 3306

AWS EFS

2049

AWS ElastiCache (if enabling the optional Redis Cache Cluster)

6379

Create and Configure 2 RDS for QMetry Application Database and QMetry Reports Database

Create 2 RDSs sharing a common parameter group as described below.

Step 1. Create DB parameter groups by following the below steps.

  1. Go to AWS Management Console and open the Amazon RDS console.

  2. In the navigation pane, select Parameter groups.

  3. Click on the Create parameter group button.

  4. Parameter group family: Select mysql8 as DB parameter group family.

  5. Group name: Provide the name of the new DB parameter group.

  6. Description: Provide a description for the new DB parameter group.

  7. Click Create.

Similarly, create one more DB parameter group for Report RDS.

Step 2. Edit the DB parameter group you created above.

Edit the APP RDS parameter group:

  • Select "Parameter Groups" option from the left panel and select the App parameter group that you have created in Step 1. Edit Parameters for the selected parameter group as follows.

Parameter

Value

Parameter

Value

binlog_format

ROW

character_set_client

utf8mb4

character-set-client-handshake

0

character_set_server

utf8mb4

collation_server

utf8mb4_unicode_ci

group_concat_max_len

500000000

innodb_autoinc_lock_mode

2

innodb_thread_concurrency

10

log_bin_trust_function_creators

1

lower_case_table_names

1

max_allowed_packet

536870912

sql_mode

NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO

thread_cache_size

200

Edit the Report RDS parameter group:

  • Select "Parameter Groups" option from the left panel and select the Report parameter group that you have created in Step 1. Edit Parameters for the selected parameter group as follows.

Parameter

Value

Parameter

Value

character-set-client-handshake

0

group_concat_max_len

500000000

innodb_autoinc_lock_mode

2

innodb_strict_mode

0

lower_case_table_names

1

max_allowed_packet

536870912

thread_cache_size

200

Step 3. Create an RDS for QMetry APPLICATION DB and follow the steps below

  1. Create an RDS with MySQL database version 8.0.32

  2. Provide RDS Name, Username and Password.

  3. Select the Application DB Parameter Group that you have created in Step 2. 

  • RDS > Databases > Actions > Start RDS Service.

  • Connect to the QMetry Application’s RDS DB, and execute the below query - which ensures whenever RDS restarts, mysql bin logs are not deleted - which is essential for dependable reports data sync.

    • call mysql.rds_set_configuration('binlog retention hours', 24);

Save the following details for QMetry Installation noted for QMetry App DB RDS.

  • RDS username

  • RDS password

  • RDS Database Schema name

  • RDS Endpoint

Step 4. Create an RDS for QMetry REPORTS DB and follow the steps below

  1. Create an RDS with MySQL database version 8.0.32

  2. Provide RDS Name, Username and Password

  3. Select the Reports DB Parameter Group that you have created in Step 2. 

  4. Connect to the QMetry Report’s RDS DB and create a reports database named “qtmanalytics“ using the following query.

    • CREATE SCHEMA `qtmanalytics` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Save the following details for QMetry Reports Installation noted for QMetry Reports DB RDS.

  • RDS username

  • RDS password

  • RDS Database Schema name

  • RDS Endpoint

Installing QMetry Application

Pre-requisites

  1. Create file system for QMetry using the AWS EFS service, which can be shared across all QMetry application nodes.

    • AWS EFS must be accessible to all EC2 servers of QMetry application. Ensure that required port #2049 in open for incoming connections in the security group to allow connections from AWS EC2.

  2. While creating an EC2 instance for the application server, go to Configure Storage > File Systems > EFS and select File System created in the previous step.

  3. Also mount the EFS to an appropriate directory in the EC2 server. For example: If you choose a directory /opt/qmetryapp, then this directory should be specified as application directory at the time of QMetry installation

Step 1. Copy the QMetryApp.zip received from QMetry Support to your server. Navigate to the directory where this file is kept and execute the following commands.

  • sudo su -

  • unzip QMetryApp.zip

  • cd QMetryApp

Step 2. Execute the following command.

  • chmod +x qmetry.sh

  • sh qmetry.sh

The next question during the installation process will be as follows.

Options

Allowed Values

Default Value

Recommended Value

Options

Allowed Values

Default Value

Recommended Value

Do you want to make an online installation (Y/N)?

Y, y, N, n

Y

Y

Then you will be asked for credentials. Enter docker credentials shared as a part of the installation package.

Step 3. Next, the installation process will prompt for directory path on the host machine to store QMetry application’s file related data like attachments, license, import, export files etc. You can enter any path of the host machine to store QMetry application’s file related data. If the mentioned directory does not exist on the given path, it will get created automatically during the installation process.

Options

Description

Example

Options

Description

Example

Please enter QMetry application directory  

Enter the EFS file system directory mounted for QMetry installation from the pre-requisites section above step 1.

/opt/qmetryapp

Note: It is highly recommended to take periodic backup of the directory which is specified as a location to store QMetry application’s file related data to prevent any data loss in case of any disaster.

Step 4. Once the script finishes executing, it will prompt to enter the following parameters:

Options

Details

Default Value

Example

Enter QMetry Database Hostname

Enter QMetry Database Host as DNS/IP Address

<RDS DB Endpoint>

Enter RDS DB Endpoint

Enter QMetry Database Port

Enter QMetry Database Port. If it is unchanged, use "3306" as the Database port.

3306

3306

Enter QMetry Database Schema

QMetry Application Database schema name.

qmetry

qmetry

Enter QMetry Database Username

QMetry Application Database root user name

-

dbadmin

Enter QMetry Database Password (root user)

Enter QMetry Application Database Password for the root user.

-

QMetry@123

Enter QMetry User (admin) Email (admin user)

Enter QMetry user email address for Admin.

-

admin@qmetry.com

Enter QMetry User (admin) Password

Enter QMetry user password for Admin.

-

Admin@123

Enter Min. Heap Memory for the webserver

Enter Heap Memory in GB(s)

2

2

Enter Max. Heap Memory for the webserver

Enter Heap Memory in GB(s)

4

4

Enter QMetry Database Connection Pool Size

Enter Pool Size in number format

100

100

The installation may take a while.

After successful installation of QMetry Application, you will see the message "QMetry Application Installation is complete".

Once the installation is complete, execute the following command.

  • docker ps

Step 5. Getting your QMetry License and Installing it.

  1. For users evaluating QMetry

    • You should have received an evaluation license valid for 30 days along with the installation.

  2. For users requiring a commercial license:

    • Server's domain name and mac address are required to generate your QMetry License. Follow the below steps to get your server mac address and send this information along with the domain name to QMetry Support to get your QMetry License generated. Send an email to qtmprofessional@qmetrysupport.atlassian.net to reach QMetry Support.

      • Execute the below command to get your server mac address. Then send the MAC address to QMetry Support to receive the license file.

        • ifconfig (MAC address of Ethernet card e.g. eth0/eth1 )

      • Once you receive license.key from QMetry Support, you can follow the Steps to Apply License file.

Step 6. Access the QMetry application using the following address.

http://<your IP Address OR Domain Name>

Default QMetry login credentials.

  • Username: admin

  • Password: <specified password in Step #4>

Step 7. After the above steps are completed, login to QMetry application with “admin“ user.

  • On the top right corner, go to "Admin" Profile and edit the Profile.

  • Update Email of Admin in the Email field.

  • Enter the Base URL as your QMetry URL.

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

Installing QMetry Reports

If you have purchased Advanced Reporting, then you will need a separate server for installing QMetry Reports.

Step 1. Connect to Report Server and Download the installer file QMetryReport.zip

Upload the QMetryReport.zip to the /opt directory of the Report server and unzip it.

  • sudo su -

  • cd /opt

  • unzip QMetryReport.zip

  • cd QMetryReport/

Step 2. Run the reports installer file.

  • chmod +x qmetry.sh

  • sh qmetry.sh

You will be asked for credentials. Enter docker credentials shared as a part of installation package.

Step 3. Once the installation initiates, it will prompt to enter the following parameters:

Options

Details

Default Value

Example

Options

Details

Default Value

Example

Enter Number of CPU's to allocate

Allocate 3/4th of the available CPUs. For example, if CPU has 8 cores, enter 6.

To check total CPUs, run the command : lscpu

4

6

Enter Memory to allocate in GB(s)

Entered memory would be used by the sync job while running full sync of data. Enter 3/4th of total memory available on the server. For example, if the memory on the server is 24 GB, enter 18

4

18

Wait for the script file to finish executing.

Once the script finishes executing it will prompt to enter the following parameters.

Options

Details

Example

Options

Details

Example

Enter Mysql Database Host IP / DNS Name (Qmetry)

Enter Database Host Public IP/DNS of QMetry application.

Specify QMetry App RDS DB Endpoint

Enter Mysql Database Port (Qmetry)

Enter Database Port of QMetry application. If it is unchanged, use "3306" as Database port.

3306

Enter Mysql Database Schema (Qmetry)

Enter Database schema name of QMetry application.

qmetry

Enter Mysql Database Username (Qmetry)

Enter Database username of QMetry application. If it is unchanged, use "root" as username.

root

Enter Mysql Database Password (Qmetry)

Enter Database password of QMetry application.

QMetry@123

Enter Mysql Database Host IP / DNS Name (Reports)

Enter Database Host Public IP/DNS of QMetry Report.

Specify QMetry Reports RDS DB Endpoint

Enter Mysql Database Port (Reports)

Enter Database Port of QMetry Report Database. If it is unchanged, enter "3306" as Database Port.

3306

Enter Mysql Database Schema (Reports)

Enter Database schema name as “qtmanalytics“ for QMetry Reports Database. 

qtmanalytics

Enter Mysql Database Username (Reports)

Enter Database username of QMetry Reports Database. If it is unchanged, use "root" as username.

root

Enter Mysql Database Password (Reports)

Enter Database password of QMetry Reports Database.

QMetryreports@!Nf0#

Enter Port To Start SyncJob (Reports)

Reports Sync Job runs from this port - 8080.

8080

Do you want to Run Force Sync Now? (y/n)

Enter to sync all the QMetry data to Reports Database with the current script.

→ Always enter y at the time of fresh reports install.

y

Enter Memory to allocate in GB(s) to Spark

Entered memory would be used by the sync job while running full sync of data. Enter 3/4th of total memory available on the server. For example, if the memory on the server is 24 GB, enter 18.

18

After successful installation of QMetry Report, you will see the message "QMetry Report Installation is complete".

Note: In cases when you need to force sync to re-sync any missing data, just repeat step 4, and skip qll parameter details (by hitting enter) and just enter when prompted for a force sync.

Wait for the script to finish executing.

After waiting for about a minute, command docker ps should return the following: 

Step 4. Restart Reports Services.

  • docker restart qmetry-reports

  • Wait for about 2 minutes before proceeding with the next step.

Step 5. Log into QMetry with 'admin' user login, and configure the reports server URL in the configuration menu.

Go to QMetry > Customization > Insight Configuration.

  • Under Database Configuration tab

    • Enter Host: Reports Server Host Public IP/DNS

    • Enter Port: 3306

    • Enter Username: root

    • Enter Password: <user specified password in Step #3>

    • Enter Database Name: <user specified name in Step#3>

Click Test to ensure successful connection and then hit "Test & Save".

  • Under Sync Data tab, setup the Report Data Sync from your reports server to QMetry Reporting. 

    • Report Server URL: This should be set to your report server domain URL followed by port 8080 as shown below. Ensure port 8080 is open on the reports server.

    • Click on Test to ensure successful connection and then hit "Test & Save".

    • Hit "Sync Data" to start Reports Data Sync.

Note: "Sync Data" is required the first time after reports installation. Time taken to sync depends on amount of data in QMetry. Sync Progress and Status can be monitored as shown in the below screenshot. QMetry custom reports remain inaccessible during a sync in progress and is recommended to be run only during off-peak hours.

Users can start using QMetry Reports when the sync is completed. QMetry remains available during this time.

 

Your QMetry and Reports Installation is complete here.

Enabling Redis Caching Cluster (optional)

QMetry provides a capability for improving the overall performance and scalability even more by setting up Redis Caching Cluster. This step is optional. Follow the below steps to configure Redis Cache.

  1. Create a Redis cluster using AWS ElastiCache service for the Redis v6.2.

  2. AWS ElastiCache Redis Cluster should be accessible to all the EC2 servers of QMetry application for caching related communication and configuration.

    • Ensure port #6379 is opened for incoming connections in the security group to allow connections from AWS EC2.

    • Port #6379 should be free and not in use by other applications.

  3. Configure Redis connection details in QMetry.

    1. Login to QMetry Application using “admin“ account, and go to the top right corner admin > Profile section. Edit the Profile.

    2. Enter the Redis URL and Test. In case, the test fails, check and ensure connectivity between ElastiCache Redis Cluster and AWS EC2.

    3. Upon successful Test, update the details.

       

Install Automation API Features

Installing the Automation API with your on-premise QMetry installations will enable several automation API related features including faster automation result file imports into QMetry. If you plan to use Automation APIs to import test results into QMetry, refer to Installation for Automation API.

 

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