Creating a sample discovered application
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.
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.Note: Only applications using CephRBD or block volumes are supported for discovered applications.ls workloads/deployment | egrep -v 'cephfs|k8s|base'
odr-metro-rbd odr-regional-rbd
- 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.oc apply -k workloads/deployment/odr-regional-rbd -n busybox-discovered
persistentvolumeclaim/busybox-pvc created deployment.apps/busybox created
Note:Fusion Data FoundationDisaster 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