OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
第6章 既存の外部の OpenShift Data Foundation クラスターへのファイルおよびオブジェクトストレージの追加
OpenShift Data Foundation が外部モードで設定されている場合に、Persistent Volume Claim (永続ボリューム要求、PVC) および Object Bucket Claim (オブジェクトバケット要求) 向けにストレージを提供する方法は複数あります。
- ブロックストレージ用の Persistent Volume Claim (永続ボリューム要求、PVC) は、外部の Red Hat Ceph Storage クラスターから直接提供されます。
- ファイルストレージ用の Persistent Volume Claim (永続ボリューム要求、PVC) は、メタデータサーバー (MDS) を外部の Red Hat Ceph Storage クラスターに追加して提供できます。
- オブジェクトストレージのオブジェクトバケット要求は、Multicloud Object Gateway を使用するか、Ceph Object Gateway を外部の Red Hat Ceph Storage クラスターに追加して提供できます。
以下のプロセスを使用して、ブロックストレージだけを提供するために最初にデプロイされていたファイルストレージ (メタデータサバー 使用)、オブジェクトストレージ (Ceph Object Gateway 使用) または両方を外部の OpenShift Data Foundation クラスターに追加します。
前提条件
-
OpenShift Data Foundation 4.10 が OpenShift Container Platform バージョン 4.10 以降にインストールされ、実行されている。また、外部モードの OpenShift Data Foundation Cluster が
Ready状態にある。 外部の Red Hat Ceph Storage クラスターが以下のいずれかまたは両方で設定されている。
- オブジェクトストレージ用に OpenShift Container Platform クラスターがアクセスできる Ceph Object Gateway (RGW) エンドポイント
- ファイルストレージ用のメタデータサーバー (MDS) プール
-
外部の OpenShift Data Foundation クラスターのデプロイメント時に
ceph-external-cluster-details-exporter.pyスクリプトで使用されるパラメーターを把握している。
手順
以下のコマンドを使用して
ceph-external-cluster-details-exporter.pyPython スクリプトの OpenShift Data Foundation バージョンをダウンロードします。oc get csv $(oc get csv -n openshift-storage | grep ocs-operator | awk '{print $1}') -n openshift-storage -o jsonpath='{.metadata.annotations.external\.features\.ocs\.openshift\.io/export-script}' | base64 --decode > ceph-external-cluster-details-exporter.pyoc get csv $(oc get csv -n openshift-storage | grep ocs-operator | awk '{print $1}') -n openshift-storage -o jsonpath='{.metadata.annotations.external\.features\.ocs\.openshift\.io/export-script}' | base64 --decode > ceph-external-cluster-details-exporter.pyCopy to Clipboard Copied! Toggle word wrap Toggle overflow 更新パーミッションは、外部の Red Hat Ceph Storage クラスターのクライアントノードで
ceph-external-cluster-details-exporter.pyを実行して、外部の Red Hat Ceph Storage クラスターを制限します。これを行うには、Red Hat Ceph Storage の管理者に問い合わせる必要がある場合があります。python3 ceph-external-cluster-details-exporter.py --upgrade \ --run-as-user=ocs-client-name \ --rgw-pool-prefix rgw-pool-prefix
# python3 ceph-external-cluster-details-exporter.py --upgrade \ --run-as-user=ocs-client-name \ --rgw-pool-prefix rgw-pool-prefixCopy to Clipboard Copied! Toggle word wrap Toggle overflow --run-as-user-
OpenShift Data Foundation クラスターのデプロイメント時に使用されるクライアント名。別のクライアント名が設定されていない場合は、デフォルトのクライアント名
client.healthcheckerを使用します。 --rgw-pool-prefix- Ceph Object Gateway プールに使用する接頭辞。デフォルトの接頭辞を使用している場合は、省略できます。
外部の Red Hat Ceph Storage クラスターから設定詳細を生成して保存します。
外部の Red Hat Ceph Storage クラスターのクライアントノードで
ceph-external-cluster-details-exporter.pyを実行して、設定の詳細を生成します。python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name rbd-block-pool-name --monitoring-endpoint ceph-mgr-prometheus-exporter-endpoint --monitoring-endpoint-port ceph-mgr-prometheus-exporter-port --run-as-user ocs-client-name --rgw-endpoint rgw-endpoint --rgw-pool-prefix rgw-pool-prefix
# python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name rbd-block-pool-name --monitoring-endpoint ceph-mgr-prometheus-exporter-endpoint --monitoring-endpoint-port ceph-mgr-prometheus-exporter-port --run-as-user ocs-client-name --rgw-endpoint rgw-endpoint --rgw-pool-prefix rgw-pool-prefixCopy to Clipboard Copied! Toggle word wrap Toggle overflow --monitoring-endpoint- オプション。OpenShift Container Platform クラスターから到達可能な、アクティブ mgr およびスタンバイ mgr の IP アドレスのコンマ区切りリストを受け入れます。指定しない場合には、値が自動的に入力されます。
--monitoring-endpoint-port-
オプション。
--monitoring-endpointで指定された ceph-mgr Prometheus エクスポーターに関連付けられるポートです。指定しない場合には、値が自動的に入力されます。 --run-as-user- OpenShift Data Foundation クラスターのデプロイメント時に使用されるクライアント名。別のクライアント名が設定されていない場合は、デフォルトのクライアント名 client.healthchecker を使用します。
--rgw-endpoint- このパラメーターを指定して OpenShift Data Foundation の Ceph Object Gateway でオブジェクトストレージをプロビジョニングします (任意のパラメーター)。
--rgw-pool-prefix- Ceph Object Gateway プールに使用する接頭辞。デフォルトの接頭辞を使用している場合は、省略できます。
ユーザーパーミッションは、以下のように更新されます。
caps: [mgr] allow command config caps: [mon] allow r, allow command quorum_status, allow command version caps: [osd] allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.index
caps: [mgr] allow command config caps: [mon] allow r, allow command quorum_status, allow command version caps: [osd] allow rwx pool=default.rgw.meta, allow r pool=.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x pool=default.rgw.buckets.indexCopy to Clipboard Copied! Toggle word wrap Toggle overflow 注記Ceph Object Gateway の詳細 (指定されている場合) 以外の全パラメーター (任意の引数を含む) は、OpenShift Data Foundation を外部モードでデプロイした時に使用したものと同じです。
スクリプトの出力を
external-cluster-config.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 ファイルをアップロードします。
- OpenShift Web コンソールにログインします。
-
Workloads
Secrets をクリックします。 -
プロジェクト を
openshift-storageに設定します。 - rook-ceph-external-cluster-details をクリックします。
-
Actions (⋮)
Edit Secret をクリックします。 -
Browse をクリックして
external-cluster-config.jsonファイルをアップロードします。 - Save をクリックします。
検証手順
OpenShift Data Foundation クラスターが正常であり、データが回復性があることを確認するには、Storage
Data foundation Storage Systems タブに移動してから、ストレージシステム名をクリックします。 -
Overview
Block and File タブで Status カードをチェックして、Storage Cluster に正常であることを示す緑色のチェックマークが表示されていることを確認します。
-
Overview
ファイルストレージ用のメタデータサーバー (MDS) を追加した場合:
-
Workloads
Pods をクリックして、 csi-cephfsplugin-*Pod が新規作成され、状態が Running であることを確認します。 -
Storage
Storage Classes をクリックして ocs-external-storagecluster-cephfsストレージクラスが作成されていることを確認します。
-
Workloads
オブジェクトストレージ用に Ceph Object Gateway を追加した場合:
-
Storage
Storage Classes をクリックして ocs-external-storagecluster-ceph-rgwストレージクラスが作成されていることを確認します。 -
OpenShift Data Foundation クラスターが正常であり、データが回復性があることを確認するには、Storage
Data foundation Storage Systems タブに移動してから、ストレージシステム名をクリックします。 - Object タブをクリックして、Object Service および Data resiliency に正常であることを示す緑色のチェックマークが表示されていることを確認します。
-
Storage