Menu

Scenario/Pulse Single Server Installation Guide for Linux (non-Docker)

Overview

In this article, we provide step-by-step instructions to install qTest Scenario and Pulse for OP 9.0 for a single CentOS/Ubuntu machine. Please read the instructions thoroughly before starting your installations.

To request assistance with installation or obtain the self-upgrade 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.

Before You Begin

  • qTest Scenario and Pulse only work with qTest Manager 9.0 or later.

Read the following:

Update System Packages

  1. Open the Terminal.
  2. Make sure you perform all of the installation steps as a system user by executing the following command:
    # sudo su
  3. Execute the following command to update and upgrade system packages.
    • Ubuntu
      # apt-get update -y && apt-get upgrade -y
    • CentOS
      # yum check-update && yum update

Install MongoDB 3.4

qTest Scenario and Pulse requires a version of MongoDB from 3.2 thru 3.6.  If you have already installed MongoDB within this version range, skip this step and jump to configuring MongoDb. MongoDB 3.4 is the example version in the examples below.

Install MongoDB 3.4 on Ubuntu

  1. Access the Ubuntu server that you want to install MongoDB 3.4.
  2. Import the public key used by the package management system.
    Note: The Ubuntu package management tools (i.e., dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys.
  3. Issue the following command to import the MongoDB public GPG Key:
    # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

import-public-key-ubuntu.png

Create a List File for MongoDB

  • Create the /etc/apt/sources.list.d/mongodb-org-3.4.list file using the command appropriate for your version of Ubuntu:
    • Ubuntu 12.04
      # echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
    • Ubuntu 14.04
      # echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
    • Ubuntu 16.04
      # echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

create-file-list-ubuntu.png

Reload the Local Package Database

Issue the following command to reload the local package database:

# sudo apt-get update

reload-local-package-database.png

Install the MongoDB Packages

Install the latest stable version of MongoDB. Issue the following command:

# sudo apt-get install -y mongodb-org

install-mongo-package.png

Notes:

  • The MongoDB instance stores its data files in /var/lib/mongodb and its log files in /var/log/mongodb by default and runs using the mongodb user account. You can specify an alternate log and data file directories in /etc/mongod.conf.
  • If you change the user that runs the MongoDB process, you must modify the access control rights to the /var/lib/mongodb and /var/log/mongodb directories to give this user access to these directories.

Install MongoDB 3.4 on CentOS

  1. Access the CentOS server where you want to install MongoDB.
  2. Create a /etc/yum.repos.d/mongodb-org-3.4.repo file to hold the following configuration information for the MongoDB 3.4 repository. The file’s content is as below:
    [mongodb-org-3.4]
    name=MongoDB 3.4 Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc

Install the MongoDB Packages

To install MongoDB, issue the following command:

# sudo yum install -y mongodb-org

Configure MongoDB

Initialize replicaSet

  1. Start MongoDB with the following command:
    Notes: if your path includes spaces, enclose the entire path with double quotes.
    # mongod --dbpath [PATH/TO/DB/FOLDER] --replSet "rs0"
    Example:
    • Ubuntu
      # mongod --dbpath /var/lib/mongodb --replSet "rs0"
    • CentOS
      # mongod --dbpath /var/lib/mongo --replSet "rs0"configure-mongo-ubuntu.png

Create Root User

Open the second Terminal, and execute the commands below to create a root user:

mongo
rs.initiate()
rs.status()
use admin
db.createUser ({
    user: "[USER_NAME]",
    pwd: "[PASSWORD]",
    roles: ["root"]
})

Example:

mongo
rs.initiate()
rs.status()
use admin
db.createUser ({
    user: "tdm",
    pwd: "password",
    roles: ["root"]
})

create-mongo-user-ubuntu.png

Stop MongoDB Service

Close the second Terminal, and press Ctrl+C on the first Terminal to stop MongoDB service.

Start MongoDB as a Service

  1. Edit /etc/mongod.conf file using following command:
    • Ubuntu
      # vim /etc/mongod.conf
    • CentOS
      # vi /etc/mongod.conf
  2. Now you can start to edit mongod.conf. Remove the net(port, bindIp) section, and edit other sections as following:
    systemLog:
      destination: file
      path: [/PATH/TO/LOG/FOLDER]
    storage:
      dbPath: [/PATH/TO/DB/FOLDER]
    replication:
      replSetName: rs0
    security:
      authorization: enabled
    

    Example:

    • Ubuntu
      systemLog:
        destination: file
        path: /var/log/mongodb/mongod.log
      storage:
        dbPath: /var/lib/mongodb
      replication:
        replSetName: rs0
      security:
        authorization: enabled
      

    mongod-conf.png

    • CentOS
      systemLog:
        destination: file
        path: /var/log/mongodb/mongod.log
      storage:
        dbPath: /var/lib/mongo
      replication:
        replSetName: rs0
      security:
        authorization: enabled
      

    Important: Make sure the data and log folders have appropriate permissions by executing the  following commands:
    # sudo chown -R [MONGODB_USER] [PATH/TO/DB/FOLDER]
    # sudo chown -R [MONGODB_USER] [PATH/TO/LOG/FOLDER]

    Example:

    • Ubuntu
      # sudo chown -R mongodb:mongodb /var/lib/mongodb
      # sudo chown -R mongodb:mongodb /var/log/mongodb

    set-mongo-user-permissions-ubuntu.png

    • CentOS
      # sudo chown -R mongod:mongod /var/lib/mongo
      # sudo chown -R mongod:mongod /var/log/mongodb
  3. Start the MongoDB service by running following command:
    # sudo service mongod start

    start-mongo-service-ubuntu.png

  4. Verify that the mongod process has started successfully by checking the content of the log file at /var/log/mongodb/mongod.log for a line like below:
    # [initandlisten] waiting for connections on port <port>
  5. If you would like to stop the MongoDB service as needed, run the following command:
    # sudo service mongod stop

Download qTest Scenario/Pulse

Note: if you are installing qTest Scenario/Pulse in the same server with other qTest applications, e.g., qTest Manager, then you do not need to re-download this installation package but use the one you downloaded when you installed qTest Manager. If you plan to install qTest Pulse on a separate server, then follow the steps below to download qTest Pulse.

  1. Change to /usr/local directory, and start to download qTest Scenario/Pulse:
    # cd /usr/local
    # wget <DOWNLOAD LINK>
  2. Extract the downloaded package and navigate to the extracted folder:
    # tar xzvf <DOWNLOADED PACKAGE FILE NAME>
    # cd qtestctl

Install and Configure qTest Scenario/Pulse

Edit qtest.config file using the following command:

  • Ubuntu

/usr/local/qtestctl# vim qtest.config
Press insert to edit config file

  • CentOS

/usr/local/qtestctl# vi qtest.config
Press insert to edit config file

Configure Applications

  • If you are installing qTest Scenario/Pulse on a separate server, make sure there is 'pulse, scenario' in the apps list:
apps = ['pulse,scenario']
  • If you are installing qTest Scenario/Pulse on the same server with other qTest application(s), e.g., qTest Manager, append 'pulse, scenario' to the app list:

apps = ['manager', 'pulse', 'scenario']

Configure Database

Enter these values in the external section in qtest.config file.

  • Important: Only the information listed out here needs to be updated. Other information should remain unchanged. Replace blue text with actual values.
external {
mongo {
host = '[MongoDB Server's IP or hostname]:[MongoDB Server Port]' // example: localhost:27017
replSet = 'rs0'
auth {
user = 'tdm' // this is the user name you created in Install and Configure MongoDB
pass = 'password' // this is the password you created in Install and Configure MongoDB
db = 'admin'
ssl = false
}
}

Configure SSL

To deploy qTest Launch with SSL, navigate to the section common in qtest.config file as shown below.

  • Important: Only the information listed out here needs to be updated. Other information should remain unchanged. Replace blue text with actual values.
    • enable: set to true to enable a secured connection (HTTPS) between the user browser and the server. Default value is false.
    • cert: absolute path to the certificate file on this server. Please use \\ or / in the path. It is mandatory if enable is set to true.
    • key: absolute path to the private key file on this server. Please use \\ or / in the path. It is mandatory if enable is set to true.
    • pass: passphrase of your certificate. This field is optional (default value is empty).
    • strict: set this to false to allow self-signed SSL certificate.
common {
ssl {
enabled = false
cert = "${path}/server.crt"
key = "${path}/server.key"
pass = ""
strict = false
}
}

Configure qTest Pulse

In the qtest.config file, navigate to the section pulse to configure qTest Pulse.

  • port: configure server port that qTest Pulse will be listening
  • URL: qTest Pulse URL

Below is an example of a qTest Pulse configuration. 

...
pulse {
port = [qTest Pulse Running Port]
url = "[qTest Pulse URL]
:${pulse.port}"
...
}

Press ESC and save the configuration with the following command:

:wq

Configure qTest Scenario

In qtest.config file, navigate to the section scenario to configure qTest Scenario.

  • url: 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). This is the url the Scenario Server Jira add-on should be configured to point to post-installation via the Configure button in the Settings > Add-ons > Manage add-ons section. The Scenario Server Jira add-on is most often configured to point to http://localhost:4000 by default. This is a placeholder value for the actual Scenario Server domain name/host address which is typically identified post-installation. You may also point the Scenario Server Jira add-on to a cloud instance of Scenario Server. Support for US West - Oregon, EU - Ireland, and additional datacenters will be available in the future. Until that time, use the US East Scenario server URL:
  • port: The local port number that Scenario Server should bind to when launched (this would be something other than port 80 if Scenario Server is running behind a reverse proxy such an nginx. In this case, scenario.url should be configured to point to the nginx address).
  • mongo: The address, credentials, etc. of the MongoDB instance that Scenario server should connect to. This should reference the mongo configuration for qTest Pulse as they connect to the same database.

