In this guide we'll run you through upgrading qTest Sessions from 3.0.1 or 3.0.2 or 3.0.3 or 3.0.4 to 3.0.9 on a Load Balancing environment where multiple instances of qTest Sessions are installed and each one is running on a separated CentOS/Ubuntu server using Docker.
Before you begin
You have already installed earlier version qTest Sessions on Load Balancing environment using Docker, 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 using Docker. Highlighted items are qTest Sessions and components it needs to run. This article will cover:
Upgrade qTest Sessions to 3.0.9
This article guides you to upgrade qTest Sessions in one server, e.g. Machine #2. You will need to repeat all of upgrading steps on another server, Machine #3 in the diagram for example, where qTest Sessions was installed.
1. Access to qTest Sessions server (Machine #2)
2. Shutdown your current deployment
Access to the directory where you've extracted the docker deployment package 3.0, shut it down and create a backup using following commands
3. Download docker-deloyment-4.0 package
$ wget https://qtest-storage.s3.amazonaws.com/docker/deployment/docker-deployment-4.0.tar.gz
4. Extract the package
$ tar -zxf docker-deployment-4.0.tar.gz
5. Access to docker-deployment-4.0 directory
$ cd docker-deployment-4.0
Choose one of below options:
6.1 To keep all applications in your previous deployment being upgraded, override the /profiles directory of docker-deployment-4.0 with that directory of docker-deployment-3.0
$ cp -r /<path to your docker-deployment-3.0 package>/docker-deloyment-3.0/profiles/ .
That command will copy the old configuration file /docker-deployment-3.0/profiles/default.in to/docker-deployment-4.0/profiles/default.in
Open the file /path/to/docker-deployment-4.0/profiles/default.in, locate and update the version value to 3.0.9, as below:
version = "3.0.9"
6.2 OR use configure command if you want to specify each application to be upgraded (for HTTP)
$ ./configure --sessions-url "http://<IP of current machine>:<qTest Sessions port>" --sessions-http "<qTest Sessions port>"
6.3 OR use configure command if you want to specify each application to be upgraded (for HTTPS)
$ ./configure --ssl-key "<SSL Key>" --ssl-cert "<SSL Cert>" --ssl-ca "<SSL Ca>" --sessions-url "https://<IP of current machine>:<qTest Sessions https port>" --sessions-https "<qTest Sessions https port>"
7. Migrate database from Postgres 9.4 to Postgres 9.5
Note: we assume that you have only one server where PostgreSQL is installed and it is being used to manage qTest Sessions database (the blue node in the diagram above). If this is truth to your case, you only need to perform this step once and only once in the whole upgrading process.
Upgrading will keep all current data of upgraded applications.
9. After the upgrading process finishes, start the deployment process
The script will download the application images and qTest Sessions components to the Docker. It may take couple of hours depending on your network connection. When it's done, you an access to qTest Sessions and verify the new version is running.