1.6.2. Central Infrastructure Management サービスの有効化
CIM サービスは、Red Hat Advanced Cluster Management で提供され、OpenShift Container Platform クラスターをデプロイします。Red Hat Advanced Cluster Management ハブクラスターで MultiClusterHub Operator が有効になっているときにデプロイされますが、必ず有効化しておく必要があります。
CIM サービスを有効にするには、以下の手順を実行します。
Red Hat Advanced Cluster Management バージョン 2.4.0 のみ。Red Hat Advanced Cluster Management バージョン 2.4.1 以降を実行している場合は、この手順を省略します。以下のコマンドを実行して、
HiveConfigリソースを変更して CIM サービスの機能ゲートを有効にします。oc patch hiveconfig hive --type merge -p '{"spec":{"targetNamespace":"hive","logLevel":"debug","featureGates":{"custom":{"enabled":["AlphaAgentInstallStrategy"]},"featureSet":"Custom"}}}'provisioningリソースを変更し、以下のコマンドを実行してベアメタル Operator がすべての namespace を監視できるようにします。oc patch provisioning provisioning-configuration --type merge -p '{"spec":{"watchAllNamespaces": true }}'以下の手順を実行して
AgentServiceConfigCR を作成します。以下の
YAMLコンテンツをagent_service_config.yamlファイルに保存します。apiVersion: agent-install.openshift.io/v1beta1 kind: AgentServiceConfig metadata: name: agent spec: databaseStorage: accessModes: - ReadWriteOnce resources: requests: storage: <db_volume_size> filesystemStorage: accessModes: - ReadWriteOnce resources: requests: storage: <fs_volume_size> osImages: - openshiftVersion: "<ocp_version>" version: "<ocp_release_version>" url: "<iso_url>" rootFSUrl: "<root_fs_url>" cpuArchitecture: "x86_64"db_volume_sizeはdatabaseStorageフィールドのボリュームサイズに置き換えます (例:50M)。この値は、クラスターのデータベーステーブルやデータベースビューなどのファイルを格納するために割り当てられるストレージの量を指定します。クラスターが多い場合は、より高い値を使用する必要がある場合があります。fs_volume_sizeを、filesystemStorageフィールドのボリュームのサイズ (例:50M) に置き換えます。この値は、クラスターのログ、マニフェスト、およびkubeconfigファイルを保存するために割り当てられるストレージのサイズを指定します。クラスターが多い場合は、より高い値を使用する必要がある場合があります。ocp_versionは、インストールする OpenShift Container Platform バージョンに置き換えます (例:4.9)。ocp_release_versionは、特定のインストールバージョン (例:49.83.2021032516400) に置き換えます。iso_urlは、 ISO URL に置き換えます (例:https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.10/4.10.3/rhcos-4.10.3-x86_64-live.x86_64.iso)。他の値は https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.10/4.10.3/ にあります。root_fs_urlは、ルート FS イメージの URL に置き換えます (例:https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.10/4.10.3/rhcos-4.10.3-x86_64-live-rootfs.x86_64.img)。他の値は https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.10/4.10.3/ にあります。以下のコマンドを実行して AgentServiceConfig CR を作成します。
oc create -f agent_service_config.yaml出力は次の例のような内容になります。
agentserviceconfig.agent-install.openshift.io/agent created
CIM サービスが設定されました。assisted-service と assisted-image-service デプロイメントをチェックして、Pod の準備ができ、実行されていることを確認して、正常性を検証できます。コンソールを使用したインフラストラクチャー環境の作成 に進んでください。