Menu

Sessions 4.2.1 Load Balancer Installation Guide for Docker

Overview

In this article, we provide instructions for installing qTest Sessions 4.2.1 (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.1
  • Machine 3: deploy qTest Sessions 4.2.1
  • 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)

Download Docker Deployment Package

$ wget <ENTER DOWNLOAD LINK HERE>

Extract the Package

$ tar -zxf <DOWNLOADED PACKAGE FILE NAME>

Access the Extracted Package Directory

$ cd <EXTRACTED PACKAGE DIRECTORY>

Deploy PostgreSQL into Machine 1

This should have been ready after you installed qTest Manager.

Install NFS (Network File Systems)

  1. Update the repositories:
    $ sudo apt-get update
  2. Install NFS server package with the command below:
    $ sudo apt-get install nfs-kernel-server
  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
  4. Edit /etc/exports config file. Here /etc/exports are 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
  5. Add a line into /etc/exports file to make sure the directory shared-sessions-storage can be accessed across the network. ...
    # share access to all network
    $ /share-sessions-storage *(rw, sync, no_root_squash)
    ...
  6. Save and close the file when you are finished.
  7. Start NFS Service.
    $ sudo /etc/init.d/nfs-kernel-server start
  8. Check share status.
    $ sudo exportfs -u
    /shared-sessions-storage   <world>

Machine 2 (qTest Sessions)

Download Docker Deployment Package

$ wget <ENTER DOWNLOAD LINK HERE>

Extract the Package

$ tar -zxf <DOWNLOADED PACKAGE FILE NAME>

Access the Extracted Package Directory

$ cd <EXTRACTED PACKAGE DIRECTORY>

Install and Configure NFS Client

  1. Execute the following command to update and upgrade system packages.
    $ apt-get update -y && apt-get upgrade -y
  2. Enter the following command to install NFS Client.
    $ sudo apt-get install nfs-common rpcbind
  3. Create a directory that will be used as qTest Sessions storage.
    $ sudo mkdir /sessions-storage
  4. 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
  5. Edit the file /etc/fstab using vim
    $ vim /etc/fstab
    ... then add the following line to the fstab file for a 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
  6. Save and close the file when you are done.
  7. 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])
    ...
  8. 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.

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

Additional Configuration for Sessions Node in a Load Balanced Environment

If you meet ALL of the following conditions, please read this article before restarting your server for an additional configuration step on your Sessions application node:

  • load balancing qTest Sessions 4.2.1
  • using F5 Load Balancer
  • using Internet Explorer to access qTest Sessions

Start the Deployment

$ ./startup

Machine 3 (qTest Sessions)

Download Docker Deployment Package

$ wget <ENTER DOWNLOAD LINK HERE>

Extract the Package

$ tar -zxf <DOWNLOADED PACKAGE FILE NAME>

Access the Extracted Package Directory

$ cd <EXTRACTED PACKAGE DIRECTORY>

Install and Configure NFS Client on Machine 3

This should be same as you did to install and configure the NFS Client on Machine 2 (instructions above.)

Configure qTest Sessions

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

Next, modify the configuration file to ensure the "datadir" variable, point to a shared directory where all 4 machines are able to access.

$ vim profiles/default.in

Additional Configuration for Sessions Node in a Load Balanced Environment

If you meet ALL of the following conditions, please read this article before restarting your server for an additional configuration step on your Sessions application node:

  • load balancing qTest Sessions 4.2.1
  • using F5 Load Balancer
  • using Internet Explorer to access qTest Sessions

Start the Deployment

$ ./startup

Machine 4 (sessionlb - load balancer)

Download Docker Deployment Package

$ wget <ENTER DOWNLOAD LINK HERE>

Extract the Package

$ tar -zxf <DOWNLOADED PACKAGE FILE NAME>

Access the Extracted Package Directory

$ cd <EXTRACTED PACKAGE DIRECTORY>

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

Set up qTest Applications

Please follow this guide: Configure qTest Applications to complete the remaining steps to activate your account.

 

 

Powered by Zendesk