7.3. Installare il Migration Toolkit for Containers Operator esistente su OpenShift Container Platform 3
È possibile installare manualmente il Migration Toolkit for Containers Operator esistente su OpenShift Container Platform 3.
Requisiti
-
È necessario aver eseguito l'accesso come utente con privilegi di
cluster-adminsu tutti i cluster. -
È necessario disporre di accesso a
registry.redhat.io. -
È necessario avere installato
podman. - È necessario creare un segreto del flusso di immagini e copiarlo su ogni nodo del cluster.
-
È necessario avere una workstation Linux con accesso alla rete per poter scaricare i file da
registry.redhat.io. - È necessario creare un'immagine speculare del catalogo Operator.
- È necessario installare Migration Toolkit for Containers Operator dal catalogo Operator speculare su OpenShift Container Platform 4.10.
Procedura
Accedere a
registry.redhat.iocon le proprie credenziali del Red Hat Customer Portal:$ sudo podman login registry.redhat.ioScaricare il file
operator.yml:$ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.5.3):/operator.yml ./Scaricare il file
controller.yml:$ sudo podman cp $(sudo podman create \ registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator:v1.5.3):/controller.yml ./Ottenere il mapping delle immagini di Operator eseguendo il seguente comando:
$ grep openshift-migration-legacy-rhel8-operator ./mapping.txt | grep rhmtcIl file
mapping.txtè stato creato insieme al catalogo Operator speculare. L'output mostra il mapping tra l'immagine diregistry.redhat.ioe l'immagine di registro speculare.Esempio di output
registry.redhat.io/rhmtc/openshift-migration-legacy-rhel8-operator@sha256:468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a=<registry.apps.example.com>/rhmtc/openshift-migration-legacy-rhel8-operatorAggiornare i valori
imageper i containeransibleeoperatore il valoreREGISTRYnel fileoperator.yml:containers: - name: ansible image: <registry.apps.example.com>/rhmtc/openshift-migration-legacy-rhel8-operator@sha256:<468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a>1 ... - name: operator image: <registry.apps.example.com>/rhmtc/openshift-migration-legacy-rhel8-operator@sha256:<468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a>2 ... env: - name: REGISTRY value: <registry.apps.example.com>3 - Accedere al cluster di OpenShift Container Platform 3.
Creare l'oggetto Migration Toolkit for Containers Operator:
$ oc create -f operator.ymlEsempio di output
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 exists1 Error from server (AlreadyExists): error when creating "./operator.yml": rolebindings.rbac.authorization.k8s.io "system:image-pullers" already exists- 1
- Puoi ignorare i messaggi
Error from server (AlreadyExists). Sono causati dal Migration Toolkit for Containers Operator che crea risorse per le versioni precedenti di OpenShift Container Platform 3 fornite nelle versioni successive.
Creare l'oggetto
MigrationController:$ oc create -f controller.ymlVerificare che i pod MTC siano in esecuzione:
$ oc get pods -n openshift-migration