4.2. 리프 역할 정의 및 네트워크 연결

RHOSP(Red Hat OpenStack Platform) director는 각 리프에 대해 구성 가능한 역할을 생성하고 구성하는 역할 템플릿에서 구성 가능 네트워크를 각 역할에 연결합니다. 먼저 director 코어 템플릿에서 기본 Controller, Compute, Ceph Storage 역할을 복사하고 환경 요구 사항에 맞게 수정합니다. 개별 역할을 모두 생성한 후 openstack overcloud roles generate 명령을 실행하여 하나의 대규모 사용자 지정 역할 데이터 파일에 연결합니다.

사전 요구 사항

  • 언더클라우드 호스트 및 stack 사용자의 자격 증명에 액세스합니다.

절차

  1. 언더클라우드 호스트에 stack 사용자로 로그인합니다.
  2. stackrc 언더클라우드 인증 정보 파일을 소싱합니다.

    $ source ~/stackrc
  3. RHOSP와 함께 제공되는 Controller, Compute, Ceph Storage 역할의 기본 역할을 stack 사용자의 홈 디렉터리에 복사합니다. 리프가 0임을 반영하도록 파일의 이름을 바꿉니다.

    $ cp /usr/share/openstack-tripleo-heat-templates/roles/Controller.yaml ~/roles/Controller0.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
  4. 리프 1 및 리프 2 파일의 기준으로 리프 0 파일을 복사하십시오.

    $ 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
  5. 각 파일의 매개변수를 편집하여 각각의 리프 매개변수에 맞게 조정합니다.

    작은 정보

    roles 데이터 템플릿의 다양한 매개변수에 대한 자세한 내용은 Director Installation and Usage 가이드의 역할 매개변수 확인을 참조하십시오.

    예 - ComputeLeaf0

    - name: ComputeLeaf0
      HostnameFormatDefault: '%stackname%-compute-leaf0-%index%'

    예 - CephStorageLeaf0

    - name: CephStorageLeaf0
      HostnameFormatDefault: '%stackname%-cephstorage-leaf0-%index%'

  6. 리프 1 및 리프 2 파일에서 network 매개변수를 편집하여 해당 리프 네트워크 매개변수와 일치하도록 합니다.

    예 - ComputeLeaf1

    - name: ComputeLeaf1
      networks:
        InternalApi:
          subnet: internal_api_leaf1
        Tenant:
          subnet: tenant_leaf1
        Storage:
          subnet: storage_leaf1

    예 - CephStorageLeaf1

    - name: CephStorageLeaf1
      networks:
        Storage:
          subnet: storage_leaf1
        StorageMgmt:
          subnet: storage_mgmt_leaf1

    참고

    이는 리프 1과 리프 2에만 적용됩니다. 리프 0의 네트워크 매개변수는 각 서브넷의 소문자 이름인 _subnet 접미사와 결합된 기본 서브넷 값을 유지합니다. 예를 들어 리프 0의 내부 API는 internal_api_subnet 입니다.

  7. 역할 설정이 완료되면 오버클라우드 역할 generate 명령을 실행하여 전체 역할 데이터 파일을 생성합니다.

    예제

    $ openstack overcloud roles generate --roles-path ~/roles -o spine-leaf-roles-data.yaml Controller Compute Compute1 Compute2 CephStorage CephStorage1 CephStorage2

    이렇게 하면 각 리프 네트워크에 대한 모든 사용자 지정 역할을 포함하는 하나의 사용자 지정 역할 데이터 파일이 생성됩니다.

다음 단계

  1. 오버클라우드 역할 generate 명령에 출력이 있는 사용자 정의 역할 데이터 파일의 경로 및 파일 이름을 기록해 둡니다. 나중에 오버클라우드를 배포할 때 이 정보가 필요합니다.
  2. 다음 단계로 진행하여 리프 역할에 대한 사용자 정의 NIC 구성 생성.

추가 리소스