Upgrading the Migration Toolkit for Containers Operator on an OpenShift Container Platform 4 cluster

You can upgrade to Migration Toolkit for Containers (MTC) 1.3 on an OpenShift Container Platform 4 cluster by deleting the MigrationController custom resource (CR), uninstalling the CAM Operator, and then installing the Migration Toolkit for Containers Operator.

Procedure
  1. Delete the MigrationController CR:

    $ oc delete migrationcontroller -n openshift-migration migration-controller
  2. In the OpenShift Container Platform console, navigate to Operators > Installed Operators.

  3. Click CAM Operator.

  4. On the right side of the Operator Details page, select Uninstall Operator from the Actions list.

  5. Select Uninstall. This Operator stops running and no longer receives updates.

  6. Navigate to OperatorsOperatorHub.

  7. Use the Filter by keyword field to find the Migration Toolkit for Containers Operator.

  8. Select the Migration Toolkit for Containers Operator and click Install.

  9. On the Install Operator page, click Install.

    On the Installed Operators page, verify that the Migration Toolkit for Containers Operator appears in the openshift-migration project with the status Succeeded.

Upgrading the Migration Toolkit for Containers Operator on an OpenShift Container Platform 3 cluster

You can upgrade Migration Toolkit for Containers (MTC) on an OpenShift Container Platform 3 cluster by downloading the latest operator.yml file and replacing the existing Migration Toolkit for Containers Operator.

If you remove and recreate the namespace, you must update the cluster service account token in the MTC web console.

Procedure
  1. Log in to registry.redhat.io with your Red Hat Customer Portal credentials:

    $ sudo podman login registry.redhat.io
  2. Download the latest operator.yml file:

    $ sudo podman cp $(sudo podman create registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.3.2):/operator.yml ./
  3. Replace the Migration Toolkit for Containers Operator:

    $ oc replace --force -f operator.yml
  4. If you are upgrading from version 1.1.2 or earlier, delete the Restic pod to apply the changes:

    1. Get the Restic pod names:

      $ oc get pod -n openshift-migration | grep restic
    2. Delete each Restic Pod:

      $ oc delete pod <restic_pod>
  5. If you are upgrading from version 1.2 or later, scale the migration-operator deployment to 0 to stop the deployment:

    $ oc scale -n openshift-migration --replicas=0 deployment/migration-operator
  6. Scale the migration-operator deployment to 1 to start the deployment and apply the changes:

    $ oc scale -n openshift-migration --replicas=1 deployment/migration-operator
  7. Verify that the operator was upgraded to the latest version:

    $ oc -o yaml -n openshift-migration get deployment/migration-operator | grep image: | awk -F ":" '{ print $NF }'