CAM is designed to migrate Application Workloads between OpenShift clusters. Specifically, CAM handles migration of k8s resource objects, persistent volumes, and internal images. CAM is designed to provide a migration experience while focusing on minimizing application downtime through the process.
CAM leverages two upstream projects: Velero and Restic. Velero (formerly Heptio Ark) gives you tools to back up and restore your Kubernetes cluster resources and persistent volumes. Restic is a backup program that is fast, efficient and secure.
CAM is implemented as a native k8s API extension through a custom resource definition. CAM orchestrates usage of Velero for performing backup/restores. OpenShift specific functionality os implemented in a series of Velero plugins. CAM is also equipped with a React/Patternfly 4 web UI to provide simple interactive experience.
- Migration is at scope of a Namespace. Future versions will allow selecting resources inside of a Namespace
- Cluster Scoped Resources are not handled. Cluster Role Bindings, SCCs, etc are not handled with migration.
- ‘cluster-admin’ role required for initial release targeting OCP 4.2.
CAM provides two methods for migrating persistent volumes: (1) Move and (2) Copy.
- Move or "swinging" the PV recreates the PVC/PV definitions from source cluster to destination cluster. This option is highly desirable for environments with shared storage between the source and target clusters (i.e. NFS).
- Copy creates a copy of the data from source cluster into the destination cluster. This option involves creating a PVC on destination and allowing cluster to find a PV to bind to the claim. We then copy data into the PV.
CAM introduces two actions on a Migration Plan:
-
Stage - Seeds data while leaving application up and running.
-
Migrate - Quiesces the application and migrates deltas from stage runs.
- Stage can be run multiple times on a Migration Plan
- Migrate can only be run once.
There are 3 steps to the migration process within the CAM tool:
- Plan
- Select source cluster
- Select namespaces
- Choose Copy or Move for each Persistent volume
- Specify intermediate object storage
- Select destination cluster
- Stage
- Stages the data from source to destination cluster
- May be run multiple times
- No downtime during this step for source applications
- Migrate
- Quiesce the application
- Migrate any delta state since last stage run
Let's bring up the Web UI in preparation for our first Application Migration.
If you don't remember the route, let's grab it again .```
# Determine the route of `mig-ui`
$ oc get routes migration -n mig -o jsonpath='{.spec.host}'
Open Browser to the URL from the command above.
We are now ready to perform our first Application Migration.
Next Section: Section 3 - Migrate MSSQL Application
Previous Section: Section 1 - General Overview
Home