Upgrading Upsource cluster
Follow this guide to upgrade your existing Upsource cluster installation to a newer one. Upgrade procedures vary significantly depending on the version increment (i.e. 2017.3.1 to 2017.3.2 vs. 2017.2.X to 2017.3.X) as outlined below.
Minor upgrade
Use this instruction when upgrading to a version that only differs by a build number, for example, when upgrading from 2017.3.0 to 2017.3.2.
-
Stop Upsource cluster and remove its containers:
./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> stop ./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> rm
-
Download cluster-config-<major.minor.NewBuildNumber>.zip
Important! If you've ever changed the following files:
- cluster.sh
- docker-compose.yml
- docker-compose-cluster-init.yml
- docker-compose-cluster-upgrade.yml
for example, added new analyzer properties), you need to:
- Rename the old changed file(s) (e.g. cluster.sh.bak
- Save the new cluster.sh and docker-compose.yml files in the same directory.
- Copy changed and added lines from the old files to the new ones.
-
Check that a correct UPSOURCE_VERSION is set inside cluster.sh
-
Start Upsource cluster:
./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> up
Major upgrade
Use this instruction when:
upgrading to a new major version, for example, from 2017.2.111 to 2017.3.111
migrating from a ZIP or a Docker installation.
-
Create a backup of your existing installation.
-
On the host machine where the Cassandra database is running, delete all data from the folder the Cassandra volume is mapped to. The default directory is <cassandra host>/opt/upsource/cassandra. The actual directory is defined in docker-compose.yml
-
Copy your date-specific backup folder (let's assume the folder containing backup is /upsource/backup/2017 Oct 11 12-18-26) to the node ${UPSOURCE_CLUSTER_INIT_NODE}
-
Add that backup directory path to the property UPSOURCE_UPGRADE_SOURCE_BACKUP_DIRECTORY located in the file docker-compose-params.env.
-
Provide access rights to that backup folder:
chown -R 13001:13001 "/upsource/backup/2017 Oct 11 12-18-26"
-
Run the following command:
./cluster.sh upgrade-cluster -H tcp://<swarm.master.host>:<swarm.master.port>
This command:
- Stops Upsource cluster services (if there are any running).
- Starts the Cassandra database and applies the backup to it.
- Stops Cassandra.
-
Check that the command has run successfully. The execution logs are located in the directory /var/log/upsource/cluster-init of the ${UPSOURCE_CLUSTER_INIT_NODE}node.
-
Download cluster-config-<major.minor.NewBuildNumber>.zip
Important! If you've ever changed the following files:
- cluster.sh
- docker-compose.yml
- docker-compose-cluster-init.yml
- docker-compose-cluster-upgrade.yml
for example, added new analyzer properties), you need to:
- Rename the old changed file(s) (e.g. cluster.sh.bak
- Save the new cluster.sh and docker-compose.yml files in the same directory.
- Copy changed and added lines from the old files to the new ones.
-
Check that a correct UPSOURCE_VERSION is set inside cluster.sh
-
Start Upsource cluster:
./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> up