QMetry and Reports Installation on AWS Cloud - 3-Tier

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


AWS 3 Tier Architecture

Server 1QMetry App
Server 2QMetry Reports
AWS RDSQMetry DB

Pre-requisites

For additional information on verifying pre-requisites refer this article.

  1. The three servers should be on the same network and able to communicate with each other. Refer QMetry Deployment Document for the requirements.
  2. All the servers should have support of these commands: unzip, wget, curl and vim.
  3. Internet access should be enabled on all 3 servers to install using docker.
  4. Ensure Proxy Servers are not blocking downloads from the Internet.
  5. 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.
  6. QMetry 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.
  7. Docker is installed under /var/lib/ directory. We recommend allocating enough space here to ensure QMetry has enough space to save your data.
    • Data of QMetry attachments added is saved under : /var/lib/docker/volumes/qmetry_attachment/_data
  8. Get the following files from QMetry Support: QMetryApp.zip, Spark_Report_Install.zip, License and docker credentials required for installation.
  9. Post installation, QMetry Application and Report tool both should be configured either on https or http.
  10. Following Ports should be open on respective servers:
InstallationPorts that need to be enabled
QMetry Database Server3306
QMetry Application80/443
QMetry Reporting Tool80/443, 8080, & 33061

Setting up QMetry DB Server in AWS

For database you need to setup a RDS.

Step 1. Create a DB parameter group 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 mysql 5.7 as DB parameter group family.
  5. Group name: Provide name of the new DB parameter group.
  6. Description: Provide a description for the new DB parameter group.
  7. Click Create.

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

  • Login to AWS Management Console and open the Amazon RDS console.
  • RDS > Databases > Actions > Stop RDS Service.
  • Go to Configurations tab > Parameter Group.
  • Search and then add / edit the following parameters.
ParametersValues

lower_case_table_names

1

max_allowed_packet

536870912
character_set_serverutf8mb4
collation_serverutf8mb4_unicode_ci
innodb_thread_concurrency10
query_cache_limit1073741824
table_definition_cache2000
group_concat_max_len1536000
innodb_autoinc_lock_mode2

tx_isolation

REPEATABLE-READ
sql_modeSTRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
binlog_error_actionABORT_SERVER
binlog_formatROW
binlog_group_commit_sync_delay0
binlog_group_commit_sync_no_delay_count0
binlog_gtid_simple_recovery 1
binlog_max_flush_queue_time0
binlog_order_commits1
binlog_row_imageFULL
binlog_rows_query_log_events 0
binlog_stmt_cache_size32768
max_binlog_stmt_cache_size18446744073709547520
log_bin_trust_function_creators1
log_bin_use_v1_row_events0
  • RDS > Databases > Actions > Start RDS Service.
  • Connect to the 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);

Step 3.

  1. Create an RDS with MySQL database version 5.7.29
  2. Provide RDS Name, Username and Password
  3. Select Parameter Group that you have created in Step 2. 

Save the following details for QMetry Installation. 

  • RDS username
  • RDS password
  • RDS Database Schema name
  • RDS Endpoint

Installing QMetry Application

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 QMetry

Step 2. Modify docker-compose.yml file with the MySQL DB details:

  1. DB_HOST = Specify RDS Endpoint
  2. DB_Schema = Specify RDS database schema name
  3. DB_Port = 3306
  4. DB_User = Specify RDS Username 
  5. DB_Pass = Specify RDS Password

Execute the below commands:

  • vim docker-compose.yml, press "i" to go to insert mode and update these parameters.
  • Once updated, press Esc followed by : + wq to save the changes.

Step 3. Execute the following command.

  • chmod +x QMetry.sh
  • sh -x QMetry.sh

Step 4. Enable Service for Docker Engine

  • systemctl start docker
  • systemctl enable docker

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

The installation may take a while. Once the installation is complete, execute the following command.

  • docker ps

The following message will be displayed.


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 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 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 QMetry application using the following details:

  • URL: http://<IP Address>:<Port No.>
  • Default QMetry login credentials.
    • Username: admin
    • Password: qmetry@123

Note : This installation installs QMetry over Apache Tomcat 9.x, and Open JDK 11 in a docker container.

Step 7. After the above steps are completed, log into QMetry application.

  • Go to "Admin" Profile and Edit the Profile.
  • Update Email of Admin in the Email field.
  • Enter 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 Reporting

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

This step we'll run you through installing QMetry Test Management Reports in your environment.

Hardware Configurations Recommended

Supported OS : Linux - Cent OS 7 and 8, RHEL 7 and 8

 Server Configurations

Small Teams  < 50 Users

Medium Teams < 500 Users

Large Teams  500+ Users

Stand Alone Server

 

Min

Recommended

Min

Recommended

Min

Recommended

CPU

4 Cores

4 Core

8 Core

16 Core

16 Core

24 - 32 Core

Memory

8 GB

16 GB

16 GB

24 GB

32 GB

32 - 64 GB

HDD (Free Space)

100 GB

250 GB

50 GB

100 GB

50 GB

500 GB

Steps to Install QMetry Reports

Step 1 - Connect to Report Server and Download the file. 

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

  • sudo su -
  • cd /opt
  • unzip Spark_Report_Install.zip
  • cd Spark_Report_Install/

Step 2 - Run the reports installer file

  • chmod +x spark-install.sh
  • sh spark-install.sh
  • The install script prompts the following options
OptionsDetailsExample
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

6
Memory to allocate in GB(s)

Allocate 3/4th of total memory on server. For example for 24GB, enter 18

To check total memory, run the command : free -h

18

Wait for the script file to finish executing.

Step 3 - Add reports configuration to the apps file by executing it

  • cd /var/lib/docker/volumes/spark_report_spark-apps/_data
  • sh ConfigureSyncApp.sh 

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

OptionsDetailsExample
Enter Mysql Database Host IP / DNS Name (Qmetry)QMetry DB Host Public IP/DNS10.10.11.100
Enter Mysql Database Port (Qmetry)QMetry App MySQL DB Port. Enter 3306, unless QMetry DB port is different3306
Enter Mysql Database Schema (Qmetry)QMetry App DB schema name. Enter : qmetryqmetry
Enter Mysql Database Username (Qmetry)QMetry App DB username. Enter : rootroot
Enter Mysql Database Password (Qmetry)QMetry App DB password. If it is unchanged from default, enter : qmetryqmetry
Enter Mysql Database Host IP / DNS Name (Reports)Enter the static docker IP : 10.5.0.7 as the IP address of QMetry Reports server10.5.0.7
Enter Mysql Database Port (Reports)Enter the port where reports DB is running. Enter : 3306

3306

Enter Mysql Database Schema (Reports)Enter the database schema name of QMetry Reports DB - qtmanalytics
Enter Mysql Database Username (Reports)Enter username of QMetry Reports DBroot
Enter Mysql Database Password (Reports)Enter password of QMetry Reports DB - qmetryreports@!Nf0#qmetryreports@!Nf0#
Enter Port To Start SyncJob (Reports)Reports Sync Job runs from this port : 80808080
Do you want to Run Force Sync Now ? (y/n)Enter to sync all the QMetry data to Reports DB with the current script. Always enter y at the time of fresh reports installType : y
Enter Memory to allocate in GB(s) to SparkEntered memory would be used by the sync job while running a full sync of data. Enter 3/4th of total memory available on server. For example, if memory on server is 24 GB, enter 1818

Note: In cases when you need to force sync to re-sync any missing data, just repeat step 3, 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 qmetry-reports-db

 Step 5 - Login to 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 : 33061
    • Enter Username : root
    • Enter Password : qmetryreports@!Nf0#
    • Enter Database Name : qtmanalytics

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

Installing Redis Caching Server

With the release of v8.5.2, QMetry is providing capability of installing Redis server. Overall performance and scalability can be improved using Redis caching. To install the Redis Server, refer to Installing Redis Caching Server.


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