1.4.2.4. 制限された環境での Cluster Application Migration Operator の OpenShift Container Platform 3 ソースクラスターへのインストール
Cluster Application Migration Operator イメージに基づいてマニフェストファイルを作成し、マニフェストを編集してローカルイメージレジストリーを参照できます。次に、ローカルイメージを使用して Cluster Application Migration Operator を OpenShift Container Platform 3 ソースクラスターに作成できます。
前提条件
-
registry.redhat.io
へのアクセス - ネットワークアクセスが無制限の Linux ワークステーション
- Docker v2-2 をサポートするミラーレジストリー
- ミラーレジストリーにプッシュされるカスタム Operator カタログ
手順
ネットワークアクセスが無制限のワークステーションで、Red Hat カスタマーポータルの認証情報を使用して
registry.redhat.io
にログインします。$ sudo podman login registry.redhat.io
注記システムがルートレス Podman コンテナー用に設定されている場合は、この手順に
sudo
は必要ありません。operator.yml
ファイルをダウンロードします。$ sudo podman cp $(sudo podman create registry.redhat.io/rhcam-1-2/openshift-migration-rhel7-operator:v1.2):/operator.yml ./
controller-3.yml
ファイルをダウンロードします。$ sudo podman cp $(sudo podman create registry.redhat.io/rhcam-1-2/openshift-migration-rhel7-operator:v1.2):/controller-3.yml ./
OpenShift Container Platform 4 クラスターで
oc adm catalog mirror
の実行時に作成されたmapping.txt
ファイルから Operator イメージの値を取得します。$ grep openshift-migration-rhel7-operator ./mapping.txt | grep rhcam-1-2
出力には、
registry.redhat.io
イメージとミラーレジストリーイメージ間のマッピングが表示されます。registry.redhat.io/rhcam-1-2/openshift-migration-rhel7-operator@sha256:468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a=<registry.apps.example.com>/rhcam-1-2/openshift-migration-rhel7-operator
operator.yml
ファイルのimage
およびREGISTRY
の値を更新します。containers: - name: ansible image: <registry.apps.example.com>/rhcam-1-2/openshift-migration-rhel7-operator@sha256:<468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a> 1 ... - name: operator image: <registry.apps.example.com>/rhcam-1-2/openshift-migration-rhel7-operator@sha256:<468a6126f73b1ee12085ca53a312d1f96ef5a2ca03442bcb63724af5e2614e8a> 2 ... env: - name: REGISTRY value: <registry.apps.example.com> 3
- OpenShift Container Platform 3 クラスターにログインします。
Cluster Application Migration Operator CR オブジェクトを作成します。
$ 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 1 Error from server (AlreadyExists): error when creating "./operator.yml": rolebindings.rbac.authorization.k8s.io "system:image-pullers" already exists
- 1
Error from server (AlreadyExists)
メッセージは無視できます。これらは、Cluster Applicatino Migration Operator が以降のリリースで提供されるリリースを OpenShift Container Platform 3 の以前のバージョン用に作成することによって生じます。
Migration コントローラー CR オブジェクトを作成します。
$ oc create -f controller-3.yml
Velero および Restic Pod が実行されていることを確認します。
$ oc get pods -n openshift-migration