第4章 外部モードでの OpenShift Container Storage Cluster Service の作成


OpenShift Container Storage Operator を VMware vSphere およびベアメタルプラットフォームの両方のユーザーによってプロビジョニングされたインフラストラクチャーにインストールした後に、新規の OpenShift Container Storage クラスターサービスを作成する必要があります。

前提条件

  • 作業用の OpenShift Container Platform バージョン 4.5.4 以降にログインしている必要があります。
  • OpenShift Container Storage Operator はインストールされている必要があります。詳細は、「Installing OpenShift Container Storage Operator using the Operator Hub」を参照してください。
  • 外部クラスターには、Red Hat Ceph Storage バージョン 4.1.1 以降が必要です。詳細は、この Red Hat Ceph Storage リリースおよび対応する Ceph パッケージバージョンについてのナレッジベースのアーティクルを参照してください。

    Red Hat Ceph Storage クラスターを以前のリリースからバージョン 4.1.1 以降に更新し、これが新規にデプロイされたクラスターではない場合、Red Hat Ceph Storage クラスターで CephFS プールのアプリケーションタイプを手動で設定し、外部モードで CephFS PVC の作成を有効にする必要があります。

    詳細は、「 外部モードでの CephFS PVC の作成のトラブルシューティング 」を参照してください。

  • 外部の Red Hat Ceph Storage クラスターでは、target_size_ratio が 0.49 の PG Autoscaler を有効にすることが推奨されます。詳細は、Red Hat Ceph Storage ドキュメントの「 The placement group autoscaler」セクションを参照してください。
  • 外部 Ceph クラスターには、既存の RBD プールを使用できるように事前に設定されている必要があります。これがない場合は、OpenShift Container Storage のデプロイメントに進む前に、Red Hat Ceph Storage の管理者に問い合わせてこれを作成してください。

