Menu

Scenario 2.0 to 2.0.1 Single Server Upgrade Guide for Linux (non-Docker)

Overview

In this article, we provide step-by-step instructions to upgrade qTest Scenario from 2.0 to 2.0.1 on a single CentOS/Ubuntu machine. Please read the instructions thoroughly before starting your installations.

To request assistance with upgrading or obtain the self-upgrade links, complete the Upgrade Request Form and reference the OnPremise Upgrades Guide.

Note: If you are performing a fresh install, use the OnPremise New Install Form and reference the OnPremise Install Guide.

Before You Begin

  • This guideline is verified on CentOS 7 and Ubuntu 16. If you are using other versions, please contact our Customer Support.

Read the following:

Upgrade qTest Scenario

Please be aware that Scenario uses the Pulse database. Therefore, you will see several mentions of Pulse within this document.

Collect Current Configurations

Follow steps below to collect current configuration of qTest Scenario 2.0. We will use this information later to upgrade to qTest Scenario 2.0.1.

  1. Access the qTest Scenario server.
  2. Open the Terminal.
  3. Ensure you will run all the upgrade commands as a system user by executing the following command
    # sudo su
  4. Go to the qTest Scenario 2.0 installation folder and execute the below command to view the configurations:
    • Ubuntu
      /usr/local/qtestctl# vim qtest.config
    • CentOS
      /usr/local/qtestctl# vi qtest.config>

Note down all the configuration values, including:

  • MongoDB server and database configurations
  • qTest Scenario configurations

Below is an example of configuration values that we will collect and use in our upgrading process, in blue.

#database configuration
mongo {
host = '[MongoDB Server's IP or hostname]:[MongoDB Server Port]'
replSet = 'rs0'
auth {
db = 'qTest Pulse database name'
user = '[MongoDB user name]'
pass = '[MongoDB user password]'
ssl = false
}
}
...
# application configuration
tdm {
port: [qTest Pulse Running Port]
...
qtest {
host = '[http or https]://[qTest Manager server's address or host name]:[port]'
}
...
}

Stop qTest Scenario

From the Terminal, execute the command below to stop current running qTest Scenario 2.0:

# service qtest stop

Upgrade System Packages

  • Ubuntu
    # apt-get update -y && apt-get upgrade -y
  • CentOS
    # yum check-update && yum update

Install and Configure MongoDB 3.4

Scenario 2.0.1 requires MongoDB 3.4. If your system is using MongoDB 3.4, you can skip this step and go to download qtestctl.

Install MongoDB 3.4 on Ubuntu

1. Uninstall current MongoDB.

# sudo service mongod stop
# sudo apt-get purge mongodb-org*

purge-mongo.png

2.Import the public key used by the package management system.

The Ubuntu package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys. 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

3. Create a list file for MongoDB.

Create the /etc/apt/sources.list.d/mongodb-org-3.4.list 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

4. Reload local package database.

Issue the following command to reload the local package database:

# sudo apt-get update

sudo-aptget-update.png

5. Install MongoDB packages.

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

# sudo apt-get install -y mongodb-org

install-mongo-ubuntu.png

Install MongoDB 3.4 on CentOS

1. Uninstall current MongoDB.

# sudo service mongod stop
# sudo yum erase $(rpm -qa | grep mongodb-org)

2. Create MongoDB Repository.

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

3. Install MongoDB packages.

To install MongoDB, issue the following command:

# sudo yum install -y mongodb-org

Start MongoDB as a Service

Edit /etc/mongod.conf file using following command:

Ubuntu

# vim /etc/mongod.conf

CentOS

# vi /etc/mongod.conf

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

For example:

Ubuntu

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

start-mongo-service.png

CentOS 

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

Make sure the data and log folders have appropriate permissions by executing following commands:

# sudo chown -R [MONGODB_USER] [PATH/TO/DB/FOLDER]
# sudo chown -R [MONGODB_USER] [PATH/TO/LOG/FOLDER]

For 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

Start the MongoDB service by running following command:

# sudo service mongod start

start-mongo-service-ubuntu.png

You can verify that the mongod process has started successfully by checking the contents of the log file at /var/log/mongodb/mongod.log for a line like below:

[initandlisten] waiting for connections on port <port>

Notes: If you would like to stop the MongoDB service as needed, run the following command:

# sudo service mongod stop

Download qtestctl

