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. 2020.1.1 to 2020.1.2 vs. 2019.1.X to 2020.1.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 2020.1.0 to 2020.1.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> rmDownload 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 2019.1.111 to 2020.1.111
migrating from a ZIP or a Docker installation.
Create a backup of your existing installation.
Stop Upsource cluster:
./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> stop ./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> rmOn 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"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
Add the following line to upsource.env:
UPSOURCE_MONITORING_RECORD_HOURS=1Run 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.
Start Upsource cluster:
./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> up