This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 5. Installing the Migration Toolkit for Containers in a restricted network environment
You can install the Migration Toolkit for Containers (MTC) on OpenShift Container Platform 3 and on OpenShift Container Platform 4.5 in a restricted network environment.
You must install the same MTC version on all clusters.
By default, the MTC web console and the Migration Controller
pod run on the target cluster.
You can configure the Migration Controller
custom resource manifest to run the MTC web console and the Migration Controller
pod on a source cluster or on a remote cluster.
After you have installed MTC, you must configure an object storage to use as a replication repository.
You can install the MTC Operator 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 on all clusters. - You must create an Operator catalog from a mirror image in a local registry.
Procedure
-
In the OpenShift Container Platform web console, click Operators
OperatorHub. - Use the Filter by keyword field to find the Migration Toolkit for Containers Operator.
- Select the Migration Toolkit for Containers Operator and click Install.
Click Install.
On the Installed Operators page, the Migration Toolkit for Containers Operator appears in the openshift-migration project with the status Succeeded.
- Click Migration Toolkit for Containers Operator.
- Under Provided APIs, locate the Migration Controller tile, and click Create Instance.
If you do not want to run the MTC web console and the
Migration Controller
pod on the cluster, update the following parameters in themigration-controller
custom resource manifest:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- This parameter is required only for OpenShift Container Platform 4.1.
- Click Create.
-
Click Workloads
Pods to verify that the MTC pods are running.
You can install the Migration Toolkit for Containers Operator manually on OpenShift Container Platform 3.7, 3.9, 3.10, or 3.11.
You must install the same MTC version on the OpenShift Container Platform 3 and 4 clusters.
To ensure that you have the latest version on the OpenShift Container Platform 3 cluster, download the operator.yml
and controller-3.yml
files when you are ready to create and run the migration plan.
Prerequisites
-
You must be logged in as a user with
cluster-admin
privileges on all clusters. -
You must have access to
registry.redhat.io
. -
You must have
podman
installed. - The cluster on which you are installing MTC must be OpenShift Container Platform 3.7, 3.9, 3.10, or 3.11.
-
You must have a Linux workstation with network access in order to download files from
registry.redhat.io
. - You must first install the MTC Operator on an OpenShift Container Platform 4 cluster from a local registry.
Procedure
Log in to
registry.redhat.io
with your Red Hat Customer Portal credentials:sudo podman login registry.redhat.io
$ sudo podman login registry.redhat.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Download the
operator.yml
file:sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.4):/operator.yml ./
$ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.4):/operator.yml ./
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Download the
controller-3.yml
file:sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.4):/controller-3.yml ./
$ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-rhel7-operator:v1.4):/controller-3.yml ./
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Obtain the Operator image mapping by running the following command on the OpenShift Container Platform 4 cluster:
grep openshift-migration-rhel7-operator ./mapping.txt | grep rhmtc
$ grep openshift-migration-rhel7-operator ./mapping.txt | grep rhmtc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output shows the mapping between the
registry.redhat.io
image and your mirror registry image.Example output
registry.redhat.io/rhmtc/openshift-migration-rhel7-operator@sha256:468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a=<registry.apps.example.com>/rhmtc/openshift-migration-rhel7-operator
registry.redhat.io/rhmtc/openshift-migration-rhel7-operator@sha256:468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a=<registry.apps.example.com>/rhmtc/openshift-migration-rhel7-operator
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Update the
image
values for theansible
andoperator
containers and theREGISTRY
value in theoperator.yml
file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Log in to your OpenShift Container Platform 3 cluster.
Create the Migration Toolkit for Containers Operator object:
oc create -f operator.yml
$ oc create -f operator.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- You can ignore
Error from server (AlreadyExists)
messages. They are caused by the Migration Toolkit for Containers Operator creating resources for earlier versions of OpenShift Container Platform 3 that are provided in later releases.
Create the
MigrationController
object:oc create -f controller-3.yml
$ oc create -f controller-3.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the MTC pods are running:
oc get pods -n openshift-migration
$ oc get pods -n openshift-migration
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Configuring a replication repository 링크 복사링크가 클립보드에 복사되었습니다!
You must configure an object storage to use as a replication repository. The Migration Toolkit for Containers (MTC) copies data from the source cluster to the replication repository, and then from the replication repository to the target cluster. Multi-Cloud Object Gateway (MCG) is the only supported option for a restricted network environment.
MTC supports the file system and snapshot data copy methods for migrating data from the source cluster to the target cluster. You can select a method that is suited for your environment and is supported by your storage provider.
All clusters must have uninterrupted network access to the replication repository.
If you use a proxy server with an internally hosted replication repository, you must ensure that the proxy allows access to the replication repository.
Additional resources
5.3.1. Configuring Multi-Cloud Object Gateway 링크 복사링크가 클립보드에 복사되었습니다!
You can install the OpenShift Container Storage Operator and configure a Multi-Cloud Object Gateway (MCG) storage bucket as a replication repository for the Migration Toolkit for Containers (MTC).
5.3.1.1. Installing the OpenShift Container Storage Operator 링크 복사링크가 클립보드에 복사되었습니다!
You can install the OpenShift Container Storage Operator from OperatorHub.
See Disconnected environment in Red Hat OpenShift Container Storage: Planning your deployment for more information.
Procedure
-
In the OpenShift Container Platform web console, click Operators
OperatorHub. - Use Filter by keyword (in this case, OCS) to find the OpenShift Container Storage Operator.
- Select the OpenShift Container Storage Operator and click Install.
- Select an Update Channel, Installation Mode, and Approval Strategy.
Click Install.
On the Installed Operators page, the OpenShift Container Storage Operator appears in the openshift-storage project with the status Succeeded.
5.3.1.2. Creating the Multi-Cloud Object Gateway storage bucket 링크 복사링크가 클립보드에 복사되었습니다!
You can create the Multi-Cloud Object Gateway (MCG) storage bucket’s custom resources (CRs).
Procedure
Log in to the OpenShift Container Platform cluster:
oc login
$ oc login
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
NooBaa
CR configuration file,noobaa.yml
, with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
NooBaa
object:oc create -f noobaa.yml
$ oc create -f noobaa.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
BackingStore
CR configuration file,bs.yml
, with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
BackingStore
object:oc create -f bs.yml
$ oc create -f bs.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
BucketClass
CR configuration file,bc.yml
, with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
BucketClass
object:oc create -f bc.yml
$ oc create -f bc.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
ObjectBucketClaim
CR configuration file,obc.yml
, with the following content:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Record the bucket name for adding the replication repository to the MTC web console.
Create the
ObjectBucketClaim
object:oc create -f obc.yml
$ oc create -f obc.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Watch the resource creation process to verify that the
ObjectBucketClaim
status isBound
:watch -n 30 'oc get -n openshift-storage objectbucketclaim migstorage -o yaml'
$ watch -n 30 'oc get -n openshift-storage objectbucketclaim migstorage -o yaml'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This process can take five to ten minutes.
Obtain and record the following values, which are required when you add the replication repository to the MTC web console:
S3 endpoint:
oc get route -n openshift-storage s3
$ oc get route -n openshift-storage s3
Copy to Clipboard Copied! Toggle word wrap Toggle overflow S3 provider access key:
oc get secret -n openshift-storage migstorage \ -o go-template='{{ .data.AWS_ACCESS_KEY_ID }}' | base64 --decode
$ oc get secret -n openshift-storage migstorage \ -o go-template='{{ .data.AWS_ACCESS_KEY_ID }}' | base64 --decode
Copy to Clipboard Copied! Toggle word wrap Toggle overflow S3 provider secret access key:
oc get secret -n openshift-storage migstorage \ -o go-template='{{ .data.AWS_SECRET_ACCESS_KEY }}' | base64 --decode
$ oc get secret -n openshift-storage migstorage \ -o go-template='{{ .data.AWS_SECRET_ACCESS_KEY }}' | base64 --decode
Copy to Clipboard Copied! Toggle word wrap Toggle overflow