Upgrade a Confluence cluster through the API without downtime
This document provides guidance on how to initiate and finalize a rolling upgrade through API calls. This upgrade method is suitable for admins with the skills and automation tools to orchestrate maintenance tasks (like upgrades).
API reference
The entire rolling upgrade process is governed by the following API:
http://<host>:<port>/rest/zdu/cluster/zdu/
This API has the following calls:
Get an overview of the cluster's status. | |
Enable upgrade mode. | |
Get the status of the cluster. | |
Get an overview of a node's status, including the number of running tasks. | |
Disable upgrade mode. You can only use this call if the upgrade progress is not MIXED. | |
Once all nodes are upgraded, finalize the rolling upgrade. This will automatically disable upgrade mode. |
For detailed information about each API call, see Confluence REST API Documentation.
Initiating a rolling upgrade
To initiate a rolling upgrade, enable rolling upgrade first. To do this, use:
http://<host>:<port>/rest/zdu/cluster/zdu/start
Upgrading each node individually
Before you upgrade a node, you'll need to gracefully shut down Confluence on it. To do this, run the stop script corresponding to your operating system and configuration. Learn more about graceful Confluence shutdowns.
For example, if you installed Confluence as a service on Linux, run the following command:
$ sudo /etc/init.d/confluence stop
After upgrading Confluence on the node, wait for it to transition to an Active status first before upgrading another node.
Node statuses
To get the status of a node, use:
http://<host>:<port>/rest/zdu/cluster/zdu/nodes/<nodeID>
ACTIVE | Confluence is connected to the cluster and running with no errors. |
---|---|
STARTING | Confluence is still loading, and should transition to Active once finished. |
TERMINATING | Confluence was gracefully shut down, and should transition to Offline once finished. |
OFFLINE | Confluence is not responding on the node. This node will be removed from the cluster completely if it is still offline after Upgrade mode is disabled. |
ERROR | Something went wrong with Confluence on the node. |
Cluster statuses
To get the status of the cluster, use:
http://<host>:<port>/rest/zdu/cluster/zdu/state
STABLE | You can turn on Upgrade mode now. |
---|---|
READY_TO_UPGRADE | Upgrade mode is enabled, but no nodes have been upgraded yet. You can start upgrading your first node now. |
MIXED | At least one node is upgraded, but you haven't finished upgrading all nodes yet. Your cluster has nodes running different Confluence versions. You need to upgrade all nodes to the same bug fix version to transition to the next status (READY_TO_RUN_UPGRADE_TASKS). |
READY_TO_RUN_UPGRADE_TASKS | All nodes have node been upgraded. You can now finalize the rolling upgrade:
|
Enable and disable Upgrade mode