4.4. 映射单独的网络和设置 control plane 参数

在 spine leaf 架构中,每个叶都通过该叶上的特定网桥或 VLAN 路由流量,这通常是边缘计算场景的情况。因此,您必须更改 Red Hat OpenStack Platform (RHOSP) Controller 和 Compute 网络配置使用 br-ex 网桥的默认映射。

RHOSP director 在创建 undercloud 期间创建 control plane 网络。但是,overcloud 需要访问每个 leaf 的 control plane。要启用此访问权限,必须在部署中定义其他参数。

完成以下步骤以创建一个包含独立网络映射的自定义网络环境文件,并为 overcloud 设置 control plane 网络的访问权限。

先决条件

  • 访问 stack 用户的 undercloud 主机和凭据。

流程

  1. stack 用户身份登录 undercloud 主机。
  2. 查找 stackrc undercloud 凭据文件:

    $ source ~/stackrc
  3. 在新的自定义环境文件中,如 spine-leaf-ctlplane.yaml,创建一个 parameter_defaults 部分,并为使用默认 br-ex 网桥的每个叶设置 NeutronBridgeMappings 参数。

    重要

    您创建的自定义环境文件的名称必须以 .yaml.template 结尾。

    • 对于扁平网络映射,列出 NeutronFlatNetworks 参数中的每个叶,并为各个叶设置 NeutronBridgeMappings 参数:

      示例

      parameter_defaults:
        NeutronFlatNetworks: leaf0,leaf1,leaf2
        Controller0Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
      
        Controller1Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
      
        Controller2Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
      
        Compute0Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
      
        Compute1Parameters:
          NeutronBridgeMappings: "leaf1:br-ex"
      
        Compute2Parameters:
          NeutronBridgeMappings: "leaf2:br-ex"

      提示

      如需更多信息,请参阅 Chapter 17。networking (neutron)参数 ( Overcloud 参数 指南)

    • 对于 VLAN 网络映射,将 vlan 添加到 NeutronNetworkType,并使用 NeutronNetworkVLANRanges,为叶网络映射 VLAN:

      示例

      parameter_defaults:
        NeutronNetworkType: 'geneve,vlan'
        NeutronNetworkVLANRanges: 'leaf0:1:1000,leaf1:1:1000,leaf2:1:1000'
      
        Controller0Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
      
        Controller1Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
      
        Controller2Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
      
        Compute0Parameters:
          NeutronBridgeMappings: "leaf0:br-ex"
      
        Compute1Parameters:
          NeutronBridgeMappings: "leaf1:br-ex"
      
        Compute2Parameters:
          NeutronBridgeMappings: "leaf2:br-ex"

      注意

      您可以在 spine-leaf 拓扑中使用扁平网络和 VLAN。

  4. 使用 < role>ControlPlaneSubnet 参数为每个 spine-leaf 网络添加 control plane 子网映射:

    示例

    parameter_defaults:
      NeutronFlatNetworks: leaf0,leaf1,leaf2
      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
      CephStorage0Parameters:
        CephStorage0ControlPlaneSubnet: leaf0
      Compute1Parameters:
        NeutronBridgeMappings: "leaf1:br-ex"
        Compute1ControlPlaneSubnet: leaf1
      CephStorage1Parameters:
        CephStorage1ControlPlaneSubnet: leaf1
      Compute2Parameters:
        NeutronBridgeMappings: "leaf2:br-ex"
        Compute2ControlPlaneSubnet: leaf2
      CephStorage2Parameters:
        CephStorage2ControlPlaneSubnet: leaf2

后续步骤

  1. 记录您创建的自定义网络环境文件的路径和文件名。部署 overcloud 时,您将需要此信息。
  2. 继续下一步 为虚拟 IP 地址设置子网

其他资源