Below is an example of a qTest Scenario configuration. 

...
scenario {
port = 6080
url = "https://scenario-server-domain-name.com"
mongo {
host = pulse.mongo.host
replSet = pulse.mongo.replSet
auth {
db = pulse.mongo.auth.db
user = pulse.mongo.auth.user
pass = pulse.mongo.auth.pass
ssl = pulse.mongo.auth.ssl
}
db = pulse.mongo.db
}
}

Press ESC and save the configuration with the following command:

:wq

Below is an example of the qTest Scenario Server Jira add-on configuration page made available via the Configure button under Settings > Add-ons > Manage add-ons.

Screen_Shot_2018-02-26_at_1.08.36_PM.png

Configure qTest Manager

In qtest.config file, navigate to section pulse to configure qTest Pulse.

  • url: qTest Manager URL

Below is an example of qTest Pulse configuration. 

...
manager {
url = "[qTest Manager URL]
:${manager.port}" }
...
}

Press ESC and save the configuration with the following command:

:wq

Start qTest Pulse

  1. Make sure qtestctl has 'execute' permission by entering the following command:
    /usr/local/qtestctl# sudo chmod +x qtestctl
  2. Next, enter the following command to start qTest Pulse:
    /usr/local/qtestctl# ./qtestctl tdm:start

