Chapter 30. Rolling Upgrades
30.1. Rolling Upgrades Using REST Copy linkLink copied to clipboard!
Procedure 30.1. Perform Rolling Upgrades Using REST
Configure the Target Cluster
Use either different network settings or a different JGroups cluster name to set the Target Cluster (consisting of nodes with new JBoss Data Grid) apart from the Source Cluster. For each cache, configure aRestCacheStore
with the following settings:- Ensure that the host and port values point to the Source Cluster.
- Ensure that the path value points to the Source Cluster's REST endpoint.
Start the Target Cluster
Start the Target Cluster's nodes. Configure each client to point to the Target Cluster instead of the Source Cluster. Eventually, the Target Cluster handles 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.Using the CLI
Run theupgrade --disconnectsource=rest
command on the Target Cluster. 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.