Upgrade an Offline Cluster

    The simplest way to upgrade a multi-node cluster is with the cluster offline, during a maintenance window in which it serves no requests.

    Understanding Offline Cluster Upgrade

    In an offline upgrade, all application access to the cluster stops, and each node is upgraded in turn. Each node keeps its identity, its configuration, and its data, so no rebalance is needed. When every node has been upgraded, the cluster is brought back online.

    Offline upgrade is available from every Enterprise Analytics release, including 2.0.x.

    The procedure has three stages.

    Stage One: Prepare the Cluster

    1. Stop all applications that send requests to the cluster.

    2. Disable auto-failover, so that no node is failed over while it stops communicating with the rest of the cluster during its upgrade. You only need to do this once, on any node:

      /opt/enterprise-analytics/bin/couchbase-cli setting-autofailover \
        -c ${CLUSTER_NODE}:8091 -u ${USERNAME} -p ${PASSWORD} \
        --enable-auto-failover 0

      For more information, see setting-autofailover.

    3. Record each node’s UUID and data path, which you use to verify the node after its upgrade. The per-node procedure in the next stage describes how.

    Stage Two: Upgrade Each Individual Node

    Upgrade each node in turn, by following the per-node procedure for how the node is installed:

    Each procedure moves the node from Enterprise Analytics to Operational Insights while keeping the node’s state. Follow every step: a node that starts without its state initializes itself as a new, empty node.

    Verify each node, as the procedure describes, before you move on to the next.

    Stage Three: Bring the Cluster Back Online

    1. Confirm that every node is active, on the Servers screen of the Operational Insights Web Console, or with the following command:

      /opt/couchbase/bin/couchbase-cli server-list \
        -c ${CLUSTER_NODE}:8091 -u ${USERNAME} -p ${PASSWORD}
    2. Enable auto-failover again, with the settings the cluster used before the upgrade:

      /opt/couchbase/bin/couchbase-cli setting-autofailover \
        -c ${CLUSTER_NODE}:8091 -u ${USERNAME} -p ${PASSWORD} \
        --enable-auto-failover 1 --auto-failover-timeout ${TIMEOUT}
    3. Restart the applications that send requests to the cluster.

    The upgrade is complete.