3.4. オーバークラウドのデプロイ

作成した環境ファイルを使用して、オーバークラウドをデプロイします。

手順

  • オーバークラウドの作成には、openstack overcloud deploy コマンドに追加の引数を指定する必要があります。

    $ openstack overcloud deploy --templates \
      -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml \
      -e /home/stack/templates/ceph-config.yaml \
      -e --ntp-server pool.ntp.org \
      ...

    上記のコマンド例は、以下のオプションを使用します。

  • --templates - デフォルトの heat テンプレートコレクション (/usr/share/openstack-tripleo-heat-templates/) からオーバークラウドを作成します。
  • -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml: 既存の Ceph クラスターをオーバークラウドに統合するように director を設定します。
  • -e /home/stack/templates/ceph-config.yaml: -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml の設定するデフォルトを上書きするためのカスタム環境ファイルを追加します。ここでは、ceph-ansible パッケージのインストール で作成したカスタム環境ファイルです。
  • --ntp-server pool.ntp.org - NTP サーバーを設定します。

3.4.1. CephFS を使用した Shared File Systems サービスの環境ファイルの追加

CephFS で Shared File Systems サービス (manila) を使用するオーバークラウドをデプロイする場合は、追加の環境ファイルを追加する必要があります。

手順

  1. 追加の環境ファイルを作成して追加します。

    • ネイティブ CephFS バックエンドドライバーを使用するオーバークラウドをデプロイする場合には、/usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsnative-config.yaml を使用します。
    • NFS バッグエンドに CephFS を使用するオーバークラウドをデプロイする場合は、/usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsganesha-config.yaml を追加します。

      Red Hat は、共有がエクスポートされる隔離された StorageNFS ネットワークを使用して Ceph-through-NFS ドライバーをデプロイすることを推奨します。隔離されたネットワークをオーバークラウドのコントローラーノードにデプロイする必要があります。この展開を有効にするために、director には次のファイルとロールが含まれています。

      • StorageNFS ネットワークを含むカスタムネットワーク設定ファイルの例 (/usr/share/openstack-tripleo-heat-templates/network_data_ganesha.yaml)。このファイルを確認し、必要に応じてカスタマイズします。
      • ControllerStorageNFS ロール。
  2. 使用する CephFS バックエンドに応じて、openstack overcloud deploy コマンドを変更します。

    • ネイティブ CephFS の場合:

       $ openstack overcloud deploy --templates \
         -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml \
         -e /usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsnative-config.yaml \
         -e /home/stack/templates/ceph-config.yaml \
         -e --ntp-server pool.ntp.org
         ...
    • NFS バックエンドに CephFS を使用する場合:

        $ openstack overcloud deploy --templates \
            -n /usr/share/openstack-tripleo-heat-templates/network_data_ganesha.yaml \
            -r /home/stack/custom_roles.yaml \
            -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml \
            -e /usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsganesha-config.yaml \
            -e /home/stack/templates/ceph-config.yaml \
            -e --ntp-server pool.ntp.org
            ...
      注記

      カスタムの ceph-config.yaml 環境ファイルは、ceph-ansible-external.yaml ファイル、および manila-cephfsnative-config.yaml ファイルまたは manila-cephfsganesha-config.yaml ファイルのいずれかのパラメーターを上書きします。したがって、ceph-ansible-external.yaml、および manila-cephfsnative-config.yaml または manila-cephfsganesha-config.yaml のいずれかの後に、デプロイメントコマンドにカスタムの ceph-config.yaml 環境ファイルを追加します。

      環境ファイルのサンプル

      parameter_defaults:
          CinderEnableIscsiBackend: false
          CinderEnableRbdBackend: true
          CinderEnableNfsBackend: false
          NovaEnableRbdBackend: true
          GlanceBackend: rbd
          CinderRbdPoolName: "volumes"
          NovaRbdPoolName: "vms"
          GlanceRbdPoolName: "images"
          CinderBackupRbdPoolName: "backups"
          GnocchiRbdPoolName: "metrics"
          CephClusterFSID: <cluster_ID>
          CephExternalMonHost: <IP_address>,<IP_address>,<IP_address>
          CephClientKey: "<client_key>"
          CephClientUserName: "openstack"
          ManilaCephFSDataPoolName: manila_data
          ManilaCephFSMetadataPoolName: manila_metadata
          ManilaCephFSCephFSAuthId: 'manila'
          CephManilaClientKey: '<client_key>'
          ExtraConfig:
              ceph::profile::params::rbd_default_features: '1'

      • <cluster_ID><IP_address>、および <client_key> を環境に適した値に置き換えます。

関連情報

3.4.2. オブジェクトストレージ用外部 Ceph Object Gateway (RGW) の新規環境ファイルの追加

オブジェクトストレージ用に既存の RGW サービスを使用するオーバークラウドをデプロイする場合には、さらに環境ファイルを追加する必要があります。

手順

  1. カスタム環境ファイル (swift-external-params.yaml 等) に以下の parameter_defaults を追加し、実際のデプロイメントに合わせて値を調整します。

    parameter_defaults:
       ExternalSwiftPublicUrl: 'http://<Public RGW endpoint or loadbalancer>:8080/swift/v1/AUTH_%(project_id)s'
       ExternalSwiftInternalUrl: 'http://<Internal RGW endpoint>:8080/swift/v1/AUTH_%(project_id)s'
       ExternalSwiftAdminUrl: 'http://<Admin RGW endpoint>:8080/swift/v1/AUTH_%(project_id)s'
       ExternalSwiftUserTenant: 'service'
       SwiftPassword: 'choose_a_random_password'
    注記

    サンプルコードスニペットには、お使いの環境で使用する値とは異なるパラメーター値が含まれる場合があります。

    • リモート RGW インスタンスがリッスンするデフォルトのポートは 8080 です。外部 RGW の設定方法によっては、ポートが異なる場合があります。
    • オーバークラウドで作成した swift ユーザーは、SwiftPassword パラメーターで定義したパスワードを使用します。rgw_keystone_admin_password を使用し、Identity サービスに対する認証に同じパスワードを使用するように外部 RGW インスタンスを設定する必要があります。
  2. Ceph 設定ファイルに以下のコードを追加して、Identity サービスを使用するように RGW を設定します。変数の値を実際の環境に応じて置き換えます。

        rgw_keystone_api_version = 3
        rgw_keystone_url = http://<public Keystone endpoint>:5000/
        rgw_keystone_accepted_roles = member, Member, admin
        rgw_keystone_accepted_admin_roles = ResellerAdmin, swiftoperator
        rgw_keystone_admin_domain = default
        rgw_keystone_admin_project = service
        rgw_keystone_admin_user = swift
        rgw_keystone_admin_password = <password_as_defined_in_the_environment_parameters>
        rgw_keystone_implicit_tenants = true
        rgw_keystone_revocation_interval = 0
        rgw_s3_auth_use_keystone = true
        rgw_swift_versioning_enabled = true
        rgw_swift_account_in_url = true
    注記

    デフォルトでは、director は Identity サービスに以下のロールとユーザーを作成します。

    • rgw_keystone_accepted_admin_roles: ResellerAdmin, swiftoperator
    • rgw_keystone_admin_domain: default
    • rgw_keystone_admin_project: service
    • rgw_keystone_admin_user: swift
  3. デプロイメントに該当するその他の環境ファイルと共に、追加の環境ファイルを指定して、オーバークラウドをデプロイします。

    openstack overcloud deploy --templates \
    -e <your_environment_files>
    -e /usr/share/openstack-tripleo-heat-templates/environments/swift-external.yaml
    -e swift-external-params.yaml