Chapter 16. Rolling Upgrades
16.1. Rolling Upgrades Using REST
Procedure 16.1. Perform Rolling Upgrades Using REST
Create a Target Cluster
Start a new cluster (the target cluster) with the new version of JBoss Data Grid. Use either different network settings of a different JGroups cluster name to set it apart from the source cluster.Migrate Caches to the Target Cluster
To migrate multiple caches from the source and target cluster, configure aRestCacheStore
with the following settings:- Ensure that the
host
andport
values point to the source cluster. - Ensure that the
path
value points to the source cluster's REST endpoint.
Restart Each Node
Configure each client to point to the target cluster instead of the source cluster. One by one, restart each node in the cluster to apply the new configuration. Eventually, the target cluster will handle all requests instead of the source cluster. The target cluster then lazily loads data from the source cluster on demand using theRestCacheStore
.Dump the Key Set
When all connections have shifted to the target cluster, remove the source cluster key set. This is done either using JMX or the CLI as follows:Using JMX
Invoke therecordKnownGlobalKeyset
operation on theRollingUpgradeManager
MBean on the source cluster for all caches to be migrated.Using the CLI
Run theupgrade --dumpkeys
command on the source cluster for all caches to be migrated. Optionally, use the--all
switch to dump all the caches in the cluster.
Fetch the Remaining Data
The target cluster must fetch all the remaining data from the source cluster. This is done either using JMX or the CLI as follows:Using JMX
Invoke thesynchronizeData
operation with therest
parameter specified on theRollingUpgradeManager
MBean on the target cluster for all caches to be migrated.Using the CLI
Run theupgrade --synchronize=rest
on the target cluster for all caches to be migrated. Optionally, use the--all
switch to synchronize all caches in the cluster.
Disable the RestCacheStore
Disable theRestCacheStore
on the target cluster using either JMX or the CLI as follows:Using JMX
Invoke thedisconnectSource
operation with therest
parameter specified on theRollingUpgradeManager
MBean on the target cluster for all caches to be migrated.Using the CLI
Run theupgrade --disconnectsource=rest
command on the target cluster for all caches to be migrated. Optionally, use the--all
switch to disconnect all caches in the cluster.
Migration to the target cluster is complete. The source cluster can now be decommissioned