手順

  1. OpenShift Web コンソールから Operators Installed Operators をクリックし、インストールされた Operator を表示します。選択された Projectopenshift-storage であることを確認します。
  2. Installed Operators ページで、Openshift Container Storage をクリックします。

    図4.1 OpenShift Container Storage Operator ページ

    Screenshot of OpenShift Container Storage operator dashboard.
  3. Installed Operators Operator Details ページで、以下のいずれかを実行して Storage Cluster Service を作成します。

    1. Details タブで Provided APIs OCS Storage Cluster で、Create Instance をクリックします。

      図4.2 Operator Details ページ

      Screenshot of Operator Details Page.
    2. または、Storage cluster タブを選択し、Create OCS Cluster Service をクリックします。

      図4.3 Storage Cluster タブ

      Screenshot of Storage Cluster tab on OpenShift Container Storage Operator dashboard.
  4. Create Storage Cluster ページで、以下のオプションが選択されていることを確認します。

    図4.4 Create Storage Cluster 形式の外部クラスターへの接続

    Screenshot shows connect to external cluster section after you select mode as external where you can download the python script and then upload the RHCS json file.
    1. Mode を External に選択します。デフォルトでは、Internal はデプロイメントモードとして選択されます。
    2. Connect to external cluster セクションで、Download Script リンクをクリックして、Ceph クラスターの詳細を抽出するために python スクリプトをダウンロードします。
    3. Red Hat Ceph Storage (RHCS) クラスターの詳細を抽出するには、RHCS 管理者に問い合わせた上で Red Hat Ceph Storage クライアントノードでダウンロードした python スクリプトを実行します。

      • RHCS クライアントノードで以下のコマンドを実行し、利用可能な引数の一覧を表示します。

        # python3 ceph-external-cluster-details-exporter.py --help
        Copy to Clipboard
        重要

        Red Hat Ceph Storage 4.x クラスターが Red Hat Enterprise Linux 7.x (RHEL 7.x) クラスターにデプロイされている場合は、python3 ではなく python を使用します。

        注記

        RHCS クライアントノードにアクセスできない場合は、MON コンテナー内(コンテナー化されたデプロイメント)または MON ノード(rpm デプロイメント)からスクリプトを実行することもできます。

      • RHCS クラスターから外部クラスターの詳細を取得するには、以下のコマンドを実行します。

        # python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name <rbd block pool name> [optional arguments]
        Copy to Clipboard

        たとえば、以下のようになります。

        # python3 ceph-external-cluster-details-exporter.py --rbd-data-pool-name ceph-rbd --rgw-endpoint xxx.xxx.xxx.xxx:xxxx --run-as-user client.ocs
        Copy to Clipboard

        上記の例は、以下のようになります。

        • --RBD-data-pool-name は、OpenShift Container Storage で Block Storage を提供するために使用される必須のパラメーターです。
        • --rgw-endpoint は任意です。OpenShift Container Storage の Ceph Rados Gateway でオブジェクトストレージをプロビジョニングする場合に、このパラメーターを指定します。
        • -- run-as-user は、スクリプトで作成される Ceph ユーザーの名前を指定するために使用されるオプションのパラメーターです。このパラメーターを指定しないと、デフォルトのユーザー名 client.healthchecker が作成されます。新規ユーザーのパーミッションは以下のように設定されます。

          • caps: [mon] allow r, allow command quorum_status
          • caps: [osd] allow rwx pool=RGW_POOL_PREFIX.rgw.meta, allow r pool=.rgw.root, allow rw pool=RGW_POOL_PREFIX.rgw.control, allow x pool=RGW_POOL_PREFIX.rgw.buckets.index

            python スクリプトを使用して生成された JSON 出力の例:

            [{"name": "rook-ceph-mon-endpoints", "kind": "ConfigMap", "data": {"data": "ceph-mon-node=xxx.xxx.xxx.xxx:xxxx", "maxMonId": "0", "mapping": "{}"}}, {"name": "rook-ceph-mon", "kind": "Secret", "data": {"admin-secret": "<admin-secret>", "cluster-name": "openshift-storage", "fsid": "<fs-id>", "mon-secret": "<mon-secret>"}}, {"name": "rook-ceph-operator-creds", "kind": "Secret", "data": {"userID": "client.healthchecker", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-node", "kind": "Secret", "data": {"userID": "csi-rbd-node", "userKey": "<user-key>"}}, {"name": "rook-csi-rbd-provisioner", "kind": "Secret", "data": {"userID": "csi-rbd-provisioner", "userKey": "<user-key>"}}, {"name": "rook-csi-cephfs-node", "kind": "Secret", "data": {"adminID": "csi-cephfs-node", "adminKey": "<admin-key>"}}, {"name": "rook-csi-cephfs-provisioner", "kind": "Secret", "data": {"adminID": "csi-cephfs-provisioner", "adminKey": "<admin-key>"}}, {"name": "ceph-rbd", "kind": "StorageClass", "data": {"pool": "ceph-rbd"}}, {"name": "cephfs", "kind": "StorageClass", "data": {"fsName": "cephfs", "pool": "cephfs_data"}}, {"name": "ceph-rgw", "kind": "StorageClass", "data": {"endpoint": "xxx.xxx.xxx.xxx:xxxx"}}]
            Copy to Clipboard

      • JSON 出力を .json 拡張のあるファイルに保存します。

        注記

        OpenShift Container Storage がシームレスに機能するには、JSON ファイルを使用してアップロードされるパラメーター (RGW エンドポイント、CephFS の詳細、RBD プールなど) が、ストレージクラスターの作成後も RHCS 外部クラスターで変更されないままであることを確認します。

    4. External cluster metadata Browse をクリックして、json ファイルを選択し、アップロードします。json ファイルの内容が入力され、テキストボックスに表示されます。

      図4.5 JSON ファイルの内容

      Screenshot shows the content of the credentials file after it is uploaded
  5. Create をクリックします。

    注記

    Create ボタンは、.json ファイルのアップロード後にのみ有効になります。

検証手順

  • OpenShift Container Storage Cluster Service にステータスが Ready と表示されることを確認します。

    図4.6 ストレージクラスターサービスを表示する Storage Cluster タブ

    Screenshot of Storage Cluster tab showing storage cluster service.
  • OpenShift Container Storage、Pod および StorageClass が正常にインストールされていることを確認するには、外部モードの OpenShift Container Storage インストールの確認について参照してください。
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat