GridGain Developers Hub

Rolling Upgrades

Overview

You can use the rolling upgrade to allow nodes with different GridGain versions to coexist in a cluster while you roll out a new version. This allows upgrade to a newer GridGain version without downtime.

If the rolling upgrade is started, a node with a newer version of GridGain can join the cluster of nodes with older versions. Rolling upgrade can only be performed if the new version does not have breaking changes.

The Rolling Upgrade Process

Before the Upgrade

Prior to starting the rolling upgrade, we recommend making a snapshot of data. This snapshot can be used to restore the cluster in case the update fails.

Start Rolling Upgrade

First, you need to start rolling upgrade on your cluster. You can use the following CLI command:

upgrade start --version 9.1.0

When enabled, you nodes with the specified version are able to join your cluster.

Perform the Upgrade

To perform the rolling upgrade, you need to safely shut down the node first. Make sure that no active transactions or compute tasks are running on the node before shutting it down.

The node leaving the cluster will cause data rebalance on remaining nodes. We recommend waiting for the rebalance to complete before restarting the node.

Then, after the node update and cluster data rebalance are completed, restart the node and have it rejoin the cluster.

Updating ZIP Archive Installation

If you installed GridGain from a ZIP archive, replace GridGain installation with the installation for the new version. Do not replace the work folder.

Updating DEB/RPM Installation

To update the deb or rpm installation, update it by using standard upgrade commands for your packages:

sudo apt-get install ./gridgain9-db-9.1.0.deb --no-install-recommends --only-upgrade
sudo apt-get install ./gridgain9-cli-9.1.0.deb --no-install-recommends --only-upgrade
sudo rpm -U gridgain9-db-9.1.0.noarch.rpm
sudo rpm -U gridgain9-cli-9.1.0.noarch.rpm

Updating Docker Container

To update a docker image while keeping data on the node, the data must be located in a volume, otherwise it will be deleted during the update.

If you are using docker compose:

  1. Run the docker compose pull command to update the required image.

  2. Start the node with the up command.

    docker compose -f docker-compose.yml up -d

If you are starting nodes manually,

  1. Stop and remove the container with GridGain.

  2. Update the GridGain image.

  3. Start the new container with the same configuration and name as the previous container.

Complete the Rolling Upgrade

Once all nodes are upgraded in the cluster and have the same version again, you can commit the rolling upgrade:

upgrade commit

This will perform the final check that all nodes were updated and disable the rolling upgrade mode.