3.6. Installing OpenShift Data Foundation on managed clusters
To configure storage replication between the two OpenShift Container Platform clusters, OpenShift Data Foundation operator must be installed first on each managed cluster.
Prerequisites
- Ensure that you have met the hardware requirements for OpenShift Data Foundation external deployments. For a detailed description of the hardware requirements, see External mode requirements.
Procedure
- Install and configure the latest OpenShift Data Foundation cluster on each of the managed clusters.
After installing the operator, create a StorageSystem using the option Full deployment type and
Connect with external storage platformwhere your Backing storage type isRed Hat Ceph Storage.For detailed instructions, refer to Deploying OpenShift Data Foundation in external mode.
Use the following flags with the
ceph-external-cluster-details-exporter.pyscript.At a minimum, you must use the following three flags with the
ceph-external-cluster-details-exporter.py script:- --rbd-data-pool-name
-
With the name of the RBD pool that was created during RHCS deployment for OpenShift Container Platform. For example, the pool can be called
rbdpool. - --rgw-endpoint
-
Provide the endpoint in the format
<ip_address>:<port>. It is the RGW IP of the RGW daemon running on the same site as the OpenShift Container Platform cluster that you are configuring. - --run-as-user
- With a different client name for each site.
The following flags are
optionalif default values were used during the RHCS deployment:- --cephfs-filesystem-name
-
With the name of the CephFS filesystem we created during RHCS deployment for OpenShift Container Platform, the default filesystem name is
cephfs. - --cephfs-data-pool-name
-
With the name of the CephFS data pool we created during RHCS deployment for OpenShift Container Platform, the default pool is called
cephfs.data. - --cephfs-metadata-pool-name
-
With the name of the CephFS metadata pool we created during RHCS deployment for OpenShift Container Platform, the default pool is called
cephfs.meta.
Run the following command on the bootstrap node
ceph1, to get the IP for the RGW endpoints in datacenter1 and datacenter2:ceph orch ps | grep rgw.objectgwExample output:
rgw.objectgw.ceph3.mecpzm ceph3 *:8080 running (5d) 31s ago 7w 204M - 16.2.7-112.el8cp rgw.objectgw.ceph6.mecpzm ceph6 *:8080 running (5d) 31s ago 7w 204M - 16.2.7-112.el8cphost ceph3.example.com host ceph6.example.comExample output:
ceph3.example.com has address 10.0.40.24 ceph6.example.com has address 10.0.40.66Run the
ceph-external-cluster-details-exporter.pywith the parameters that are configured for the first OpenShift Container Platform managed clustercluster1on bootstrapped nodeceph1.python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name rbdpool --cephfs-filesystem-name cephfs --cephfs-data-pool-name cephfs.cephfs.data --cephfs-metadata-pool-name cephfs.cephfs.meta --<rgw-endpoint> XXX.XXX.XXX.XXX:8080 --run-as-user client.odf.cluster1 > ocp-cluster1.json注記Modify the <rgw-endpoint> XXX.XXX.XXX.XXX according to your environment.
Run the
ceph-external-cluster-details-exporter.pywith the parameters that are configured for the first OpenShift Container Platform managed clustercluster2on bootstrapped nodeceph1.python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name rbdpool --cephfs-filesystem-name cephfs --cephfs-data-pool-name cephfs.cephfs.data --cephfs-metadata-pool-name cephfs.cephfs.meta --rgw-endpoint XXX.XXX.XXX.XXX:8080 --run-as-user client.odf.cluster2 > ocp-cluster2.json注記Modify the <rgw-endpoint> XXX.XXX.XXX.XXX according to your environment.
-
Save the two files generated in the bootstrap cluster (ceph1)
ocp-cluster1.jsonandocp-cluster2.jsonto your local machine. -
Use the contents of file
ocp-cluster1.jsonon the OpenShift Container Platform console oncluster1where external OpenShift Data Foundation is being deployed. -
Use the contents of file
ocp-cluster2.jsonon the OpenShift Container Platform console oncluster2where external OpenShift Data Foundation is being deployed.
-
Save the two files generated in the bootstrap cluster (ceph1)
- Review the settings and then select Create StorageSystem.
Validate the successful deployment of OpenShift Data Foundation on each managed cluster with the following command:
$ oc get storagecluster -n openshift-storage ocs-external-storagecluster -o jsonpath='{.status.phase}{"\n"}'For the Multicloud Gateway (MCG):
$ oc get noobaa -n openshift-storage noobaa -o jsonpath='{.status.phase}{"\n"}'Wait for the status result to be Ready for both queries on the Primary managed cluster and the Secondary managed cluster.
-
On the OpenShift Web Console, navigate to Installed Operators
OpenShift Data Foundation Storage System ocs-external-storagecluster-storagesystemResources. Verify that the Status of StorageClusterisReadyand has a green tick mark next to it.