In order to test failover from the Primary managed cluster to the Secondary
managed cluster and relocate for discovered applications, you need a sample application that is
installed without using the RHACM create application capability.
Before you begin
Note: Regional-DR now supports leveraging CephRBD volumes using non-default replica-2 storage
classes that are managed by Fusion Data Foundation. Support has
also been extended to compression-enabled storage classes.
Procedure
- Log in to the Primary managed cluster and clone the sample application
repository.
git clone https://github.com/red-hat-storage/ocm-ramen-samples.git
- Verify that you are on the main branch.
cd ~/ocm-ramen-samples
git branch
* main
The correct directory should be used when creating the sample application based on your scenario,
metro or regional. To find your directory:
ls workloads/deployment | egrep -v 'cephfs|k8s|base'
odr-metro-rbd
odr-regional-rbd
odr-regional-cephfs
- Create a project named
busybox-discovered on both the Primary and
Secondary managed clusters.
oc new-project busybox-discovered
- Create the
busybox application on the Primary managed
cluster.
This sample application example is for Regional-DR using a block (Ceph RBD) volume. CephFS
volumes can be used as well.
oc apply -k workloads/deployment/odr-regional-rbd -n busybox-discovered
persistentvolumeclaim/busybox-pvc created
deployment.apps/busybox created
Note:
Fusion Data Foundation disaster recovery solution now
extends protection to discovered applications that span across multiple namespaces.
- Verify that busybox is running in the correct project on the Primary managed
cluster.
oc get pods,pvc,deployment -n busybox-discovered
NAME READY STATUS RESTARTS AGE
pod/busybox-796fccbb95-qmxjf 1/1 Running 0 18s
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
persistentvolumeclaim/busybox-pvc Bound pvc-b20e4129-902d-47c7-b962-040ad64130c4 1Gi RWO ocs-storagecluster-ceph-rbd <unset> 18s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/busybox 1/1 1 1 18