Note: 

  • If you are upgrading qTest Scenario on the same server with other qTest application, e.g. qTest Manager, then you do not need to re-download this installation package. Otherwise, if you plan to upgrade qTest Scenario on a separate server, follow steps below to download qTest Scenario.
  • To learn more about qtestctl, refer to this article qTest OnPremise - Technical detail about qtestctl
  1. Change to /usr/local directory and execute the commands below to download qtestctl:
    /usr/local# mkdir temp
    /usr/local# cd temp
    /usr/local/temp# wget <DOWNLOAD LINK>
  2. Unzip downloaded package.
    /usr/local/temp# tar xzvf <DOWNLOADED PACKAGE FILE NAME>
  3. Move the unzipped package to /usr/local/qtestctl-3.6< /p>
    /usr/local/temp# mv qtestctl /usr/local/qtestctl-3.6
  4. Navigate to qtestctl-3.6 folder.
    /usr/local/temp# cd /usr/local/qtestctl-3.6

Configure qTest Scenario

Edit qtest.config using the following command:

  • Ubuntu
    /usr/local/qtestctl-3.6# vim qtest.config
    Press insert to edit config file
  • CentOS
    /usr/local/qtestctl-3.6# vi qtest.config
    Press insert to edit config file

Now you can start edit qtest.config file.

Configure the Applications List

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

Configure the Database

Navigate to external section in qtest.config file as shown below to configure Scenario database. Replace blue text with values you collected from step #1. Only information listed out here needs to be updated, other information should remain unchanged.

external {
mongo {
host = '[MongoDB Server's IP or hostname]:[MongoDB Server Port]'
replSet = 'rs0'
auth {
db = 'qTest Scenario database name'
user = '[MongoDB user name]'
pass = '[MongoDB user password]'
ssl = false
}
}
}

Configure SSL

If you want to deploy qTest Scenario with SSL, navigate to section common in qtest.config file as shown below then replace blue text with actual values. Only information listed out here needs to be updated, other information should remain unchanged.

  • enable: set to true to enable secured connection (HTTPS) between 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 Scenario

Navigate to section pulse in qtest.config file as shown below to configure qTest Scenario. Replace blue text with actual values collected from step #1. Only information listed out here needs to be updated, other information should remain unchanged.

  • port: configure server port that qTest Scenario will be listening
  • qtest: configure qTest Manager application URL
    • host: qTest Manager URL
...
tdm {
port: [qTest Parameter Running Port]
...
qtest {
host = '[http or https]://[qTest Manager server's IP or hostname]:[HTTP port]'
}
...
}

Save and close qtest.config file when you are done.

Backup Data

  1. From Terminal, enter the command below to make sure qtestctl has 'execute' permission.
    /usr/local/qtestctl-3.6# sudo chmod +x qtestctl
  2. Enter following command to backup qTest Scenario data.
    /usr/local/qtestctl-3.6# ./qtestctl tdm:backup
  3. If the command is successful, the backed-up data is stored in /qtestctl-3.6/tdm/build/tmp.

tdm-backup-ubuntu.png

Start qTest Scenario 2.0.1

# cd /usr/local/qtestctl-3.6
/usr/local/qtestctl-3.6# ./qtestctl start

tdm-start.png

If this step is successful, proceed to step Install the qTest Service.

Troubleshooting: if step above is not successful, you need to rollback qTest Scenario to version 2.0 following these steps:

Restore backup data by running this command:

# cd /usr/local/qtestctl-3.6
/usr/local/qtestctl-3.6# ./qtestctl tdm:restore

tdm-restore.png

When restore process is completed, perform the following step to completely rollback to qTest Scenario 1.1:

  • # systemctl start qtest
  • Contact customer support to troubleshoot the issue with upgrading qTest Scenario.

Install qTest Service

To enable qTest Scenario to automatically start when OS starts, we need to install qtest service.

Note: 

  • Only proceed to this step when you successfully performed step 8.
  • If you plan to upgrade qTest Scenario with other qTest Application(s) in the same server, you only need to execute this step once and only once when you finished all the applications in this server. Refer to this article to learn more about installing qtest service.

Remove the Previous qTest Scenario 2.0's Service

  1. Navigate to qTest Scenario 2.0 folder.
    # cd /usr/local/qtestctl
  2. Execute the command below to uninstall the service.
    /usr/local/qtestctl# ./uninstall

Install qTest Scenario 2.0.1 Service

  1. Navigate to /usr/local/qtestctl-4.0.1.
    # cd /usr/local/qtestctl-4.0.1
  2. Execute the command below to install qtestctl 4.0.1 as a service
    /usr/local/qtestctl-4.0.1# ./install
  3. Verify qtest service has been successfully installed and running with the following command.
    # systemctl status qtest

tdm-service-status.png

However, if you see:

Active: inactive (dead)

then enter the following command to start the service.

# systemctl start qtest

* To remove qtest service when needed, perform this command:

/usr/local/qtestctl-4.0.1# ./uninstall

You have successfully upgraded to qTest Scenario 2.0.1. Now you can navigate to qTest Scenario and validate the new version.

 

Subscribe To Our Blog
Powered by Zendesk