1.1.2 Install qTest Sessions 3.0.9 using Docker on CentOS/Ubuntu with Load Balancing

In this article, we'll run you through installing qTest Sessions 3.0.9 (using Docker) on different CentOS/ Ubuntu machines with a Load Balancer, then connect it to qTest Manager 8.4.4 on another machine.

Before you begin

Before you install qTest Sessions, make sure following things are done:

  • Your machines need to satisfy qTest's recommended hardware requirement
  • Docker 17.03 has been installed. Follow these instructions to install Docker on your machine
  • For CentOS, you need to follow additional instructions to adjust Docker Storage Driver from overlay to devicemapper.
  • For CentOS 7.X+ or Ubuntu 16.10 machines: Docker requires a 64-bit installation and your kernel must be at least 3.10 
  • Set up a shared directory where all machines you uses in the load balancing are able to access.

 

Install qTest Sessions with Load Balancer

Example: Image below tries to demonstrate how to configure qTest Sesssions with load balancer for 4 machines: 

  • Machine 1: considered as a cluster, deploy qTest Sessions' prerequisite apps: redis, postgres, elasticsearch
  • Machine 2: deploy qTest Sessions 3.0.9 (sessions)
  • Machine 3: deploy qTest Sessions 3.0.9 (sessions)
  • Machine 4: deploy qTest Sessions load balancer (sessionslb)

NOTE

  • Cluster machine has to open 2 ports: 53 and 6783

 

Deployment Instructions 

Access to each of 4 machine where Docker has been installed using root or a user which has been added to docker user group:

  • Repeat step 1, step 2, step 3 in all 4 machines,
  • Then configure each machine in sequence (Machine 1, 2, 3, 4) 

NOTE

  • Pre-requisite applications of qTest Sessions should be deployed in a separated machine rather than in the same machine with qTest Sessions (sessions)
  • The load balancer application (sessionslb) should be deployed after all other apps get deployed.

Step 1. Download docker-deloyment-4.0 package  

 $ wget https://qtest-storage.s3.amazonaws.com/docker/deployment/docker-deployment-4.0.tar.gz 

Step 2. Extract the package 

 $ tar -zxf docker-deployment-4.0.tar.gz 

Step 3. Access to the package directory (docker-deployment-4.0)

 $ cd docker-deployment-4.0

 

Machine 1 (the cluster)

1.1 Deploy redis, postgres, elasticsearch into Machine 1

  • Specify prerequisite apps: redis, postgres, elasticsearch
 $ ./configure --apps "redis postgres elasticsearch" 

1.2 Modify configure file to ensure the "datadir" variable point to a shared directory where all 4 machines are able to access.

 $ vim profiles/default.in 

1.3 Start the deployment 

 $ ./startup 

 

Machine 2  

  • If you want to deploy the qTest Sessions with HTTP, go to step 2.1, ignore 2.2
  • If you want to deploy the qTest Sessions with HTTPS, go to step 2.2

2.1 Deploy sessions (qTest Sessions 3.0.9) with HTTP into Machine 2:

  • sessions-url: IP of machine 4 (the load balancer)
  • sessions-http: sessions port of machine 4 (the load balancer)
  • cluster: IP of machine 1
  • apps: sessions
 $ ./configure --sessions-url "http://<IP of machine 4>:<sessions port of machine 4>" --sessions-http "<sessions port of machine 4>" --cluster "<IP of machine1>" --apps "sessions" 
  • Modify configure file to ensure the "datadir" variable point to a shared directory where all 4 machines are able to access.
 $ vim profiles/default.in
  • Start the deployment 
 $ ./startup 

2.2 Deploy sessions (qTest Sessions 3.0.9) with HTTPS into Machine 2:

  • Specify path to ssl-key, ssl-cert, ssl-ca
  • sessions-url: IP of machine 4
  • sessions-https: sessions https port of machine 4
  • cluster: IP of machine 1
  • apps: sessions
 $ ./configure --ssl-key "<SSL Key>" --ssl-cert "<SSL Cert>" --ssl-ca "<SSL CA>" --sessions-url "https://<IP of machine 4>:<sessions https port of machine 4>" --sessions-https "<sessions https port of machine 4>" --cluster "<IP of  machine1>" --apps "sessions" 

  • Modify configure file to ensure the "datadir" variable point to a shared directory where all 4 machines are able to access.
 $ vim profiles/default.in
  • Start the deployment 
 $ ./startup 

 

Machine 3 

  • If you want to deploy the qTest Sessions with HTTP, go to step 3.1, ignore 3.2
  • If you want to deploy the qTest Sessions with HTTPS, go to step 3.2

