Menu

Sessions 4.2 Load Balancer Installation Guide for Docker

Overview

In this article, we provide instructions for installing qTest Sessions 4.2 (using Docker) on different CentOS/ Ubuntu machines with a Load Balancer, then connect it to qTest Manager on another machine.

To request installation assistance or to obtain the links to self-install, please click here to fill out the On-Premise New Install Form.

Note: If you are not performing a fresh install and are upgrading, use the Upgrade Request Form and reference the OnPremise Upgrades Guide.

Before You Begin

  • 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 device mapper.
  • 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 use in the load balancing approach are able to access.

Read the following:

 

Install qTest Sessions with Load Balancer

The same image below demonstrates how to install and configure qTest Sessions with a load balancer: 

  • Machine 1: considered as a cluster, where we deploy qTest Sessions' prerequisite apps: PostgreSQL and Network File System
  • Machine 2: deploy qTest Sessions 4.2
  • Machine 3: deploy qTest Sessions 4.2
  • Machine 4: deploy qTest Sessions load balancer (sessionslb)

NOTE

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

sessions-lb.png

Deployment Instructions 

Prerequisites

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

Access to each of the 4 machines where Docker has been installed using root, or a user who has been added to the Docker user group.

Machine 1 (the cluster)

1. Download docker deployment package.

$ wget <ENTER DOWNLOAD LINK HERE>

2. Extract the package.

$ tar -zxf <DOWNLOADED PACKAGE FILE NAME>

3. Access the extracted package directory.

$ cd <EXTRACTED PACKAGE DIRECTORY>

4. Deploy PostgreSQL into Machine 1

This should have been ready after you installed qTest Manager.

5. Install NFS (Network File Systems)

5.1 Update the repositories:

$ sudo apt-get update

5.2 Install NFS server package with the command below:

$ sudo apt-get install nfs-kernel-server

5.3 Create the directory you want to share with other computers. This is the directory being used to store data created by qTest Sessions applications on other servers:

$ sudo mkdir /shared-sessions-storage

5.4 Edit /etc/exports config file.

Here /etc/exports is the main config file for NFS. See the below examples and add share directories to the config file based on our requirement.

$ vim /etc/exports

Add a line into /etc/exports file to make directory shared-sessions-storage can be access acrossed network.

...
# share access to all network
$ /share-sessions-storage *(rw, sync, no_root_squash)
...

Save and close the file when you are finished.

5.5 Start NFS service

$ sudo /etc/init.d/nfs-kernel-server start

5.6 Check share status

$ sudo exportfs -u
/shared-sessions-storage   <world>

Machine 2 (qTest Sessions)

1. Download docker deployment package.

$ wget <ENTER DOWNLOAD LINK HERE>

2. Extract the package.

$ tar -zxf <DOWNLOADED PACKAGE FILE NAME>

3. Access to extracted package directory.

$ cd <EXTRACTED PACKAGE DIRECTORY>

4. Install and Configure NFS Client

4.1 Execute following command to update and upgrade system packages

$ apt-get update -y && apt-get upgrade -y

4.2 Enter following command to install NFS Client

$ sudo apt-get install nfs-common rpcbind

4.3 Create a directory that will be used as qTest Sessions storage

$ sudo mkdir /sessions-storage

Mount the shared directory in the cluster (whose IP address is 10.0.10.126) to the directory we just created

$ sudo mount 10.0.10.126:/shared-sessions-storage /sessions-storage

Edit the file /etc/fstab using vim

$ vim /etc/fstab

... then add the following line to fstab file for permanent mount. Again, notice the IP address 10.0.10.126 is the IP address of the cluster

10.0.10.126:/shared-sessions-storage /sessions-storage nfs rw,sync,hard,intr 0 0

Save and close the file when you are done.

Check the mounted share directory with mount command:

$ mount
...
10.0.10.126:/shared-sessions-storage on /sessions-storage type nfs4 (rw,relatime,vers=4.0,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.0.10.95,local_lock=none,addr=[public IP Address])
...

Now when there are files being created/updated/deleted by qTest Sessions, they will be created/updated/deleted in the shared-sessions-storage directory in the cluster.

5. Configure qTest Sessions

$ ./configure --apps "sessions" --cluster "<IP of Machine 1>"

Next, modify configuration 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 (qTest Sessions)

1. Download docker deployment package.

$ wget <ENTER DOWNLOAD LINK HERE>

2. Extract the package.

$ tar -zxf <DOWNLOADED PACKAGE FILE NAME>

3. Access to extracted package directory.

$ cd <EXTRACTED PACKAGE DIRECTORY>

4. Install and Configure NFS Client on Machine 3.

This should be same as you did at step #4 on Machine 2

5. Configure qTest Sessions.

$ ./configure --apps "sessions" --cluster "<IP of Machine 1>"

Next, modify configuration 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 (sessionlb - load balancer)

1. Download docker deployment package.

$ wget <ENTER DOWNLOAD LINK HERE>

2. Extract the package.

$ tar -zxf <DOWNLOADED PACKAGE FILE NAME>

3. Access to extracted package directory.

$ cd <EXTRACTED PACKAGE DIRECTORY>

4. Install sessionslb - The load balancer.

Select one of the options below if you want to install sessionslb - the load balancer - with or without SSL.

Deploy sessionslb on Machine 4 without SSL

Execute the command below to deploy qTest Sessions without SSL. The command arguments are explained:

  • sessions-url: public IP address 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://<public IP of machine 4>:<sessions port of machine 4>" --sessions-http "<http port of machine 4>" --cluster "<IP of Machine 1>"

Deploy sessionlb on Machine 4 with SSL

Execute the command below to deploy qTest Sessions with SSL. The command arguments are explained:

  • ssl-key, ssl-cert, ssl-ca: specify paths to ssl key, ssl cert and 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://<public IP of machine 4>:<https port of machine 4>" --sessions-https "<https port of machine 4>" --cluster "<IP of Machine 1>"

Start sessionslb

$ ./startup

Configure qTest Manager 

Login to qTest Manager using administrator account then access the Administration page.

adminpage.png

Next, go to SYSTEM CONFIGURATIONS page then navigate to MISCELLANEOUS section and enter  URL of qTest Manager to qTest server's domain field:

  • http://[qTest_Manager_IPAddress]:[Port] if you install qTest Manager without SSL
  • Or https://[qTest_Manager_IPAddress]:[Port] if you installed qTest Manager with SSL certificate.

system-config-misc-port.png

Next, navigate to section QTEST EXPLORER | SESSIONS and enter Sessions URL with the information of machine 4 (the load balancer):

  • http://<public IP of Machine 4>:<Port of Machine 4> if you installed machine 4 without SSL OR
  • https://<public 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.

system-config-sessions-url.png

Now you can access to qTest Sessions via qTest Manager's nine-box icon

access-sessions-from-9box.png

Subscribe To Our Blog
Powered by Zendesk