4.2. 역할 데이터 파일 생성
각 프레임에 대해 구성 가능한 각 역할을 정의하고 구성 가능한 네트워크를 각 역할에 연결하려면 다음 단계를 완료합니다.
절차
stack사용자의 홈 디렉터리에 사용자 지정역할디렉터리를 생성합니다.$ mkdir ~/rolesdirector 코어 템플릿 컬렉션의 기본 컨트롤러, 계산 및 Ceph Storage 역할을 roles 디렉터리에 복사합니다. Compute 및 Ceph Storage의 파일 이름을 Leaf 0에 맞게 변경합니다.
$ 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.yamlLeaf 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.yamlLeaf 0, Leaf 1 및 Leaf 2 파일에서
name,HostnameFormatDefault및deprecated_nic_config_name매개 변수를 편집하여 해당 Leaf 매개 변수와 정렬되도록 합니다. 예를 들어 Leaf 0 Compute 파일의 매개변수에는 다음과 같은 값이 있습니다.- name: ComputeLeaf0 HostnameFormatDefault: '%stackname%-compute-leaf0-%index%' deprecated_nic_config_name: 'computeleaf0.yaml'Leaf 0 Ceph Storage 매개변수의 값은 다음과 같습니다.
- name: CephStorageLeaf0 HostnameFormatDefault: '%stackname%-cephstorage-leaf0-%index%' deprecated_nic_config_name: 'ceph-strorageleaf0.yaml'각 Leaf
네트워크매개변수에 맞게 Leaf 1 및 Leaf 2 파일에서 network 매개 변수를 편집합니다. 예를 들어 Leaf 1 Compute 파일의 매개변수에는 다음과 같은 값이 있습니다.- name: ComputeLeaf1 networks: InternalApi: subnet: internal_api_leaf1 Tenant: subnet: tenant_leaf1 Storage: subnet: storage_leaf1Leaf 1 Ceph Storage 매개변수의 값은 다음과 같습니다.
- name: CephStorageLeaf1 networks: Storage: subnet: storage_leaf1 StorageMgmt: subnet: storage_mgmt_leaf1참고이는 Leaf 1 및 Leaf 2에만 적용됩니다. Leaf 0의
network매개 변수에는_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이렇게 하면 각 풀 네트워크에 대한 모든 사용자 지정 역할을 포함하는 전체
roles_data_spine_leaf.yaml파일이 생성됩니다.
각 역할에는 자체 NIC 구성이 있습니다. 스파인-리프형 구성을 구성하기 전에 현재 NIC 구성에 맞게 기본 NIC 템플릿 세트를 생성해야 합니다.