4.8. 스파인-리프 배포에 새 리프 추가
네트워크 용량을 늘리거나 새 물리적 사이트를 추가할 때 RHOSP(Red Hat OpenStack Platform) 스파인-리프(Red Hat OpenStack Platform)의 새 리프가 필요할 수 있습니다.
사전 요구 사항
- RHOSP 배포에서는 스파인-리프형 네트워크 토폴로지를 사용합니다.
절차
- 언더클라우드 호스트에 stack 사용자로 로그인합니다.
언더클라우드 인증 정보 파일을 가져옵니다.
$ source ~/stackrc/usr/share/openstack-tripleo-heat-templates/network_data_spine_leaf.yaml파일에서 추가하는 새 리프에 대한 구성 가능 네트워크 항목으로 리프 서브넷을 추가합니다.예제
이 예에서는 새 리프(
leaf3)에 대한 서브넷 항목이 추가되었습니다.- name: InternalApi name_lower: internal_api vip: true vlan: 10 ip_subnet: '172.18.0.0/24' allocation_pools: [{'start': '172.18.0.4', 'end': '172.18.0.250'}] gateway_ip: '172.18.0.1' subnets: internal_api_leaf1: vlan: 11 ip_subnet: '172.18.1.0/24' allocation_pools: [{'start': '172.18.1.4', 'end': '172.18.1.250'}] gateway_ip: '172.18.1.1' internal_api_leaf2: vlan: 12 ip_subnet: '172.18.2.0/24' allocation_pools: [{'start': '172.18.2.4', 'end': '172.18.2.250'}] gateway_ip: '172.18.2.1' internal_api_leaf3: vlan: 13 ip_subnet: '172.18.3.0/24' allocation_pools: [{'start': '172.18.3.4', 'end': '172.18.3.250'}] gateway_ip: '172.18.3.1'추가할 새 리프에 대한 역할 데이터 파일을 만듭니다.
추가 중인 새 리프에 사용할 리프 컴퓨팅 및 리프 Ceph Storage 파일을 복사합니다.
예제
이 예에서는
Compute1.yaml및CephStorage1.yaml이 새로운 리프,Compute3.yaml및CephStorage3.yaml로 복사되며, 이를 다시 실행합니다.$ cp ~/roles/Compute1.yaml ~/roles/Compute3.yaml $ cp ~/roles/CephStorage1.yaml ~/roles/CephStorage3.yaml새 리프 파일에서
이름,HostnameFormatDefault및deprecated_nic_config_name매개변수를 편집하여 해당 Leaf 매개변수와 일치하도록 합니다.예제
예를 들어 Leaf 1 Compute 파일의 매개변수에는 다음과 같은 값이 있습니다.
- name: ComputeLeaf1 HostnameFormatDefault: '%stackname%-compute-leaf1-%index%' deprecated_nic_config_name: 'computeleaf1.yaml'예제
Leaf 1 Ceph Storage 매개변수의 값은 다음과 같습니다.
- name: CephStorageLeaf1 HostnameFormatDefault: '%stackname%-cephstorage-leaf1-%index%' deprecated_nic_config_name: 'ceph-strorageleaf1.yaml'새 리프 파일에서 네트워크 매개 변수를 편집하여 해당 Leaf 네트워크 매개 변수와 일치하도록 합니다.
예제
예를 들어 Leaf 1 Compute 파일의 매개변수에는 다음과 같은 값이 있습니다.
- name: ComputeLeaf1 networks: InternalApi: subnet: internal_api_leaf1 Tenant: subnet: tenant_leaf1 Storage: subnet: storage_leaf1예제
Leaf 1 Ceph Storage 매개변수의 값은 다음과 같습니다.
- name: CephStorageLeaf1 networks: Storage: subnet: storage_leaf1 StorageMgmt: subnet: storage_mgmt_leaf1역할 구성이 완료되면 다음 명령을 실행하여 전체 역할 데이터 파일을 생성합니다. 네트워크에 있는 모든 리프와 추가하는 새 리프를 포함합니다.
예제
이 예에서는 leaf3이 leaf0, leaf1 및 leaf2에 추가됩니다.
$ openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Compute Compute1 Compute2 Compute3 CephStorage CephStorage1 CephStorage2 CephStorage3이렇게 하면 각 풀 네트워크에 대한 모든 사용자 지정 역할을 포함하는 전체
roles_data_spine_leaf.yaml파일이 생성됩니다.
추가하는 리프에 대한 사용자 정의 NIC 구성을 만듭니다.
추가 중인 새 리프에 사용할 리프 컴퓨팅 및 리프 Ceph Storage NIC 구성 파일을 복사합니다.
예제
이 예에서
computeleaf1.yaml및ceph-storageleaf1.yaml은 새로운 리프,computeleaf3.yaml및ceph-storageleaf3.yaml용으로 복사됩니다.$ cp ~/templates/spine-leaf-nics/computeleaf1.yaml ~/templates/spine-leaf-nics/computeleaf3.yaml $ cp ~/templates/spine-leaf-nics/ceph-storageleaf1.yaml ~/templates/spine-leaf-nics/ceph-storageleaf3.yaml파일의
resource_registry섹션에서/usr/share/openstack-tripleo-heat-templates/network_data_spine_leaf.yaml에서 각 NIC 템플릿에 매핑되는::Net::SoftwareConfig리소스 세트를 추가합니다.예제
이 예에서는 새로운 리프 NIC 구성 파일(
computeleaf3.yaml및ceph-storageleaf3.yaml)이 추가되었습니다.resource_registry: OS::TripleO::Controller::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/controller.yaml OS::TripleO::ComputeLeaf0::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/computeleaf0.yaml OS::TripleO::ComputeLeaf1::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/computeleaf1.yaml OS::TripleO::ComputeLeaf2::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/computeleaf2.yaml OS::TripleO::ComputeLeaf3::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/computeleaf3.yaml OS::TripleO::CephStorageLeaf0::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/ceph-storageleaf0.yaml OS::TripleO::CephStorageLeaf1::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/ceph-storageleaf1.yaml OS::TripleO::CephStorageLeaf2::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/ceph-storageleaf2.yaml OS::TripleO::CephStorageLeaf3::Net::SoftwareConfig: /home/stack/templates/spine-leaf-nics/ceph-storageleaf3.yaml이러한 리소스 매핑은 배포 중에 기본 리소스 매핑을 재정의합니다.
이 절차에서는 이제 필요한
::Net::SoftwareConfig리소스를 매핑하는 NIC 템플릿 세트와 환경 파일을 사용할 수 있게 되었습니다. 결국openstack overcloud deploy명령을 실행할 때 환경 파일을 다음 순서로 포함해야 합니다./usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml을 통해 네트워크를 분리할 수 있습니다.director는
network-isolation.j2.yamlJinja2 템플릿에서 이 파일을 렌더링합니다./usr/share/openstack-tripleo-heat-templates/environments/network-environment.yaml은 기본 NIC 리소스 매핑을 포함한 기본 네트워크 환경 파일입니다.director는 network-environment.j2.yaml Jinja2 템플릿에서 이 파일을 렌더링합니다.
사용자 정의 NIC 리소스 매핑을 포함하고 기본 NIC 리소스 매핑을 재정의하는
/home/stack/templates/spine-leaf-nics.yaml.다음 명령 스니펫에서는 순서를 보여줍니다.
$ openstack overcloud deploy --templates ... -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/network-environment.yaml \ -e /home/stack/templates/spine-leaf-nics.yaml \ ...
컨트롤 플레인 매개변수를 업데이트합니다.
~/templates/spine-leaf-ctlplane.yaml의parameter_defaults섹션의 새 리프 네트워크에 대한 컨트롤 플레인 서브넷 매핑을 추가합니다.예제
이 예에서는 새 리프(
leaf3) 항목이 추가되었습니다.parameter_defaults: ... ControllerControlPlaneSubnet: leaf0 Compute0ControlPlaneSubnet: leaf0 Compute1ControlPlaneSubnet: leaf1 Compute2ControlPlaneSubnet: leaf2 Compute3ControlPlaneSubnet: leaf3 CephStorage0ControlPlaneSubnet: leaf0 CephStorage1ControlPlaneSubnet: leaf1 CephStorage2ControlPlaneSubnet: leaf2 CephStorage3ControlPlaneSubnet: leaf3새 리프 네트워크를 매핑합니다.
~/templates/spine-leaf-separate.yaml의parameter_defaults섹션에 새 리프 네트워크에 대한 외부 네트워크 매핑을 포함합니다.플랫 네트워크 매핑의 경우
NeutronFlatNetworks매개변수에 새리프( leaf3)를 나열하고 새 리프에 대한NeutronBridgeMappings매개변수를 설정합니다.parameter_defaults: NeutronFlatNetworks: leaf0,leaf1,leaf2, leaf3 Controller0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute0Parameters: NeutronBridgeMappings: "leaf0:br-ex" Compute1Parameters: NeutronBridgeMappings: "leaf1:br-ex" Compute2Parameters: NeutronBridgeMappings: "leaf2:br-ex" Compute3Parameters: NeutronBridgeMappings: "leaf3:br-ex"VLAN 네트워크 매핑의 경우 새 리프(
leaf3) 네트워크에 VLAN을 매핑하도록NeutronNetworkVLANRanges를 추가로 설정합니다.NeutronNetworkType: 'geneve,vlan' NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000,leaf3:1:1000'
- 4.7절. “스파인-리프형 활성화된 오버클라우드 배포” 의 단계에 따라 스파인-리프가 활성화된 오버클라우드를 다시 배포합니다.