Menu

9.1.5 OnPremise Load Balance Install Guide for Linux Summer 2018

Overview

In this article, we provide instructions to install qTest components for 9.1.5 OnPremise on different CentOS/Ubuntu server machines with a Load Balancer, then connect it to qTest Manager on another machine. Please read the instructions thoroughly before starting your installations.

To request assistance with installation or obtain the self-install links, complete the OnPremise 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.

About the Command Line Wizard

The qTest 9.1.5 Command Line Wizard is a command line interface application that allows you to configure basic settings for qTest applications in your purchase package. 

You should understand these Command Line Wizard characteristics before you begin:

  • For each step, the installer will prompt you for a specific input value. After you provide a value, the installer will validate the input. If the value is incorrect, or additional permissions are required, an explicit error message displays so it’s easy to know how the input value should be corrected.
    • Default values display in square brackets [ ]. To use the default value, simply hit the Enter key.
    • Input values for yes/no questions, should be 'y', 'yes','n', 'no' (ignore case sensitive.) Any value other than those listed will be treated as a 'no.'
  • To terminate the configuration at any time without completing it, press Ctrl+C.
    Hint: In the event you cannot start the Command Line Wizard again after terminating the configuration, backup then remove the qtest.config file. Retry to start the Command Line Wizard again.

Known Limitation

  • The Command Line Wizard and qtestctl do not support the character "$". Therefore, a password, username, or any other value that you would enter in a prompt should not contain "$." 

Before You Begin

Read the following:

Please note that the Command Line Wizard will prompt you for each installation instruction. You will need to perform action items and gather specific connection information before you begin the installation process. Use the application checklist below to ensure you have all the required values readily available.

Ports

Open the Ports for the prerequisite applications and qTest applications you will be installing prior to any self/assisted installation or upgrade. You should only open the HTTPS ports if you plan to serve SSL from the application.

PREREQUISITE APPLICATIONS

Product  Port
PostgreSQL 5432
Network Drive 2049
MongoDB 27017

LINUX NON-DOCKER AND WINDOWS

Product HTTP Port HTTPS Port
Manager 8080 8443 
Sessions 9080 9443
Scenario 6080 4443
Insights 10080 10443
Parameters 5080 5080
Pulse 4080 4080
Launch 3080 3080

IMPORTANT: Suggested application ports are listed above, however you are allowed to use a port of your choosing for the qTest applications you install.

Application Checklist

You will need to gather the following information for each application prior to beginning the installation and configuration.

PostgreSQL-must be installed prior to qTest application installation

  • Hostname or IP address
    Note: Do not include the port or protocol in the hostname or IP address, as they will be entered separately in the installer wizard.
  • Port
  • PostgreSQL's User Name
  • PostgreSQL's Password
    Important: Ensure that the Postgres user is a 'Superuser' who has the following permissions: read, write, create/delete/modify database/tables/schema/functions/sequences/triggers/views

 

MongoDB-must be installed prior to qTest application installation

  • Hostname or IP address with Port
  • If your MongoDB is running with replication, you will need the replica set
  • MongoDB's User Name
  • MongoDB's password
  • MongoDB's Authentication Database
  • MongoDB for Pulse

 

SSL Configuration (if applicable)
This information is only needed if you will be deploying with an SSL secured connection.

  • Certificate File-absolute path to the certificate file on this server.
    • Please use / in the path. Recommend copying the path from system file browser. Login user in the terminal also needs to have at least READ permission on the file.
  • Private Key -absolute path to the certificate file on this server.
    • Please use / in the path. Recommend copying the path from system file browser. Login user in the terminal also needs to have at least READ permission on the file.
  • Private Key passphrase 

 

qTest Manager

  • Directory where attachments will be stored. This directory should not be under the extracted directory of qtestctl. Login user in the terminal also needs to have at least WRITE permission on the directory.
  • Directory where logs will be stored. This directory should not be under the extracted directory of qtestctl. Login user in the terminal also needs to have at least WRITE permission on the directory.
  • qTest Managers HTTP or HTTPS Port
  • URL to access qTest Manager outside of this machine

 

qTest Sessions

  • Storage Type where you will store qTest Sessions' resource files
    Example: disk storage or amazon_s3
  • If using amazon_s3 storage you will need the following:
    • Amazon S3's access key
    • Amazon S3's secret key
    • Amazon S3's bucket name
  • Location where you will store resource files
  • qTest Sessions HTTPS Port

 

