Mods to submodule are commented with OADP-DEMO:
If you have just cloned this, run git submodule update --init --recursive
to get the submodules.
Run make deploy
to install 1.2 demo into openshift-adp namespace
Submodules for OADP 1.2 Demo
- vmware-tanzu/velero#5849
- comment out the CSI VS deletion part lines 711-713 in backup_controller.go.
- install CRDs from this PR for
- backup
- schedule
- restore
- downloadrequest
- migtools/volume-snapshot-mover#190
- install CRDs from this PR for
- VSB
- VSR
- install CRDs from this PR for
- migtools/velero-plugin-for-vsm#7
- go.mod has replace to use submodule in parent repo
-
Install OADP 1.2
make deploy
-
Pre-requisites
- Data Mover restic secret
- Cloud credentials secret
- Create DPA
- Set a CSI storageclass as default (unset non CSI storageclass as default)
- Ensure there is a volumesnapshotclass associated with the default storageclass with velero label
- Deploy test application
oc create -f https://raw.githubusercontent.com/kaovilai/k8s-apps/main/deployments/8pvc-deployment.yaml
-
Run Demo
- Backup application with single volumesnapshot queue
- patch .spec.features.dataMover.maxConcurrentBackupVolumes to "1"
- Wait for velero deployment to be updated
- Create velero backup
- time wait for backup to complete
-
velero delete backup backup8pv --confirm oc wait backup/backup8pv --for=delete --timeout=-1h oc patch dpa/velero-sample -n openshift-adp --type=json -p='[{"op": "replace", "path": "/spec/features/dataMover/maxConcurrentBackupVolumes", "value": "1"}]' && \ oc wait deployment/velero -n openshift-adp --for=jsonpath='{.status.updatedReplicas}'=1 --timeout=-1h && \ velero backup create backup8pv --include-namespaces=minimal-8csivol time oc wait backup/backup8pv --for=jsonpath='{.status.phase}'=Completed --timeout=-1h oc get backup/backup8pv -o jsonpath='{.status.startTimestamp}' && echo "" oc get backup/backup8pv -o jsonpath='{.status.completionTimestamp}'
-
- Backup application with multiple volumesnapshot queues
- patch .spec.features.dataMover.maxConcurrentBackupVolumes to "4"
- Wait for velero deployment to be updated
- Create velero backup
-
velero delete backup backup8pv --confirm oc wait backup/backup8pv --for=delete --timeout=-1h oc patch dpa/velero-sample -n openshift-adp --type=json -p='[{"op": "replace", "path": "/spec/features/dataMover/maxConcurrentBackupVolumes", "value": "4"}]' && \ oc wait deployment/velero -n openshift-adp --for=jsonpath='{.status.updatedReplicas}'=1 --timeout=-1h && \ velero backup create backup8pv --include-namespaces=minimal-8csivol time oc wait backup/backup8pv --for=jsonpath='{.status.phase}'=Completed --timeout=-1h oc get backup/backup8pv -o jsonpath='{.status.startTimestamp}' && echo "" oc get backup/backup8pv -o jsonpath='{.status.completionTimestamp}'
-
- Compare times
- Show that Velero default timeouts are now configurable
- Backup application with single volumesnapshot queue
-
Cleanup
oc delete -f https://raw.githubusercontent.com/kaovilai/k8s-apps/main/deployments/8pvc-deployment.yaml
-
velero delete backup backup8pv --confirm oc wait backup/backup8pv --for=delete --timeout=-1h oc delete volumesnapshotbackups --all -n minimal-8csivol oc delete volumesnapshots --all -n minimal-8csivol oc delete volumesnapshots --all -n openshift-adp oc delete replicationsources --all -n openshift-adp oc delete volumesnapshotcontents --all
User facing DPA CR Changes:
- .spec.configuration.resourceTimeouts
- the timeout velero will wait before timing out on a resource
- .spec.features.dataMover.maxConcurrentBackupVolumes
- the number of batched volumeSnapshotBackups that can be inProgress at once, default value is 10
- .spec.features.dataMover.maxConcurrentRestoreVolumes
- the number of batched volumeSnapshotRestores that can be inProgress at once, default value is 10
- .spec.features.dataMover.pruneInterval
- how often (in days) to prune the datamover snapshots from the repository
- .spec.features.dataMover.volumeOptions
- User can specify volume options for source and destination volumes such as accessMode, storageClassName, etc.
- .spec.snapshotLocations.velero.config.credential
- We now support specifying the cloud credentials secret name in the DPA CR for the velero snapshot location
Beautiful quote from Shubham
Instructions for OADP 1.2 demo with current state of the development: Pull latest changes from upstream Velero PR regarding BIA V2 controller changes [vmware-tanzu/velero#5849]
Build Velero image from these changes, Currently comment out the CSI VS deletion part lines 711-713 in backup_controller.go, I have the changes stashed locally which defer the deletion to finalize phase, will do a PR once upstream BIA V2 gets merged. Also, push the changes in your own fork
Take changes for batching/throttling from VSM controller PR [migtools/volume-snapshot-mover#190]
Build the VSM controller image and also push in your own fork
Install the CRD changes from upstream BIA V2 controller changes [CRDs to be updated: backup, schedule, restore, downloadrequest]
Install the CRD changes from VSM controller for batching PR, [CRDs to be updated: VSB and VSR]
Checkout the Velero-plugin-for-vsm PR which ports the VSC plugin to an Async plugin[migtools/velero-plugin-for-vsm#7]
Here make the go.mod changes for upstream velero and VSM, use your own forks import for velero and VSM in the plugin go.mod and build the image
Now you have 3 custom images with all the changes you need for demo OADP 1.2, override the velero, vsm controller and vsm plugin images via DPA unsupported overrides and deploy velero.
Run a sample, perform datamover B/R and show the beautiful workflow of datamover GA functionality 🥹 🥹
Attached is a fresh out of the oven Demo Video Snippet: https://drive.google.com/file/d/1RywCtLtZx0zNWVCV6wxyFdBD8s1ICTUX/view?usp=share_link