Crane Operator (mig-operator) installs a system of migration components for moving workloads from OpenShift 3 to 4.
Installable Component | Repository |
---|---|
Velero + Custom Migration Plugins | velero, openshift-migration-plugin |
Migration Controller | mig-controller |
Migration UI | mig-ui |
- MTC Getting Started 1: Installation and Configuration
- MTC Getting Started 2: Migrating an Example Workload
- Development
- Crane Operator Installation
- Component Installation and Configuration
- Migration Example Using API
- CORS (Cross-Origin Resource Sharing) Configuration
- Removing Crane Operator
- Resources Migrated By Crane Operator
- Direct Migration Requirements
See hacking.md for instructions on installing unreleased versions of mig-operator.
See OpenShift version Compatibility for info on appropriate Crane versions for your OpenShift versions.
Crane Operator is installable on OpenShift 4 via OperatorHub.
- Visit the OpenShift Web Console.
- Navigate to Operators => OperatorHub.
- Search for Crane Operator.
- Install the desired Crane Operator version.
See hacking.md
Crane Operator is installable on OpenShift 3 via OpenShift manifest.
Obtain the operator.yml and controller-3.yml for the desired version. Visit Quay for a list of valid tags. Stable releases are tagged as release-x.y.z. Latest is used for development and may be unstable.
podman cp $(podman create quay.io/konveyor/mig-operator-container:<tag>):/operator.yml ./
podman cp $(podman create quay.io/konveyor/mig-operator-container:<tag>):/controller-3.yml ./
oc create -f operator.yml
See the MTC Upgrade Documentation.
Component installation and configuration is accomplished by creating or modifying a MigrationController
CR.
You must install Crane Operator and components on all OpenShift clusters involved in a migration.
Use Case | Recommended Topology |
---|---|
Migrating from OpenShift 3 => 4 | Install Velero on all clusters. Install the Controller and UI on the OpenShift 4 cluster. |
Migrating from OpenShift 3 => 3 | Install Velero on all clusters. Install the Controller and UI on the target cluster. |
You can choose components to install by setting parameters MigrationController
CR spec
Parameter Name | Usage | Recommended Setting |
---|---|---|
migration_velero |
Set to true to install Velero and Restic. |
Set to true on all clusters. |
migration_controller |
Set to true to install the Migration Controller |
Set to true only on one cluster, preferably OpenShift 4. |
migration_ui |
Set to true to install the Migration UI |
Set to true only where migration_controller: true . |
Creating a MigrationController
CR will tell Crane Operator to install Migration Components.
- In the OpenShift console navigate to Operators => Installed Operators.
- Click on Crane Operator.
- Find MigrationController on the Provided APIs page and click Create Instance.
- On OpenShift 4.5+, click the Configure via: YAML view radio button.
- Customize settings (component selections, migration size limits) in the YAML editor, and click Create.
- Review the controller-3.yml retrieved earlier.
- Adjust settings (component selections, migration size limits) if desired.
- Set
mig_ui_cluster_api_endpoint
to point at the Controller cluster APIserver URL/Port. - Run
oc create -f controller-3.yml
Additional settings can be applied by editing the MigrationController
CR.
oc edit migrationcontroller -n openshift-migration
spec:
restic_timeout: 1h
The default restic_timeout
is 1 hour, specified as 1h
. You can increase this if you anticipate doing large backups that will take longer than 1 hour so that your backups will succeed. The downside to increasing this value is that it may delay returning from unanticipated errors in some scenarios. Valid units are s, m, and h, which stand for second, minute, and hour.
spec:
mig_pv_limit: '100'
mig_pod_limit: '100'
mig_namespace_limit: '10'
Setting for the max allowable number of resources in a Migration Plan. The default limits serve as a recommendation to break up large scale migrations into several smaller Migration Plans.
You must follow the CORs configuration steps only if:
- You are installing Crane Operator 1.1.1 or older
- You are installing Migration Controller and Migration UI on OpenShift 3
To clean up all the resources created by the operator you can do the following:
oc delete namespace openshift-migration
oc delete crd backups.velero.io backupstoragelocations.velero.io deletebackuprequests.velero.io downloadrequests.velero.io migrationcontrollers.migration.openshift.io podvolumebackups.velero.io podvolumerestores.velero.io resticrepositories.velero.io restores.velero.io schedules.velero.io serverstatusrequests.velero.io volumesnapshotlocations.velero.io
oc delete clusterrole migration-manager-role manager-role
oc delete clusterrolebindings migration-operator velero mig-cluster-admin migration-manager-rolebinding manager-rolebinding
oc delete oauthclient migration
Please refer to Resources Migrated By Crane Operator in order to gain insights regarding what kind of objects/resources get migrated by the Crane Operator.
In MTC 1.4.0, a new feature called Direct Migration is available that will yield significant time savings for most customers migrating persistent volumes and/or internal images. Direct Migration enables the migration of persistent volumes and internal images directly from the source cluster to the destination cluster without an intermediary replication repository. This introduces a significant performance enhancement while also providing better error and progress reporting information back to the end-user. Please refer the Direct Migration Requirements documentation for more details.