qTest Insights

  • qTest Insights HTTP or HTTPS Port

 

qTest Parameters

  • qTest Parameters HTTPS Port

 

qTest Launch

  • qTest Launch's HTTPS Port
  • qTest Launch's public URL

 

qTest Pulse

  • qTest Pulse's HTTP or HTTPS Port
  • qTest Pulse's public URL
  • qTest Pulse log location
    Note: 
    This directory should not be under the extracted directory of qtestctl

 

qTest Scenario

  • qTest Scenario's HTTPS Port
  • qTest Scenario's public URL
    Note: 
    The base URL/domain name of the server that Scenario Server is installed and running. This can be a cloud or local instance and should point to either the reverse proxy that Scenario Server is running behind or directly to the web address of the web server that Scenario Server is installed on (a computer bound to port 80/443 depending on if your traffic is HTTP or HTTPS based). 

Install qTest Applications with a Load Balancing Model

Refer to this article to view different deployment model samples.

Using this sample load balancing model, you will need to install and configure multiple qTest Manager and Sessions application nodes on different servers, using the same qTest Application Installation Package. Your other application nodes will run on their own servers as well as your prerequisite applications and shared directory which will be installed on their own servers as well. 

The sample below uses 5 servers.

  • 1 load balancing server for Manager
  • 3 application node servers
  • 1 database server 

 

HA_-_5_servers.gliffy.jpg

  • Server 1Manager Load Balancer is a server that acts as a load balancer for the two qTest Manager servers. We will install and use nginx on this server for that purpose.
  • Server 2
    • qTest Manager application node which is an instance of qTest Manager deployed in a Linux server.
    • qTest Sessions application node which is an instance of qTest Sessions deployed in a Linux server.
    • NFS Client
  • Server 3:
    • qTest Manager application node which is an instance of qTest Manager deployed in a Linux server.
    • qTest Sessions application node which is an instance of qTest Sessions deployed in a Linux server.
    • NFS Client
  • Server 4:
    • qTest Insights application node.
    • qTest Parameters application node.
    • qTest Launch application node.
    • qTest Pulse application node.
  • Server 5: Prerequisite applications, including MongoDB and PostgreSQL and the Shared Network Drive
    • MongoDB: a database engine used to manage qTest Parameters and Pulse
    • PostgreSQL: a database engine used to manage qTest Manager, Sessions, Insights and Launch. All application nodes must use the same PostgreSQL database.
    • Shared Server: a server that hosts shared components that are required to run qTest Manager and Sessions. It should be accessible from all application nodes to store attachments and search index. 
      • NFS Server (Network File Systems): used to share directories and files with others over a network. We will use NFS to manage and share files created by qTest Manager and Sessions applications deployed on the 2 qTest Manager and qTest Sessions servers.

IMPORTANT:

  • You will need to configure the Application nodes with your Load Balancer. You can use any load balancing tools or services which are being used in your organization. Our sample uses nginx.
  • Your team members will access qTest Manager via the URL in the application nodes as configured in the Load Balancer.

Setup Shared Network Drive and Install NFS Server

Please read the Set Up a Shared Directory Using NFS - Linux article to set up your shared network drive using NFS. 

Note: Files that may need to be shared among services can be supported by a distributed file system like NFS or SMB

Install an Application Node

Installing an application node follows the same instructions as installing a qTest application on a single server. Please read the 9.1.5 OnPremise Single Server Install Guide for Linux. You can add as many nodes as you need. 

IMPORTANT: As described in the sample load balancing diagram above, there is one Manager application node on one server, one Sessions node on one server, etc. For these single application installations, you will answer appropriately in the Command Line Wizard for the applications to install on that single machine. Therefore, if you are installing only Manager on one server, then you will answer 'yes' for manager, but 'no' for all other applications when prompted in the Command line Wizard.  

Restart Server

You will need to restart the server for the changes to take effect, then move on to installing the next qTest application.

Repeat Application Installations

You will need to repeat the Install an Application Node and Install qTest Applications as a Service for each server that contains one or more applications. (You can add as many application nodes as you need for your team size. In this example, you would be using the Command Line Wizard installation instructions for 3 different servers. Server 2, Server 3, and Server 4.)

Manager and Sessions Only-Server Requirements

