4.2. ロールデータファイルの作成
各リーフ用のそれぞれのコンポーザブルロールを定義して、コンポーザブルネットワークをそれぞれのロールに接続するには、以下の手順を実施します。
手順
stack
ユーザーのホームディレクトリーに、カスタムroles
ディレクトリーを作成します。mkdir ~/roles
$ mkdir ~/roles
Copy to Clipboard Copied! Toggle word wrap Toggle overflow デフォルトの Controller、Compute、Ceph Storage ロールを、director のコアテンプレートコレクションから roles ディレクトリーにコピーします。Leaf 0 に合わせて、Compute および Ceph Storage 用ファイルの名前を変更します。
cp /usr/share/openstack-tripleo-heat-templates/roles/Controller.yaml ~/roles/Controller.yaml cp /usr/share/openstack-tripleo-heat-templates/roles/Compute.yaml ~/roles/Compute0.yaml cp /usr/share/openstack-tripleo-heat-templates/roles/CephStorage.yaml ~/roles/CephStorage0.yaml
$ cp /usr/share/openstack-tripleo-heat-templates/roles/Controller.yaml ~/roles/Controller.yaml $ cp /usr/share/openstack-tripleo-heat-templates/roles/Compute.yaml ~/roles/Compute0.yaml $ cp /usr/share/openstack-tripleo-heat-templates/roles/CephStorage.yaml ~/roles/CephStorage0.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Leaf 0 の Compute および Ceph Storage ファイルをベースとして、Leaf 1 および Leaf 2 ファイル用にコピーを作成します。
cp ~/roles/Compute0.yaml ~/roles/Compute1.yaml cp ~/roles/Compute0.yaml ~/roles/Compute2.yaml cp ~/roles/CephStorage0.yaml ~/roles/CephStorage1.yaml cp ~/roles/CephStorage0.yaml ~/roles/CephStorage2.yaml
$ cp ~/roles/Compute0.yaml ~/roles/Compute1.yaml $ cp ~/roles/Compute0.yaml ~/roles/Compute2.yaml $ cp ~/roles/CephStorage0.yaml ~/roles/CephStorage1.yaml $ cp ~/roles/CephStorage0.yaml ~/roles/CephStorage2.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow それぞれのリーフパラメーターと整合するように、Leaf 0、Leaf 1、および Leaf 2 ファイルの
name
、HostnameFormatDefault
、およびdeprecated_nic_config_name
パラメーターを編集します。たとえば、Leaf 0 Compute ファイルのパラメーター値は、以下のように設定します。- name: ComputeLeaf0 HostnameFormatDefault: '%stackname%-compute-leaf0-%index%' deprecated_nic_config_name: 'computeleaf0.yaml'
- name: ComputeLeaf0 HostnameFormatDefault: '%stackname%-compute-leaf0-%index%' deprecated_nic_config_name: 'computeleaf0.yaml'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Leaf 0 Ceph Storage ファイルのパラメーター値は、以下のように設定します。
- name: CephStorageLeaf0 HostnameFormatDefault: '%stackname%-cephstorage-leaf0-%index%' deprecated_nic_config_name: 'ceph-strorageleaf0.yaml'
- name: CephStorageLeaf0 HostnameFormatDefault: '%stackname%-cephstorage-leaf0-%index%' deprecated_nic_config_name: 'ceph-strorageleaf0.yaml'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow それぞれのリーフネットワークのパラメーターと整合するように、Leaf 1 および Leaf 2 ファイルの
networks
パラメーターを編集します。たとえば、Leaf 1 Compute ファイルのパラメーター値は、以下のように設定します。Copy to Clipboard Copied! Toggle word wrap Toggle overflow Leaf 1 Ceph Storage ファイルのパラメーター値は、以下のように設定します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注記この設定を行うのは、Leaf 1 および Leaf 2 だけです。Leaf 0 の
networks
パラメーターは、ベースサブネットの値のままにします (各サブネットの小文字を使用した名前に接尾辞_subnet
を追加したもの)。たとえば、Leaf 0 の内部 API はinternal_api_subnet
となります。ロールの設定が完了したら、以下のコマンドを実行して完全なロールデータファイルを生成します。
openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Compute Compute1 Compute2 CephStorage CephStorage1 CephStorage2
$ openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Compute Compute1 Compute2 CephStorage CephStorage1 CephStorage2
Copy to Clipboard Copied! Toggle word wrap Toggle overflow これにより、各リーフネットワーク用の全カスタムロールが含まれた完全な
roles_data_spine_leaf.yaml
ファイルが作成されます。
ロールごとに独自の NIC 設定があります。スパイン/リーフ構成を設定する前に、現在の NIC 設定に適した NIC テンプレートの基本セットを作成する必要があります。