Chapter 2. Preparing to deploy storage cluster with disaster recovery enabled
2.1. Requirements for enabling Metro-DR
- Ensure that you have at least three OpenShift Container Platform master nodes in three different zones. One master node in each of the three zones.
- Ensure that you have at least four OpenShift Container Platform worker nodes evenly distributed across the two Data Zones.
- For stretch cluster on Bare Metal, you must use SSD drive as the root drive for OpenShift Container Platform master nodes.
- Ensure that each node is pre-labeled with its zone label. For more information, see the applying topology zone labels to OpenShift Container Platform node section.
- The Metro-DR solution is designed to be deployed where latencies do not exceed 2 milliseconds between zones (4ms RTT maximum). Contact Red Hat Customer Support if you are planning to deploy with higher latencies.
You cannot enable both flexible scaling and arbiter as they have conflicting scaling logic. With flexing scaling, you can add one node at a time to the OpenShift Container Storage cluster. Whereas, in an arbiter cluster, you need to add at least one node in each of the 2 data zones.
2.2. Applying topology zone labels to OpenShift Container Platform nodes
During a site outage, the zone that has the arbiter function makes use of the arbiter label. These labels are arbitrary and must be unique for the three locations.
For example, you can label the nodes as follows
topology.kubernetes.io/zone=arbiter for Master0 topology.kubernetes.io/zone=datacenter1 for Master1, Worker1, Worker2 topology.kubernetes.io/zone=datacenter2 for Master2, Worker3, Worker4
To apply the labels to the node using oc CLI do the following:
$ oc label node <NODENAME> topology.kubernetes.io/zone=<LABEL>
To validate the labels run the following commands using the example labels for the 3 zones:
$ oc get nodes -l topology.kubernetes.io/zone=<LABEL> -o name
Alternatively, you can run a single command to see all nodes with it’s zone.
$ oc get nodes -L topology.kubernetes.io/zone
The Metro DR stretch cluster topology zone labels are now applied to the appropriate OpenShift Container Platform nodes to define the three locations.
Next step
- Installing the storage operators from OpenShift Container Platform OperatorHub.
2.3. Installing Local Storage Operator
You can install the Local Storage Operator using the Red Hat OpenShift Container Platform Operator Hub.
Prerequisite
- Access to an OpenShift Container Platform cluster using an account with cluster-admin and Operator installation permissions.
Procedure
- Log in to the OpenShift Web Console.
- Click Operators → OperatorHub.
-
Type
local storage
in the Filter by keyword… box to search forLocal Storage
operator from the list of operators and click on it. - Click Install.
Set the following options on the Install Operator page:
- Channel as stable-4.8.
- Installation Mode as A specific namespace on the cluster.
- Installed Namespace as Operator recommended namespace openshift-local-storage.
- Approval Strategy as Automatic.
- Click Install.
Verification step
-
Verify that the Local Storage Operator shows the Status as
Succeeded
.
2.4. Installing Red Hat OpenShift Container Storage Operator
You can install Red Hat OpenShift Container Storage Operator using the Red Hat OpenShift Container Platform Operator Hub.
Prerequisites
- Access to an OpenShift Container Platform cluster using an account with cluster-admin and Operator installation permissions.
- You have at least four (4) worker nodes evenly distributed across two (2) data centers in the Red Hat OpenShift Container Platform cluster.
- For additional resource requirements, see Planning your deployment.
When you need to override the cluster-wide default node selector for OpenShift Container Storage, you can use the following command in command line interface to specify a blank node selector for the
openshift-storage
namespace (create openshift-storage namespace in this case):$ oc annotate namespace openshift-storage openshift.io/node-selector=
-
Taint a node as
infra
to ensure only Red Hat OpenShift Container Storage resources are scheduled on that node. This helps you save on subscription costs. For more information, see How to use dedicated worker nodes for Red Hat OpenShift Container Storage chapter in Managing and Allocating Storage Resources guide.
Procedure
- Navigate in the web console to the click Operators → OperatorHub.
- Scroll or type a keyword into the Filter by keyword box to search for OpenShift Container Storage Operator.
- Click Install on the OpenShift Container Storage operator page.
On the Install Operator page, the following required options are selected by default:
- Update Channel as stable-4.8.
- Installation Mode as A specific namespace on the cluster.
-
Installed Namespace as Operator recommended namespace openshift-storage. If Namespace
openshift-storage
does not exist, it will be created during the operator installation. - Select Approval Strategy as Automatic or Manual.
Click Install.
If you selected Automatic updates, then the Operator Lifecycle Manager (OLM) automatically upgrades the running instance of your Operator without any intervention.
If you selected Manual updates, then the OLM creates an update request. As a cluster administrator, you must then manually approve that update request to have the Operator updated to the new version.
Verification steps
Verify that the OpenShift Container Storage Operator shows a green tick indicating successful installation.
Next steps
Create an OpenShift Container Storage cluster.
For information, see Creating OpenShift Container Storage cluster.