3.1 Deploy sessions (qTest Sessions 3.0.9) with HTTP into Machine 3:

  • sessions-url: IP of machine 4 (the load balancer)
  • sessions-http: sessions port of machine 4 (the load balancer)
  • cluster: IP of machine 1
  • apps : sessions
 $ ./configure --sessions-url "http://<IP of machine 4>:<sessions port of machine 4>" --sessions-http "<sessions port of machine 4>" --cluster "<IP of Machine 1>" --apps "sessions"
  • Modify configure file to ensure the "datadir" variable point to a shared directory where all 4 machines are able to access.
 $ vim profiles/default.in
  • Start the deployment 
 $ ./startup 

3.2 Deploy sessions (qTest Sessions 3.0.9) with HTTPS into Machine 3:

  • Specify path to ssl-key, ssl-cert, ssl-ca
  • sessions-url: IP of machine 4
  • sessions-https: sessions https port of machine 4
  • cluster: IP of machine 1
  • apps: sessions
 $ ./configure --ssl-key "<SSL Key>" --ssl-cert "<SSL Cert>" --ssl-ca "<SSL CA>" --sessions-url "https://<IP of machine 4>:<sessions https port of machine 4>" --sessions-https "<sessions https port of machine 4>" --cluster "<IP of Machine1>" --apps "sessions"

  • Modify configure file to ensure the "datadir" variable point to a shared directory where all 4 machines are able to access.
 $ vim profiles/default.in
  • Start the deployment 
 $ ./startup 

 

Machine 4 (load balancer) 

Deploy sessionslb into machine 4

  • If you want to deploy the qTest Sessions with HTTP, go to step 4.1, ignore 4.2
  • If you want to deploy the qTest Sessions with HTTPS, go to step 4.2

4.1 Deploy qtestlb with HTTP into Machine 4:

  • sessions-url: IP of machine 4 (the load balancer)
  • sessions-http: sessions port of machine 4 (the load balancer)
  • cluster: IP of machine 1
  • apps: sessionslb
 $ ./configure --apps "sessionslb" --sessions-url "http://<IP of machine 4>:<sessions port of machine 4>" --sessions-http "<sessions port of machine 4>" --cluster "<IP of Machine 1>"
  • Modify configure file to ensure the "datadir" variable point to a shared directory where all 4 machines are able to access.
 $ vim profiles/default.in
  • Start the deployment 
 $ ./startup 

4.2 Deploy sessionslb with HTTPS into Machine 4:

  • Specify path to ssl-key, ssl-cert, ssl-ca
  • sessions-url: IP of machine 4
  • sessions-https: sessions https port of machine 4
  • cluster: IP of machine 1
  • apps: sessionslb
 $ ./configure --apps "sessionslb" --ssl-key "<SSL Key>" --ssl-cert "<SSL Cert>" --ssl-ca "<SSL CA>" --sessions-url "https://<IP of machine 4>:<sessions https port of machine 4>" --sessions-https "<sessions https port of machine 4>" --cluster "<IP of Machine1>"

  • Modify configure file to ensure the "datadir" variable point to a shared directory where all 4 machines are able to access.
 $ vim profiles/default.in
  • Start the deployment 
 $ ./startup 

 

You've done with the installation, please continue with following section to configure qTest Sessions to connect to qTest Manager.

 

 

Configure qTest Sessions

Now you need to specify the qTest Manager to which your qTest Sessions want to communicate. Follow these steps:

Access the link http://[IP of machine4]:[sessions port]/setup to open the admin page 

  • Specify qTest Manager's URL in qTest Account/Url field
  • Specify Master Token. You can get Master Token from the section API/SDK of qTest Manager's Resource page, as below screenshot:
  • mastertoken.png

 

  • Specify Login account for the Sessions admin page
  • Click Connect button

sessionssetuppage.png

 

Configure qTest Manager

You also need to specify the qTest Sessions to which your qTest Manager will communicate, follow these steps:

Access your Administration page

adminpage.png

Under System Configuration page, scroll to section MISCELLANEOUS and enter qTest URL into the field qTest server's Domain.

qtestconfig.png

 

Under System Configuration page, scroll to section QTEST EXPLORER | SESSIONS and enter Sessions URL with the information of machine 4 (the sessionslb), for example:

  • http://<IP of Machine 4>:<Port of Machine 4> if you installed machine 4 without SSL OR
  • https://<IP of Machine 4>:<Port of Machine 4> if you installed machine 4 with SSL

Click Test Connection and wait for qTest Manager to show a message "Connected to server successfully" then click Save to save the configuration.

sessionsconfig.png

That's it! You now can access qTest Sessions via 9box icon

9box.png