4.11. スパイン/リーフ型デプロイメントへの新たなリーフの追加

ネットワーク容量を増やしたり、新しい物理サイトを追加したりする場合は、Red Hat OpenStack Platform (RHOSP) スパイン/リーフネットワークに新しいリーフを追加する必要があることもあります。

前提条件

  • RHOSP デプロイメントでスパイン/リーフ型ネットワークトポロジーが使用されている。

手順

  1. アンダークラウドホストに stack ユーザーとしてログインします。
  2. source コマンドで stackrc アンダークラウド認証情報ファイルを読み込みます。

    $ source ~/stackrc
  3. /home/stack/templates/spine-leaf-networks-data.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'
  4. 追加する新しいリーフ用のロールデータファイルを作成します。

    1. 追加する新しいリーフ用にリーフ Compute およびリーフ Ceph Storage ファイルをコピーします。

      この例では、Compute1.yaml および CephStorage1.yaml が新しいリーフ (Compute3.yaml および CephStorage3.yaml) にコピーされ、再度実行されます。

      $ cp ~/roles/Compute1.yaml ~/roles/Compute3.yaml
      $ cp ~/roles/CephStorage1.yaml ~/roles/CephStorage3.yaml
    2. 新しいリーフファイルのパラメーター nameHostnameFormatDefault を編集して、それぞれのリーフパラメーターと一致するようにします。

      たとえば、Leaf 1 Compute ファイルのパラメーター値は、以下のように設定します。

      - name: ComputeLeaf1
        HostnameFormatDefault: '%stackname%-compute-leaf1-%index%'

      Leaf 1 Ceph Storage ファイルのパラメーター値は、以下のように設定します。

      - name: CephStorageLeaf1
        HostnameFormatDefault: '%stackname%-cephstorage-leaf1-%index%'
    3. それぞれのリーフネットワークのパラメーターと整合するように、新しい Leaf ファイルの networks パラメーターを編集します。

      たとえば、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
    4. ロールの設定が完了したら、以下のコマンドを実行して完全なロールデータファイルを生成します。ネットワークにすべてのリーフと、新たに追加するリーフを含めます。

      以下の例では、leaf3 が leaf0、leaf1、および leaf2 に追加されます。

      $ openstack overcloud roles generate --roles-path ~/roles -o roles_data_spine_leaf.yaml Controller Controller1 Controller2 Compute Compute1 Compute2 Compute3 CephStorage CephStorage1 CephStorage2 CephStorage3

      これにより、各リーフネットワーク用の全カスタムロールが含まれた完全な roles_data_spine_leaf.yaml ファイルが作成されます。

  5. 追加するリーフ用のカスタム NIC 設定を作成します。

    1. 追加する新しいリーフ用のリーフ Compute およびリーフ 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
  6. ロールと各ロールのカスタム NIC テンプレートマッピングを含むカスタム環境ファイル (例: spine-leaf-nic-roles-map.yaml) を開きます。追加する新しいリーフのロールごとにエントリーを挿入します。

    parameter_defaults:
      %%ROLE%%NetworkConfigTemplate: <path_to_ansible_jinja2_nic_config_file>

    この例では、エントリー ComputeLeaf3NetworkConfigTemplate および CephStorage3NetworkConfigTemplate が追加されています。

    parameter_defaults:
      Controller0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      Controller1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      Controller2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      ComputeLeaf0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      ComputeLeaf1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      ComputeLeaf2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      ComputeLeaf3NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      CephStorage0NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      CephStorage1NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      CephStorage2NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
      CephStorage3NetworkConfigTemplate: '/home/stack/templates/spine-leaf-nics/single-nic-vlans.j2'
  7. 個別のネットワークマッピングを含み、オーバークラウドのコントロールプレーンネットワークへのアクセスを設定するカスタムネットワーク環境ファイル (spine-leaf-ctlplane.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 ネットワークのマッピングの場合には、さらに NeutronNetworkVLANRanges を設定して、新しいリーフネットワーク用 (leaf3) に VLAN をマッピングします。

        NeutronNetworkType: 'geneve,vlan'
        NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000,leaf3:1:1000'

      この例では、フラットネットワークマッピングが使用され、新しいリーフ (leaf3) エントリーが追加されます。

      parameter_defaults:
        NeutronFlatNetworks: leaf0,leaf1,leaf2,leaf3
        Controller0Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
        ControllerControlPlaneSubnet: leaf0
        Controller1Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
        Controller1ControlPlaneSubnet: leaf0
        Controller2Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
        Controller2ControlPlaneSubnet: leaf0
        Compute0Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
        Compute0ControlPlaneSubnet: leaf0
        Compute1Parameters:
          NeutronBridgeMappings: "leaf1:br-ex"
        Compute1ControlPlaneSubnet: leaf1
        Compute2Parameters:
          NeutronBridgeMappings: "leaf2:br-ex"
        Compute2ControlPlaneSubnet: leaf2
        Compute3Parameters:
          NeutronBridgeMappings: "leaf3:br-ex"
        Compute3ControlPlaneSubnet: leaf3
  8. スパイン/リーフ対応オーバークラウドのデプロイの手順に従って、スパインリーフ対応オーバークラウド を再デプロイします。