Alternate installations for the Migration Toolkit for Containers
The Migration Toolkit for Containers (MTC) migrates application workloads from one Red Hat OpenShift Container Platform (RHOCP) cluster to another. The This content is not included.standard MTC installation installs the MTC on the 4.x target cluster.
This article describes alternate installation use cases:
-
Installing the MTC, with the web console and Migration Controller, on a 3.x cluster.
You can install the MTC web console and Migration Controller on a 3.x cluster to support the following use cases:
-
Migrating from a 3.x source cluster to 3.x target cluster
-
Migrating from a 3.x to 4.x, with the MTC installed on the 3.x source cluster
Note Installing the MTC web console and Migration Controller on the source cluster is recommended only for migrating from an on-premises source cluster to a cloud-based target cluster.
-
-
Installing the MTC, with the web console and Migration Controller, on a 4.x remote cluster.
You can install the MTC web console and Migration Controller on a cluster that is neither a source nor a target cluster.
Installing the MTC, with the web console and Migration Controller, on a 3.x cluster
This procedure installs the MTC web console and Migration Controller on the 3.x cluster.
Prerequisites
-
You must have
podmaninstalled. -
Your 3.x cluster must be configured to pull images from registry.redhat.io.
To pull images, you must create an
imagestreamsecretand copy it to each node in your cluster.
Procedure
- Log in to registry.redhat.io with your Red Hat Customer Portal credentials:
$ sudo podman login registry.redhat.io
If your system is configured for rootless Podman containers, sudo is not required for this procedure.
- Download the
operator.ymlfile:
$ sudo podman cp $(sudo podman create registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.3.0):/operator.yml ./
- Download the
controller-3.ymlfile:
$ sudo podman cp $(sudo podman create registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.3.0):/controller-3.yml ./
- Update the
controller-3.ymlfile:
spec:
...
migration_controller: true
migration_ui: true
...
mig_ui_cluster_api_endpoint: (1)
(1) Specify the 3.x cluster's API endpoint, for example, https://www.openshift_cluster.com:8443.
If the API endpoint is not added at the same time as the migration_controller and migration_ui settings, you must restart the migration_ui pod manually to update the settings.
-
Log in to your 3.x cluster.
-
Verify that the cluster can authenticate with registry.redhat.io:
$ oc run test --image registry.redhat.io/ubi8 --command sleep infinity
- Create the MTC Operator:
$ oc create -f operator.yml
namespace/openshift-migration created
rolebinding.rbac.authorization.k8s.io/system:deployers created
serviceaccount/migration-operator created
customresourcedefinition.apiextensions.k8s.io/migrationcontrollers.migration.openshift.io created
role.rbac.authorization.k8s.io/migration-operator created
rolebinding.rbac.authorization.k8s.io/migration-operator created
clusterrolebinding.rbac.authorization.k8s.io/migration-operator created
deployment.apps/migration-operator created
Error from server (AlreadyExists): error when creating "./operator.yml":
rolebindings.rbac.authorization.k8s.io "system:image-builders" already exists
Error from server (AlreadyExists): error when creating "./operator.yml":
rolebindings.rbac.authorization.k8s.io "system:image-pullers" already exists
You can ignore the Error from server (AlreadyExists) messages. They are caused by the Cluster Application Migration Operator creating resources for earlier versions of 3.x that are provided in later releases.
- Create the Migration Controller:
$ oc create -f controller-3.yml
- Verify that the
VeleroandResticpods are running:
$ oc get pods -n openshift-migration
Configuring cross-origin resource sharing
You must configure cross-origin resource sharing on a 3.x cluster so that the MTC can communicate with the API servers of the other cluster nodes.
Procedure
- Log in to the 3.x cluster where you installed the MTC.
- Obtain the MTC URL:
$ oc get -n openshift-migration route/migration -o go-template='https://{{ .spec.host }}'
The output resembles the following: https://migration-openshift-migration.apps.cluster.openshift.com.
- Add the MTC URL to the
/etc/origin/master/master-config.yamlfile of each master node undercorsAllowedOriginsas in the following example:
corsAllowedOrigins:
- (?i)https://migration-openshift-migration\.apps\.cluster\.openshift\.com(:|\z)
- Restart the API server and controllers to apply the changes:
-
For RHOCP 3.9:
$ systemctl restart atomic-openshift-master-api $ systemctl restart atomic-openshift-master-controllers -
For RHOCP 3.10 and 3.11:
$ /usr/local/bin/master-restart api $ /usr/local/bin/master-restart controllers
Installing the MTC, with the web console and the Migration Controller, on a 4.x remote cluster
Follow the procedure for installing the MTC on a This page is not included, but the link has been rewritten to point to the nearest parent document.4.x target cluster.
This installation installs the MTC with the web console and the Migration Controller. No changes are required.
After you have installed the MTC, with the web console and the Migration Controller, on the 4.x remote cluster, you must install MTC, without the web console and the Migration Controller, on the source and target clusters.
Installing the MTC, without the web console or Migration Controller, on a 3.x source cluster
Follow the procedure for installing the MTC on a This page is not included, but the link has been rewritten to point to the nearest parent document.3.x source cluster.
This installation installs the MTC without the web console or the Migration Controller. No changes are required.
Installing the MTC, without the web console or Migration Controller, on a 4.x target cluster
The following procedure installs the MTC without the web console or the Migration Controller on a 4.x cluster.
Procedure
-
In the OpenShift Container Platform web console, click *Operators > OperatorHub.
-
Use the Filter by keyword field (in this case,
MTC) to find the MTC Operator. -
Select the MTC Operator and click Install.
-
On the Install Operator page, click Install.
On the Installed Operators page, the MTC Operator appears in the openshift-migration project with the status Succeeded. -
Click MTC Operator.
-
Under Provided APIs, locate the Migration Controller tile, and click *Create Instance.
-
Click Create.
-
Update the
migration_controllerandmigration_uiparameters in thespecstanza:
spec:
...
migration_controller: false
migration_ui: false
...
- Click Workloads > Pods to verify that the
ResticandVeleropods are running.