Install Automation API Feature for Offline Installations

In this guide, we'll run you through the installation steps of Automation API. 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. Refer to https://qmetrysupport.atlassian.net/wiki/spaces/QTMSv816/pages/3541119143 for more details.

Automation API Installation Options

  • Option 1: If you want to use the same server on which the QTM Application is installed, then you can install Automation API on it.

  • Option 2 (Recommended): If you are going to make heavy usage of Automation API, then we strongly recommend you install Active MQ, Automation API, and Redis Caching on a separate server.

    • If you are opting for Option 2, the following are hardware requirements for Active MQ and Automation API Server.

Automation API Server Hardware Requirements

 

Small Teams 

< 50 Users

Medium Teams

< 500 Users

Large Teams

500+ Users

 

Min

Recommended

Min

Recommended

Min

Recommended

Memory

4 Gb

8 Gb

8 Gb

16 Gb

16 Gb

32 Gb

CPUs

2 Core

4 Core

4 Core

12 Core

12 Core

24 Core

Installation Requirements

  1. QMetry Application should be pre-installed.

  2. Redis server configured with QTM Application.

  3. Active MQ server configured with QTM Application

Pre-requisites for the Installation

  1. QMetry Application should have been installed. Refer to the following document to install the QMetry Application. Follow Steps 1 to (up to Enter Base URL) mentioned in the Install QMetry Application section. Please note that Step 8 is mandatory. Refer: https://qmetrysupport.atlassian.net/wiki/spaces/QTMSv816/pages/3541043446

  2. All the servers should have the support of these commands: unzip, curl, and vim.

  3. Docker installation requires root user access.

  4. Get the QMetryAutomationAPI.zip, QMetryActiveMQ.zip, and QMetryRedis.zip file from QMetry Support.

  5. The following should be installed on the server:

    • CentOS, RHEL-7 and RHEL-8

    • Docker Version 20.10.13

    • Docker Compose Version v2.5.0

    • Yum-tools

  6. Make sure that the docker service has been configured on the server to start automatically on reboot of the server.

  7. The Internet-enabled machine on which the docker images are downloaded should support the docker command.

  8. The following Ports should be open:

Installation

Ports that need to be enabled and should be available for use

Installation

Ports that need to be enabled and should be available for use

Redis Caching Server

6379

Active MQ Server

8181 & 61616

Automation API Server

8081

Step 1. Download Docker Images

Follow these steps on a machine where the internet is accessible so that the docker images can be downloaded on it. 

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 the docker credentials, it will show the success message as shown below.

Download Docker Images of Redis Server:

Follow these steps on the Internet-enabled machine on which the docker image of Redis Server is to be downloaded.

1. Execute the following commands to pull QMetry activemq’s docker image from the docker repository.

  • docker pull qmetry/qmetry:redis7010

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 the docker image has been downloaded successfully.

  • docker images

2. Execute the following command to save QMetry Redis Server's docker image as .tar file. You can change the path of .tar file in the following command.

  • docker save -o /opt/qtm/qmetryredis.tar qmetry/qmetry:redis7010

3. Transfer the qmetryredis.tar file to the QMetry Redis Server.

Download Docker Images of Active MQ Server

Follow these steps on the Internet-enabled machine on which the docker image of Active MQ Server is to be downloaded.

1. Execute the following commands to pull QMetry activemq’s docker image from the docker repository.

  • docker pull qmetry/qmetry:activemq_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 the docker image has been downloaded successfully.

  • docker images

2. Execute the following command to save QMetry Active MQ Server's docker image as .tar file. You can change the path of .tar file in the following command.

  • docker save -o /opt/qtm/qmetryactivemq.tar qmetry/qmetry:activemq_latest

3. Transfer the qmetryactivemq.tar file to the QMetry Active MQ Server.

Download Docker Images of Automation API Server

Follow these steps on the Internet-enabled machine on which the docker image of the Automation API Server is to be downloaded.

1. Execute the following commands to pull QMetry Automation API’s docker image from the docker repository.

  • docker pull qmetry/qmetry:automation_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 successfully.

  • docker images

2. Execute the following command to save QMetry Automation API Server's docker image as .tar file. You can change the path of .tar file in the following command.

  • docker save -o /opt/qtm/qmetryautomation.tar qmetry/qmetry:automation_latest

3. Transfer the qmetryautomation.tar file to the QMetry Automation API Server.

Step 2. Install Redis Server

QMetry is supporting Redis from its version 7.0.10 onwards. Currently, the Docker will be installed with Redis version 7.0.10.

Follow the steps mentioned below.

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

  • sudo docker load -i qmetryredis.tar

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

  • sudo docker images

2.2 Copy the QMetryRedis.zip installation file received from QMetry Support to your server and unzip it. Navigate to the directory where these files are saved.

  • unzip QMetryRedis.zip

  • cd QMetryRedis

2.3 Execute the following commands.

  • sudo su

  • chmod +x qmetry.sh

  • sh qmetry.sh

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

Options

Enter Value

Options

Enter Value

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

N

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

  • docker ps

The following message will be displayed.

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

  • Go to "Admin" Profile and Edit the Profile.

  • Update QMetry Redis URL

For more details on Redis, visit https://redis.io/.

Configure the Redis with QMetry Application as mentioned in 2.4. If you are facing any issues from the QMetry Application side after 2.4, then you may be required to restart the QMetry Application docker container after 2.4.

Step 3. Install Active MQ

Get the QMetryActiveMQ.zip file from QMetry Support and copy it to the server for Automation API installation.

Follow the steps mentioned below.

3.1 On QMetry Active MQ server, navigate to the directory where the .tar file has been placed and execute the following command.

  • sudo docker load -i qmetryactivemq.tar

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

  • sudo docker images

3.2 Copy the QMetryActiveMQ.zip installation file received from QMetry Support to your server and unzip it. Navigate to the directory where these files are saved.

  • unzip QMetryActiveMQ.zip

3.3 Execute the following commands.

  • sudo su

  • chmod +x activemq-install.sh

  • sh activemq-install.sh

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

Options

Enter Value

Options

Enter Value

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

N

Users are required to enter the value of the following configuration parameters:

Options

Details

Default Values

Example

Options

Details

Default Values

Example

 Enter activemq username

-

-

admin

 Enter activemq password

-

-

admin

The installation may take a while.

Once the installation is complete, execute the following command.

  • docker ps

The following message will be displayed.

3.4 Configure the Active MQ in QMetry Application.

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

  • Go to "Admin" Profile and Edit the Profile.

  • Update MQ URL, MQ Username, and MQ Password.

The ActiveMQ URL should be in the format of "ssl/dns:port".

For example, "tcp://<activeMQ-Host>:61616"

3.5 Restart the QMetry Application docker container.

Step 4: Install / Upgrade Automation API Server

4.1 On the QMetry Automation API server, navigate to the directory where the .tar file has been placed and execute the following command.

  • sudo docker load -i qmetryautomation.tar

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

  • docker images

4.3 Copy the QMetryAutomationAPI.zip installation file received from QMetry Support to your server and unzip it. Navigate to the directory where these files are saved.

  • unzip QMetryAutomationAPI.zip

4.4 Execute the following commands.

  • sudo su

  • chmod +x qmetry-automation-api-install-upgrade.sh

  • sh qmetry-automation-api-install-upgrade.sh

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

Options

Enter Value

Options

Enter Value

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

N

Users are required to enter the value of the following configuration parameters.

Options

Details

Default Value

Example

Enter QMetry(QTM) database host (localhost)

Note: In case of AWS installation enter the private IP of the AWS instance where the QTM Application's database is installed.

localhost

QTM Application's database host

Enter QMetry(QTM) database port (3306)

-

3306

3306

Enter QMetry(QTM) database schema (qmetry)

-

qmetry

qmetry

Enter QMetry(QTM) database user (root)

-

root

root

Enter QMetry(QTM) database password

-

-

qmetry

Enter QMetry(QTM) database min connection (32)

-

32

32

Enter QMetry(QTM) database max connection (50)

-

50

50

Enter min threads (2)

-

2

2

Enter max threads (2)

-

2

2

Enter Redis host (localhost)

Note: In case of AWS installation enter the private IP of the AWS instance where Redis is installed.

localhost

redis host

Enter Redis port (6379)

-

6379

6379

Enter MQ URL (tcp://localhost:61616):

Note: In case of AWS installation enter the private IP of the AWS instance where Redis is installed. EG: tcp://10.0.0.16:61616

tcp://localhost:61616

tcp://<activeMQ-Host>:61616

Enter MQ user (admin)

-

admin

admin

Enter MQ password

-

-

-

The installation may take a while.

Once the installation is complete, execute the following command.

  • docker ps

The following message will be displayed.

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