Skip to content

Latest commit

 

History

History
93 lines (54 loc) · 3.57 KB

2.md

File metadata and controls

93 lines (54 loc) · 3.57 KB

2.0 Cluster Application Migration Tool (CAM)

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.

2.1 Upstream Projects

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.

Velero Logo

2.2 Architecture

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.

IMPORTANT

  • 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.

2.3 Persistent Volume Handling

CAM provides two methods for migrating persistent volumes: (1) Move and (2) Copy.

  1. 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).

Move PV Diagram

  1. 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.

Copy PV Diagram

2.4 Actions (Stage and Migrate)

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.

Migration Actions

IMPORTANT

  • Stage can be run multiple times on a Migration Plan
  • Migrate can only be run once.

2.5 Migration Process

Migration Process

There are 3 steps to the migration process within the CAM tool:

  1. Plan
  • Select source cluster
  • Select namespaces
  • Choose Copy or Move for each Persistent volume
  • Specify intermediate object storage
  • Select destination cluster
  1. Stage
  • Stages the data from source to destination cluster
  • May be run multiple times
  • No downtime during this step for source applications
  1. Migrate
  • Quiesce the application
  • Migrate any delta state since last stage run

2.6 Web UI

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.

CAM Main Screen

We are now ready to perform our first Application Migration.

Next Section: Section 3 - Migrate MSSQL Application
Previous Section: Section 1 - General Overview
Home