Before you download the application installation package you will need to install the NFS Client on your Manager and Sessions servers. Use the NFS client to mount the shared folder, which you have set up in a Shared Server, to a local drive. The local drive will be used to configure qTest Manager and Sessions when you install it.

In our sample deployment model above, the application installation steps would need to be completed 2 times; once for each application node:

  • Server 2: qTest Manager application node, qTest Sessions application node and NFS Client.
  • Server 3: qTest Manager application node, qTest Sessions application node and NFS Client. 

Setup qTest Manager Load Balancer

Now, It's time to load balance. You will need one server to install load balancing software. 

  • Server 1: qTest Manager Load Balancer

You will need to use any proxy tools (such as HAProxy, nginx) which are available in your organization to configure the Load Balancer.

Note: In this example, we use HAProxy to load balance qTest Manager and Sessions applications deployed on two servers. However, you could choose to install your preferred load balancing software and follow the instructions of the software vendor to configure.

Follow the instructions below to install the qTest Manager Load Balancer.

Install HAProxy

  1. Open the Terminal and enter the following command to install HAProxy:
    $ sudo su
    root@ip-[your-ip-address]:# apt-get install haproxy
  2. Edit /etc/default/haproxy to enable HAProxy to be started by the init script.
    root@ip-[your-ip-address]:/usr/local# vim /etc/default/haproxy
  3. Set ENABLED option to 1.
    ENABLED=1
  4. Save and close the file when you are finished.
  5. To check if this change is done properly execute the init script of HAProxy without any parameters. You should see the following:
    root@ip-[your-ip-address]:~# service haproxy
    Usage: /etc/init.d/haproxy {start|stop|reload|restart|status}

Configure HAProxy

qTest Sessions installed on Server #1 (Private IP is 10.0.10.95) and Server #2 (Private IP is 10.0.10.125)

  1. Open HA Proxy configuration file and edit the file /etc/haproxy/haproxy.cfg with vim.
    root@ip-[your-ip-address]:~# vim /etc/haproxy/haproxy.cfg
  2. Edit the file as seen below (notice the highlighted configuration in bold).
    Note: it is highly recommended that you copy and paste all of the content below to your nginx.conf file. Replace blue text with actual values. Only information listed out here needs to be updated. Other information should remain unchanged.
  3. Save and close the file when you're done.
global
        log /dev/log    local0
        log /dev/log    local1 notice
        chroot /var/lib/haproxy
        stats socket /run/haproxy/admin.sock mode 660 level admin
        stats timeout 30s
        user haproxy
        group haproxy
        daemon

        # Default SSL material locations
        ca-base /etc/ssl/certs
        crt-base /etc/ssl/private

        # Default ciphers to use on SSL-enabled listening sockets.
        # For more information, see ciphers(1SSL). This list is from:
        #  https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
        ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
        ssl-default-bind-options no-sslv3

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        timeout connect 5000
        timeout client  50000
        timeout server  50000
        errorfile 400 /etc/haproxy/errors/400.http
        errorfile 403 /etc/haproxy/errors/403.http
        errorfile 408 /etc/haproxy/errors/408.http
        errorfile 500 /etc/haproxy/errors/500.http
        errorfile 502 /etc/haproxy/errors/502.http
        errorfile 503 /etc/haproxy/errors/503.http
        errorfile 504 /etc/haproxy/errors/504.http

frontend http_front
   bind *:80
   mode http
   stats uri /haproxy?stats
   default_backend http_back # this will refer to a backend section whose name is `http_back`

backend http_back # here we name the backend as `http_back`
   mode http
   balance roundrobin
# We name qTest application Server #2 and #3 as `application2` and `application3`,
# however you can name it whatever you want.
# The other important configuration is the IP addresses and ports of the two qTest application servers

# we need to enter correctly
   server application2 10.0.10.95:9090 check
   server application3 10.0.10.125:9090 check

Verify the Load Balancer Status

Open a web browser and navigate to this URL http://52.68.226.37/haproxy?stats, where 52.68.226.37 is the public IP address of the Load Balancer.

If everything is OK, you'll see the result as the example screenshot below:

haproxystats.png

Configure qTest Manager to Connect to qTest Applications

Follow this article to configure qTest Manager to connect with the other qTest applications you installed. You should also verify that the applications can be accessed and working properly before performing the next and final step.

Powered by Zendesk