This article is for upgrading qTest Sessions to version 3.0.9 on Load Balancing environment where multiple qTest Sessions instances are installed and each instance is running on separated CentOS/Ubuntu server.
You have already installed earlier version qTest Sessions on Load Balancing environment, and the running version of qTest Sessions is earlier than 3.0.9.
Below is a specific scenario of installing qTest Sessions on Load Balancing environment. Highlighted items are qTest Sessions and components it needs to run. This article will cover:
To upgrade to qTest Sessions version 3.0.9, you will need to access to every server that qTest Sessions is installed, download the new version then perform the upgrade.
This instruction will walk you through upgrading qTest Sessions in one server, but you can do the same on other servers that installed qTest Sessions as well.
Step 1. Access to qTest Sessions server
Step 2. Open Terminal
Step 3. Ensure you will run all the upgrade commands as system user by executing the following command
root@ip-[your-ip-address]:/home/ubuntu# sudo su
Step 4. Stop qTest Sessions service
root@ip-[your-ip-address]:/home/ubuntu# service explorerd stop
Step 5. Upgrade system packages
root@ip-[your-ip-address]:/home/ubuntu# apt-get update && apt-get upgrade
root@ip-[your-ip-address]:/home/ubuntu# yum check-update && yum update
Step 6. Download and extract qTest Sessions 3.0.9
root@ip-[your-ip-address]:/usr/local# wget https://qtest-storage.s3.amazonaws.com/sessions/3.0/sessions-linux-3.0.9.tar.gz
root@ip-[your-ip-address]:/usr/local# tar xzvf sessions-linux-3.0.9.tar.gz
root@ip-[your-ip-address]:/usr/local# cd sessions-linux-3.0.9
root@ip-[your-ip-address]:/usr/local/sessions-linux-3.0.9# ./installer -t install -d /usr/local/sessions-linux-3.0.9
Your Sessions server has setup completely. Please goto /usr/local/sessions-linux-3.0.9 and run configure.sh file to configure your Sessions server.
Step 7. Configure qTest Sessions
Edit configurer.properties file with vim
root@ip-[your-ip-address]:/usr/local/sessions-linux-3.0.9# vim conf/configurer.properties
Update the configuration information as below. Values in bold are important configurations that you must enter correctly.
# database configuration db.host=[IP ADDRESS] # YOUR POSTGRES SERVER IP ADDRESS db.port=[PORT] # POSTGRES SERVER PORT, DEFAULT IS 5432 db.user=[USER NAME] # POSTGRES USER NAME db.password=[PASSWORD] # POSTGRES USER PASSWORD db.schema=[DATABASE NAME]# QTEST SESSIONS DATABASE NAME db.action=1 # CHANGE THIS VALUE TO 1 FOR UPGRADE # redis configuration redis.host=[IP ADDRESS] # REDIS SERVER IP ADDRESS redis.port=[PORT] # REDIS SERVER PORT, DEFAULT IS 6379 # qtest configuration qtest.url=[http|https]://[IP ADDRESS]:[PORT] # qTest URL specifying http or https scheme, IP Address and Port qtest.master_token=QToy # qTest Master Token # elastic search configuration es.http.host=[IP ADDRESS] # ELASTICSEARCH SEVER IP ADDRESS es.http.port=[PORT] # ELASTICSEARCH PORT, DEFAULT IS 9200 es.cluster.name=[CLUSTER NAME] # ELASTICSEARCH CLUSTER NAME, DEFAULT IS elasticsearch es.nodes=1 es.tcp.1.host=[IP ADDRESS] # ELASTICSEARCH NODE 1 IP ADDRESS es.tcp.1.port=[PORT] # ELASTICSEARCH NODE 1's RUNNING PORT, DEFAULT IS 9300 # application information.
# Note: the port number must be available and not being used by any other application
web.http.port=9090 # MAKE SURE YOU USE THE VALUE AS PREVIOUS VERSION OF QTEST SESSIONS
web.https.port=9443 # MAKE SURE YOU USE THE VALUE AS PREVIOUS VERSION OF QTEST SESSIONS
web.shutdown.port=9005 # MAKE SURE YOU USE THE VALUE AS PREVIOUS VERSION OF QTEST SESSIONS
web.ajp.port=9009 # MAKE SURE YOU USE THE VALUE AS PREVIOUS VERSION OF QTEST SESSIONS
web.ssl.required=[true|false] # set the value to `true` to enable SSL, other wise `false`, again, make sure you use the value as previous version of qTest Sessions
# declare eXplorer API url to use.
web.url=[http or https]://[IP ADDRESS]:[PORT] # qTest Sessions Web URL
# storage configuration
# storage.type suitable value (disk | s3 | riakcs)
# disk storage configuration.
# make sure the directory exists and mounted to NFS Server's directory
storage.rootPath=/sessions-storage # MAKE SURE YOU USE THE VALUE AS PREVIOUS VERSION OF QTEST SESSIONS
When you're done with the configuration, save and close the file.
Next, run below commands to configure and upgrade qTest Sessions. This step will take a while to complete.
Note: if you configured to enable SSL in configurer.properties file, you will be asked for paths to the SSL certificate. Below is an example to specify certificate paths to certificate that is located at /usr/local
Private key path: /usr/local/server.key
Private key password: [ENTER PRIVATE KEY PASSWORD HERE]
Certificate path: /usr/local/server.crt
Chain certificate path (Optional): [YOU CAN OPTIONALLY ENTER Chain certificate path HERE]
6. Configure qTest Sessions service
root@ip-[your-ip-address]:/usr/local/sessions-linux-3.0.9# cd /etc/init.d
root@ip-[your-ip-address]:/etc/init.d# ln -snf /usr/local/sessions-linux-3.0.9/bin/explorerd
root@ip-[your-ip-address]:/etc/init.d# systemctl enable /usr/local/sessions-linux-3.0.9/bin/explorerd.service -f
7. Upgrade PostgreSQL database engine 9.4 to 9.5
Note: you only need to perform this step once and only once if you deployed PostgreSQL in one (shared) server (as shown in the diagram) and used it to manage qTest Sessions database
8. Repeat step #1 to #7 to upgrade qTest Sessions on qTest Sessions Server #2.
9. Start qTest Sessions service
root@ip-[your-ip-address]:/usr/local# service explorerd start
Now you can access to qTest Sessions and verify that the upgrade was successful.