이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 6. Upgrading the Migration Toolkit for Containers


You can upgrade the Migration Toolkit for Containers (MTC) by using the OpenShift Container Platform web console.

Important

You must ensure that you upgrade to the same MTC version on all clusters.

If you are upgrading from MTC version 1.3, you must perform an additional procedure to update the MigPlan custom resource (CR).

6.1. Upgrading the Migration Toolkit for Containers on OpenShift Container Platform 4

You can upgrade the Migration Toolkit for Containers (MTC) on OpenShift Container Platform 4 by using the OpenShift Container Platform web console.

Prerequisites

  • You must be logged in as a user with cluster-admin privileges.

Procedure

  1. In the OpenShift Container Platform console, navigate to Operators Installed Operators.

    Operators that have a pending upgrade display an Upgrade available status.

  2. Click Migration Toolkit for Containers Operator.
  3. Click the Subscription tab. Any upgrades requiring approval are displayed next to Upgrade Status. For example, it might display 1 requires approval.
  4. Click 1 requires approval, then click Preview Install Plan.
  5. Review the resources that are listed as available for upgrade and click Approve.
  6. Navigate back to the Operators Installed Operators page to monitor the progress of the upgrade. When complete, the status changes to Succeeded and Up to date.
  7. Click Workloads Pods to verify that the MTC pods are running.

6.2. Upgrading the Migration Toolkit for Containers on OpenShift Container Platform 3

You can upgrade Migration Toolkit for Containers (MTC) on OpenShift Container Platform 3 with podman.

Prerequisites

  • You must be logged in as a user with cluster-admin privileges.
  • You must have access to registry.redhat.io.
  • You must have podman installed.

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.4):/operator.yml ./ 1
    1
    You can specify a z-stream release, if necessary.
  3. Replace the Migration Toolkit for Containers Operator:

    $ oc replace --force -f operator.yml
  4. Apply the changes:

    • For MTC 1.1.2 and earlier versions, delete the Restic pods:

      $ oc delete pod <restic_pod>
    • For MTC 1.2 and later versions:

      1. Scale the migration-operator deployment to 0 to stop the deployment:

        $ oc scale -n openshift-migration --replicas=0 deployment/migration-operator
      2. 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
  5. Verify that the migration-operator was upgraded:

    $ oc -o yaml -n openshift-migration get deployment/migration-operator | grep image: | awk -F ":" '{ print $NF }'
  6. Download the latest controller-3.yml file:

    $ sudo podman cp $(sudo podman create \
      registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.4):/controller-3.yml ./
  7. Create the migration-controller object:

    $ oc create -f controller-3.yml
  8. If your OpenShift Container Platform version is 3.10 or earlier, set the security context constraint of the migration-controller service account to anyuid to enable direct image migration and direct volume migration:

    $ oc adm policy add-scc-to-user anyuid -z migration-controller -n openshift-migration
  9. Verify that the MTC pods are running:

    $ oc get pods -n openshift-migration
  10. If you have previously added the OpenShift Container Platform 3 cluster to the MTC web console, you must update the service account token in the web console because the upgrade process deletes and restores the openshift-migration namespace:

    1. Obtain the service account token:

      $ oc sa get-token migration-controller -n openshift-migration
    2. In the MTC web console, click Clusters.
    3. Click the Options menu kebab next to the cluster and select Edit.
    4. Enter the new service account token in the Service account token field.
    5. Click Update cluster and then click Close.

6.3. Upgrading MTC 1.3 to 1.4

If you are upgrading Migration Toolkit for Containers (MTC) version 1.3.x to 1.4, you must update the MigPlan custom resource (CR) manifest on the cluster on which the MigrationController pod is running.

Because the indirectImageMigration and indirectVolumeMigration parameters do not exist in MTC 1.3, their default value in version 1.4 is false, which means that direct image migration and direct volume migration are enabled. Because the direct migration requirements are not fulfilled, the migration plan cannot reach a Ready state unless these parameter values are changed to true.

Prerequisites

  • You must have MTC 1.3 installed.
  • You must be logged in as a user with cluster-admin privileges.

Procedure

  1. Log in to the cluster on which the MigrationController pod is running.
  2. Get the MigPlan CR manifest:

    $ oc get migplan <migplan> -o yaml -n openshift-migration
  3. Update the following parameter values and save the file as migplan.yaml:

    ...
    spec:
      indirectImageMigration: true
      indirectVolumeMigration: true
  4. Replace the MigPlan CR manifest to apply the changes:

    $ oc replace -f migplan.yaml -n openshift-migration
  5. Get the updated MigPlan CR manifest to verify the changes:

    $ oc get migplan <migplan> -o yaml -n openshift-migration
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.