start-parameters-ubuntu.png

Configure qTest Manager to Connect to qTest Pulse

  1. Login to your qTest Manager using a Site Administrator account.
  2. Select Administration from the drop-down that appears when you hover over your username.
  3. Select the System Configurations tab.
  4. In the Miscellaneous section, enter the URL for qTest Manager.
    • http://[qTest_Manager_IPAddress]:[Port] if you installed qTest Manager without SSL certificate
    • Or https://[qTest_Manager_IPAddress]:[Port] if you installed qTest Manager with SSL certificate.
      mceclip1.png
  5. In the Pulse section, enter the URL of your qTest Pulse server.
    Note: Pulse requires both the http:// and https:// ports
    • http://[qTest_Launch_IP_Address]:[HTTP_Port] if you installed qTest Launch without SSL certificate
    • https://[qTest_Launch_IP_Address]:[HTTPS_Port] if you installed qTest Launch with SSL certificate.
      NOTE: Please make sure that you have completed the SSL configuration for qTest Manager if you want to install qTest Pulse with SSL protocol.
      Pulse_url.png
  6. Select Test Connection and wait for qTest Manager to show the message "Connected to server successfully." then Save.

Access qTest Pulse

Follow these steps to validate that qTest Pulse was installed and configured successfully.

  1. From qTest Manager's top navigation, access the qTest Pulse from the nine box 9_box.png icon.
  2. The Pulse homepage will display in a separate browser window.

Configure qTest Manager to Connect to qTest Scenario

For Scenario 2.0 there is no configuration between qTest Scenario and qTest Manager.

Install qTest Service

To enable qTest Scenario/Pulse to automatically start on system startup, you need to install qTest service.

Note: if you plan to install qTest Scenario/Pulse with other qTest Application(s) in the same server, you only need to execute below command once and only once when you finish installing all the applications in this server.

  1. In the Terminal, press `ctl + c` if qtestctl is running.
  2. Execute this command to install qtest service:
    /usr/local/qtestctl# ./installinstall-service-ubuntu.png
  3. Verify that the service has been successfully installed with the following command:
    # systemctl status qtest
  4. If the installation was successful, you will see output that includes the text like below.
    verify-service-ubuntu.png
  5. However, if you see:
    Active: inactive (dead)
    then enter the following command to start the service:
    # systemctl start qtest
  6. You have finished installing qTest Scenario/Pulse on a Linux (non-Docker) environment.
Subscribe To Our Blog
Powered by Zendesk