2.2. 外部 Ceph Storage システム用の OpenShift Data Foundation クラスターの作成
OpenShift Data Foundation Operator を、VMware vSphere またはユーザーによってプロビジョニングされたベアメタルのインフラストラクチャー上にデプロイされた OpenShift Container Platform にインストールした後に、OpenShift Data Foundation クラスターを新規作成する必要があります。
前提条件
- 有効な Red Hat OpenShift Data Foundation Advanced サブスクリプション。OpenShift Data Foundation のサブスクリプションの仕組みを確認するには、OpenShift Data Foundation subscriptions に関するナレッジベースの記事 を参照してください。
- OpenShift Data Foundation 4.16 をデプロイする前に OpenShift Container Platform のバージョンが 4.16 以上であることを確認する。
- OpenShift Data Foundation Operator がインストールされている。詳細は、Operato Hub を使用した OpenShift Data Foundation Operator のインストール を参照してください。
Red Hat OpenShift Data Foundation サポートおよび相互運用性チェッカー のラボにアクセスして外部モードの Red Hat OpenShift Data Foundation および Red Hat Ceph Storage (RHCS) のサポートと相互運用性を確認する。
-
ODF as Self-Managed Serviceとして Service Type を選択します。 - ドロップダウンから適切な Version を選択します。
- Versions タブの External Mode タブで Supported RHCS versions をクリックします。
-
- Red Hat Ceph Storage では、Ceph Dashboard がインストールされ、設定されている。詳細は、Ceph Dashboard のインストールおよびアクセス について参照してください。
- 外部の Red Hat Ceph Storage クラスターでは、PG Autoscaler を有効にする (推奨)。詳細は、Red Hat Ceph Storage ドキュメントの The placement group autoscaler セクションを参照してください。
手順
Operators
Installed Operators をクリックし、インストールされた Operator をすべて表示します。 選択された Project が
openshift-storageであることを確認します。- OpenShift Data Foundation をクリックした後、Create StorageSystem をクリックします。
Backing storage ページで、以下のオプションを選択します。
- Deployment type オプションで Full deployment を選択します。
- 利用可能なオプションから、Connect an external storage platform を選択します。
- ストレージプラットフォーム に Red Hat Ceph Storage を選択します。
- Next をクリックします。
接続の詳細ページで、必要な情報を提供します。
- Download Script リンクをクリックして、Ceph クラスターの詳細を抽出するために python スクリプトをダウンロードします。
Red Hat Ceph Storage (RHCS) クラスターの詳細を抽出するには、RHCS 管理者に問い合わせた上で Red Hat Ceph Storage ノードでダウンロードした python スクリプトを
admin keyを使用して実行します。RHCS ノードで以下のコマンドを実行し、利用可能な引数のリストを表示します。
python3 ceph-external-cluster-details-exporter.py --help
# python3 ceph-external-cluster-details-exporter.py --helpCopy to Clipboard Copied! Toggle word wrap Toggle overflow 重要Red Hat Ceph Storage 4.x クラスターが Red Hat Enterprise Linux 7.x (RHEL 7.x) クラスターにデプロイされている場合は、
python3ではなくpythonを使用します。MON コンテナー内 (コンテナー化されたデプロイメント) または MON ノード (RPM デプロイメント) からスクリプトを実行することもできます。
注記yum install cephadmコマンドを使用してから、cephadmコマンドを使用して、コンテナーを使用して RHCS クラスターをデプロイします。ノードへの Ceph パッケージのインストールには、yumを使用するのではなく、cephadmコマンドを使用して RHCS コンテナーイメージをプルする必要があります。詳細は、RHCS 製品ドキュメント を参照してください。RHCS クラスターから外部クラスターの詳細を取得するには、以下のコマンドを実行します。
python3 ceph-external-cluster-details-exporter.py \ --rbd-data-pool-name <rbd block pool name> [optional arguments]
# python3 ceph-external-cluster-details-exporter.py \ --rbd-data-pool-name <rbd block pool name> [optional arguments]Copy to Clipboard Copied! Toggle word wrap Toggle overflow 以下に例を示します。
python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name ceph-rbd --monitoring-endpoint xxx.xxx.xxx.xxx --monitoring-endpoint-port xxxx --rgw-endpoint xxx.xxx.xxx.xxx:xxxx --run-as-user client.ocs
# python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name ceph-rbd --monitoring-endpoint xxx.xxx.xxx.xxx --monitoring-endpoint-port xxxx --rgw-endpoint xxx.xxx.xxx.xxx:xxxx --run-as-user client.ocsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 詳細は以下のようになります。
RBD パラメーター
- rbd-data-pool-name
- OpenShift Data Foundation でブロックストレージを提供するために使用される必須のパラメーターです。
- rbd-metadata-ec-pool-name
- (オプション) イレイジャーコードの RBD メタデータプールの名前。
RGW パラメーター
- rgw-endpoint
(オプション) このパラメーターは、Ceph Rados Gateway for OpenShift Data Foundation を介してオブジェクトストレージをプロビジョニングする場合にのみ必要です。
<ip_address>:<port>の形式でエンドポイントを指定します。注記完全修飾ドメイン名 (FQDN) も
<FQDN>:<PORT>フォーマットでサポートされています。- rgw-pool-prefix
-
(オプション) RGW プールの接頭辞。指定しない場合、デフォルトの接頭辞は
defaultになります。 - rgw-tls-cert-path
(オプション) RADOS Gateway エンドポイント TLS 証明書のファイルパス。
TLS 証明書と RGW エンドポイントの詳細をヘルパースクリプト
ceph-external-cluster-details-exporter.pyに提供するには、次のコマンドを実行します。python3 ceph-external-clustergw-endpoint r-details-exporter.py --rbd-data-pool-name <rbd block pool name> --rgw-endpoint <ip_address>:<port> --rgw-tls-cert-path <file path containing cert>
# python3 ceph-external-clustergw-endpoint r-details-exporter.py --rbd-data-pool-name <rbd block pool name> --rgw-endpoint <ip_address>:<port> --rgw-tls-cert-path <file path containing cert>Copy to Clipboard Copied! Toggle word wrap Toggle overflow これにより、TLS 証明書を含む Kubernetes シークレットなど、Ceph Object Store CR を作成するためのリソースが作成されます。秘密鍵を含むすべての中間証明書を証明書ファイルに保存する必要があります。
- rgw-skip-tls
- (オプション) このパラメーターは、自己署名証明書が提供されている場合に TLS 証明書の検証を無視します (非推奨)。
監視パラメーター
- monitoring-endpoint
-
(オプション) OpenShift Container Platform クラスターから到達可能な、アクティブおよびスタンバイの
mgrsの IP アドレスのコンマ区切りリストを受け入れます。指定しないと、値が自動的に入力されます。 - monitoring-endpoint-port
-
(オプション) これは、
--monitoring-endpointで指定されたceph-mgrPrometheus エクスポーターに関連付けられるポートです。指定しないと、値が自動的に入力されます。
Ceph パラメーター
- ceph-conf
- (オプション) Ceph 設定ファイルの名前。
- run-as-user
(オプション) このパラメーターは、スクリプトによって作成される Ceph ユーザーの名前を指定するために使用されます。このパラメーターを指定しないと、デフォルトのユーザー名
client.healthcheckerが作成されます。新規ユーザーのパーミッションは以下のように設定されます。- caps: [mgr] はコマンド設定を許可します。
- caps: [mon] は r を許可し、コマンド quorum_status を許可し、コマンド version を許可します。
-
caps: [osd] allow rwx pool=
RGW_POOL_PREFIX.rgw.meta, allow r pool=.rgw.root, allow rw pool=RGW_POOL_PREFIX.rgw.control, allow rx pool=RGW_POOL_PREFIX.rgw.log, allow x pool=RGW_POOL_PREFIX.rgw.buckets.index
CephFS パラメーター
- cephfs-metadata-pool-name
- (オプション) CephFS メタデータプールの名前。
- cephfs-data-pool-name
- (オプション) CephFS データプールの名前。
- cephfs-filesystem-name
- (オプション) CephFS ファイルシステムの名前。
出力パラメーター
- dry-run
- (オプション) このパラメーターは、実行されたコマンドを実行せずに出力する際に役立ちます。
- 出力 (output)
- (オプション) 出力の保存が必要なファイル。
マルチクラスターパラメーター
- cluster-name
- (オプション) Ceph クラスター名。
- restricted-auth-permission
-
(オプション) このパラメーターは、
cephCSIKeyrings認証パーミッションを特定のプールおよびクラスターに限定します。これで設定する必要がある必須フラグはrbd-data-pool-nameおよびcluster-nameです。また、CephFS ユーザー制限がある場合は、cephfs-filesystem-nameフラグを渡して、パーミッションが特定の CephFS ファイルシステムに限定されるようにすることができます。
注記このパラメーターは、新しいデプロイメントにのみ適用する必要があります。プールおよびクラスターごとに
csi-usersを限定するには、新しいcsi-usersとそれらのcsi-users用の新しいシークレットを作成する必要があります。限定された認証パーミッションの例:
python3 /etc/ceph/create-external-cluster-resources.py --cephfs-filesystem-name myfs --rbd-data-pool-name replicapool --cluster-name rookStorage --restricted-auth-permission true
# python3 /etc/ceph/create-external-cluster-resources.py --cephfs-filesystem-name myfs --rbd-data-pool-name replicapool --cluster-name rookStorage --restricted-auth-permission trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow python スクリプトを使用して生成された JSON 出力の例:
[{"name": "rook-ceph-mon-endpoints", "kind": "ConfigMap", "data": {"data": "xxx.xxx.xxx.xxx:xxxx", "maxMonId": "0", "mapping": "{}"}}, {"name": "rook-ceph-mon", "kind": "Secret", "data": {"admin-secret": "admin-secret", "fsid": "<fs-id>", "mon-secret": "mon-secret"}}, {"name": "rook-ceph-operator-creds", "kind": "Secret", "data": {"userID": "<user-id>", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-node", "kind": "Secret", "data": {"userID": "csi-rbd-node", "userKey": "<user-key>"}}, {"name": "ceph-rbd", "kind": "StorageClass", "data": {"pool": "<pool>"}}, {"name": "monitoring-endpoint", "kind": "CephCluster", "data": {"MonitoringEndpoint": "xxx.xxx.xxx.xxx", "MonitoringPort": "xxxx"}}, {"name": "rook-ceph-dashboard-link", "kind": "Secret", "data": {"userID": "ceph-dashboard-link", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-provisioner", "kind": "Secret", "data": {"userID": "csi-rbd-provisioner", "userKey": "<user-key>"}}, {"name": "rook-csi-cephfs-provisioner", "kind": "Secret", "data": {"adminID": "csi-cephfs-provisioner", "adminKey": "<admin-key>"}}, {"name": "rook-csi-cephfs-node", "kind": "Secret", "data": {"adminID": "csi-cephfs-node", "adminKey": "<admin-key>"}}, {"name": "cephfs", "kind": "StorageClass", "data": {"fsName": "cephfs", "pool": "cephfs_data"}}, {"name": "ceph-rgw", "kind": "StorageClass", "data": {"endpoint": "xxx.xxx.xxx.xxx:xxxx", "poolPrefix": "default"}}, {"name": "rgw-admin-ops-user", "kind": "Secret", "data": {"accessKey": "<access-key>", "secretKey": "<secret-key>"}}][{"name": "rook-ceph-mon-endpoints", "kind": "ConfigMap", "data": {"data": "xxx.xxx.xxx.xxx:xxxx", "maxMonId": "0", "mapping": "{}"}}, {"name": "rook-ceph-mon", "kind": "Secret", "data": {"admin-secret": "admin-secret", "fsid": "<fs-id>", "mon-secret": "mon-secret"}}, {"name": "rook-ceph-operator-creds", "kind": "Secret", "data": {"userID": "<user-id>", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-node", "kind": "Secret", "data": {"userID": "csi-rbd-node", "userKey": "<user-key>"}}, {"name": "ceph-rbd", "kind": "StorageClass", "data": {"pool": "<pool>"}}, {"name": "monitoring-endpoint", "kind": "CephCluster", "data": {"MonitoringEndpoint": "xxx.xxx.xxx.xxx", "MonitoringPort": "xxxx"}}, {"name": "rook-ceph-dashboard-link", "kind": "Secret", "data": {"userID": "ceph-dashboard-link", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-provisioner", "kind": "Secret", "data": {"userID": "csi-rbd-provisioner", "userKey": "<user-key>"}}, {"name": "rook-csi-cephfs-provisioner", "kind": "Secret", "data": {"adminID": "csi-cephfs-provisioner", "adminKey": "<admin-key>"}}, {"name": "rook-csi-cephfs-node", "kind": "Secret", "data": {"adminID": "csi-cephfs-node", "adminKey": "<admin-key>"}}, {"name": "cephfs", "kind": "StorageClass", "data": {"fsName": "cephfs", "pool": "cephfs_data"}}, {"name": "ceph-rgw", "kind": "StorageClass", "data": {"endpoint": "xxx.xxx.xxx.xxx:xxxx", "poolPrefix": "default"}}, {"name": "rgw-admin-ops-user", "kind": "Secret", "data": {"accessKey": "<access-key>", "secretKey": "<secret-key>"}}]Copy to Clipboard Copied! Toggle word wrap Toggle overflow JSON 出力を
.json拡張のあるファイルに保存します。注記OpenShift Data Foundation がシームレスに機能するには、JSON ファイルを使用してアップロードされるパラメーター (RGW エンドポイント、CephFS の詳細、RBD プールなど) が、ストレージクラスターの作成後も RHCS 外部クラスターで変更されないままであることを確認します。
RHCS クラスターが以前のバージョンの OpenShift Data Foundation デプロイメントにすでに接続されているマルチテナントデプロイメントがある場合は、コマンドを実行します。
python3 ceph-external-cluster-details-exporter.py --upgrade
# python3 ceph-external-cluster-details-exporter.py --upgradeCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Browse をクリックして JSON ファイルを選択し、アップロードします。
JSON ファイルの内容が入力され、テキストボックスに表示されます。
Next をクリックします。
Next ボタンは、
.jsonファイルのアップロード後にのみ有効になります。
Review and create ページで、すべての詳細が正しいことを確認します。
- 設定を変更するには、Back をクリックして前の設定ページに戻ります。
- Create StorageSystem をクリックします。
検証手順
インストールされたストレージクラスターの最終ステータスを確認するには、以下を実行します。
-
OpenShift Web コンソールで、Installed Operators
OpenShift Data Foundation Storage System ocs-external-storagecluster-storagesystem Resources の順に移動します。 -
StorageClusterのStatusがReadyになっており、緑色のチェックマークが表示されていることを確認します。 - OpenShift Data Foundation、Pod、および StorageClass が正常にインストールされていることを確認するには、Verifying your external mode OpenShift Data Foundation installation for external Ceph storage system を参照してください。