RDG:基于NVIDIA网络硬件卸载的OpenStack SMPTE 2110媒体流云

创建于2019年9月12日。越来越多的媒体和娱乐(M&E)解决方案提供商正在将其专有的传统视频解决方案迁移到下一代基于IP的基础设施,以满足全球对超高清视频内容日益增长的需求。广播提供商正在寻求基于云的解决方案,以提供更好的可扩展性和灵活性,但这带来了新的挑战,例如大规模多租户高质量流媒体和云中的时间同步。

文档目录

title.png

创建于2019年9月12日

简介

越来越多的媒体和娱乐(M&E)解决方案提供商正在将其专有的传统视频解决方案迁移到下一代基于IP的基础设施,以满足全球对超高清视频内容日益增长的需求。广播提供商正在寻求基于云的解决方案,以提供更好的可扩展性和灵活性,但这带来了新的挑战,例如大规模多租户高质量流媒体和云中的时间同步。

Red Hat OpenStack Platform (OSP) 是一个云计算平台,支持创建、部署、扩展和管理安全可靠的基于OpenStack的公有云或私有云。该生产就绪平台与NVIDIA产品和技术紧密集成,在本指南中用于演示“NVIDIA Media Cloud”的完整部署。

NVIDIA Media Cloud 是一个解决方案,包含NVIDIA Rivermax库(用于数据包调速、内核旁路和数据包聚合),以及云时间同步和通过加速交换和数据包处理(ASAP²)框架将OVS硬件卸载到NVIDIA智能网卡。

通过本指南,您将能够在不同机架的虚拟机之间运行卸载的高清媒体流,并验证其是否符合SMPTE 2110标准,同时使用商用交换机、服务器和网卡。

以下参考部署指南(RDG)演示了用于媒体流应用的RedHat Openstack Platform 13的完整部署,并具备NVIDIA智能网卡硬件卸载能力。

我们将解释设置组件、规模考虑因素以及其他方面,例如硬件BoM(物料清单)和时间同步,以及云中的流应用合规性测试。

在开始之前,强烈建议熟悉本部署指南的关键技术特性:

  • Rivermax 视频流库
  • ASAP² - 加速交换和数据包处理

请访问以下链接中的产品页面,了解有关这些特性及其功能的更多信息:

NVIDIA Rivermax Video Streaming Library

NVIDIA Accelerated Switching and Packet Processing

可下载内容

所有配置文件位于:

参考资料

NVIDIA组件

  • NVIDIA Rivermax:实现针对媒体流应用的优化软件库API。它运行在NVIDIA ConnectX®-5或更高版本的网卡上,支持使用商用现货(COTS)服务器处理高清到超高清流。Rivermax和ConnectX®-5网卡组合符合SMPTE 2110-21标准,可降低视频数据流的CPU利用率,并消除最高吞吐量的瓶颈。

  • NVIDIA加速交换和数据包处理(ASAP²):一种框架,支持将网络数据平面卸载到智能网卡硬件,例如Open vSwitch(OVS)卸载,可实现高达10倍的性能提升并完全降低CPU负载。ASAP²在ConnectX-4 Lx及更高版本上可用。

  • NVIDIA Spectrum交换机系列:为数据中心应用日益增长的性能需求提供最高效的网络解决方案。

  • NVIDIA ConnectX网卡系列:为性能驱动的服务器和存储应用提供业界领先的连接性。ConnectX网卡支持高带宽和超低延迟,适用于各种应用和系统,实现更快的访问和实时响应。

  • NVIDIA LinkX线缆和收发器系列:为云、Web 2.0、企业、电信和存储数据中心应用提供业界最完整的10、25、40、50、100、200和400Gb互连产品。它们通常用于将机架顶交换机向下连接到服务器、存储和设备,以及向上连接到交换机间应用。

解决方案设置概述

以下是本解决方案中所有不同组件及其使用方式的列表:

云平台

RH-OSP13将大规模部署并用作云平台。

计算节点

计算节点将配置并部署为“媒体计算节点”,针对低延迟虚拟媒体应用进行调整。每个计算/控制器节点配备一个双端口100GB网卡,其中一个端口专用于VXLAN租户网络,另一个端口用于VLAN组播租户网络、存储、控制和PTP时间同步。

在网卡端口上启用数据包调速,专门用于在VLAN租户网络上实现MC(组播)调速。

网络

本用户指南中使用的不同网络组件配置如下:

  • 多个机架通过Spine/Leaf网络架构互连
  • 每个机架使用可组合的路由提供商网络
  • 不同提供商网络段上的计算节点将为每个OpenStack子网段托管本地DHCP代理实例。
  • L3 OSPF底层用于在提供商路由网络之间路由(可根据需要使用其他全结构IGP)
  • 组播
    • VLAN租户网络用于组播媒体流量,并将利用虚拟机的SR-IOV
    • IP-PIM(稀疏模式)用于在位于路由提供商网络中的机架之间路由租户组播流
    • IGMP侦听用于管理同一L2机架域中的租户组播组
  • 单播
    • 启用ASAP²的计算节点位于不同机架,并维护VXLAN隧道作为租户虚拟机流量的覆盖层
    • VXLAN租户网络用于单播媒体流量,并将利用ASAP²卸载CPU密集型的VXLAN流量,以避免封装/解封装性能损失并实现最佳吞吐量
  • OpenStack Neutron用作SDN控制器。每个OpenStack节点的所有网络配置将通过OpenStack编排完成
  • 除虚拟机客户机外,所有基础设施组件均使用RHOSP内置驱动程序
时间同步

时间

同步将按以下方式配置:

  • 计算节点和应用VM上使用linuxptp工具
  • 计算节点上的PTP流量为无标记
  • Onyx交换机在计算节点之间传播时间,并充当PTP边界时钟设备
  • 其中一个交换机用作PTP主时钟(在实际部署中应使用专用主时钟)
  • KVM虚拟PTP驱动程序由VM使用,从其宿主机拉取PTP时间,宿主机与PTP时钟源同步

媒体应用

NVIDIA提供Rivermax VM云镜像,其中包含所有Rivermax工具和应用程序。Rivermax VM提供了媒体测试应用程序的演示,并允许用户验证是否符合相关媒体标准,即SMPTE 2110(需要评估许可证)。

解决方案组件

image2019-9-11_11-33-44.png

解决方案总体设计

image2019-9-11_11-30-34.png

解决方案组播设计

image2019-9-11_11-31-4.png

云媒体应用设计

image2019-9-11_11-31-32.png

VXLAN硬件卸载概述

image2019-9-11_11-31-55.png

大规模概述

image2019-9-12_11-53-14.png

硬件配置

物料清单(BoM)

image2019-9-12_11-41-0.png

注意:

  • 上述BoM指的是大规模解决方案中的最大配置,阻塞比为3:1
  • 可以更改阻塞比以获得不同容量
  • SN2100和SN2700交换机共享相同的功能集,可根据计算和/或网络容量要求在此解决方案中使用
  • 以下解决方案示例中将使用2机架BoM

解决方案示例

我们选择以下关键功能作为演示此RDG中解决方案的基线。

注意: 以下解决方案示例不包含冗余配置

解决方案规模

  • 2个机架,每个机架有专用的提供商网络
  • 1台SN2700交换机作为Spine交换机
  • 2台SN2100交换机作为Leaf交换机,每个机架1台
  • 机架1中有5个节点(3个控制器,2个计算节点)
  • 机架2中有2个节点(2个计算节点)
  • 所有节点通过每个节点2个100GB端口连接到Leaf交换机
  • Leaf交换机通过单个100GB端口连接到每个Spine交换机

物理机架图

在此RDG中,我们将所有设备放置在同一机架中,但布线和配置模拟了两机架网络设置。

physical_diagram.png

PTP图

ptp_diagram.png

注意: 其中一个Onyx Leaf交换机用作PTP时钟源主时钟,而非专用设备。

解决方案网络

网络图

network_diagram.png

注意: 计算节点通过充当路由器的undercloud节点访问外部网络/互联网。

网络物理配置

重要! 以下配置步骤基于2机架的解决方案示例。

以下是网络配置的详细逐步说明:

  1. 将交换机连接到交换机管理网络
  2. 使用100GB/s线缆互连交换机 image2019-9-11_11-33-44.png

switch_physical.png

  • 根据以下图表将控制器/计算服务器连接到相关网络:

    servers_physical.png

    servers_table.png

  • Undercloud Director服务器连接到IPMI、PXE和外部网络。

交换机配置文件配置

必须在所有交换机上设置MC Max Profile。这将删除现有配置并需要重新启动。

注意: 您应备份交换机配置,以备日后使用。

在所有交换机上运行命令:

system profile eth-ipv4-mc-max
show system profile

交换机接口配置

根据下表在Leaf交换机上设置VLAN和VLAN接口:

网络名称 网络集 Leaf交换机位置 网络详情 交换机接口IP VLAN ID 交换机物理端口 交换机端口模式 备注
Storage 1 Rack 1 172.16.0.0/24 172.16.0.1 11 A hybrid
Storage_Mgmt 1 Rack 1 172.17.0.0/24 172.17.0.1 21 A hybrid
Internal API 1 Rack 1 172.18.0.0/24 172.18.0.1 31 A hybrid
PTP 1 Rack 1 172.20.0.0/24 172.20.0.1 51 A hybrid access vlan
MC_Tenant_VLAN 1 Rack 1 11.11.11.0/24 11.11.11.1 101 A hybrid
Tenant_VXLAN 1 Rack 1 172.19.0.0/24 172.19.0.1 41 B access
Storage_2 2 Rack 2 172.16.2.0/24 172.16.2.1 12 A hybrid
Storage_Mgmt_2 2 Rack 2 172.17.2.0/24 172.17.2.1 22 A hybrid
Internal API_2 2 Rack 2 172.18.2.0/24 172.18.2.1 32 A hybrid
PTP_2 2 Rack 2 172.20.2.0/24 172.20.2.1 52 A hybrid access vlan
MC_Tenant_VLAN 2 Rack 2 22.22.22.0/24 22.22.22.1 101 A hybrid
Tenant_VXLAN_2 2 Rack 2 172.19.2.0/24 172.19.2.1 42 B access
Rack 1 Leaf交换机VLAN图 Rack 2 Leaf交换机VLAN图
Rack 1 Leaf switch VLAN Diagram Rack 2 Leaf switch VLAN Diagram

vlan_r1.png

vlan_r2.png

 

交换机完整配置

注意

  • 需要Onyx 3.8.1204及以上版本
  • 交换机SW-09用作Spine交换机
  • SW-10和SW-11用作Leaf交换机
  • Leaf交换机SW-11配置为PTP主时钟角色
  • 所有Leaf交换机的1/9端口应连接Spine交换机,其余端口连接计算/控制器节点
  • 如果计算节点上使用多个虚拟接收器,应移除igmp immediate/fast-leave交换机配置

Spine (SW-09) 配置:

##
## STP configuration
##
no spanning-tree

##
## L3 configuration
##
ip routing
interface ethernet 1/1-1/2 no switchport force
interface ethernet 1/1 ip address 192.168.119.9/24 primary
interface ethernet 1/2 ip address 192.168.109.9/24 primary
interface loopback 0 ip address 1.1.1.9/32 primary

##
## LLDP configuration
##
   lldp

##
## OSPF configuration
##
protocol ospf
router ospf router-id 1.1.1.9
   interface ethernet 1/1 ip ospf area 0.0.0.0
   interface ethernet 1/2 ip ospf area 0.0.0.0
   interface ethernet 1/1 ip ospf network broadcast
   interface ethernet 1/2 ip ospf network broadcast
   router ospf redistribute direct

##
## IP Multicast router configuration
##
   ip multicast-routing

##
## PIM configuration
##
   protocol pim
   interface ethernet 1/1 ip pim sparse-mode
   interface ethernet 1/2 ip pim sparse-mode
   ip pim multipath next-hop s-g-hash
   ip pim rp-address 1.1.1.9

##
## IGMP configuration
##
   interface ethernet 1/1 ip igmp immediate-leave
   interface ethernet 1/2 ip igmp immediate-leave

##
## Network management configuration
##
   ntp disable

##
## PTP protocol
##
   protocol ptp
   ptp vrf default enable
   interface ethernet 1/1 ptp enable
   interface ethernet 1/2 ptp enable

Leaf Rack 1 (SW-11) 配置:

##
## STP configuration
##
no spanning-tree

##
## LLDP configuration
##
   lldp

##
## VLAN configuration
##

vlan 11
name storage
exit
vlan 21
name storage_mgmt
exit
vlan 31
name internal_api
exit
vlan 41
name tenant_vxlan
exit
vlan 51
name ptp
exit
vlan 101
name tenant_vlan_mc
exit

interface ethernet 1/1-1/5 switchport access vlan 41
interface ethernet 1/11-1/15 switchport mode hybrid
interface ethernet 1/11-1/15 switchport access vlan 51
interface ethernet 1/11-1/15 switchport hybrid allowed-vlan add 11
interface ethernet 1/11-1/15 switchport hybrid allowed-vlan add 21
interface ethernet 1/11-1/15 switchport hybrid allowed-vlan add 31
interface ethernet 1/11-1/15 switchport hybrid allowed-vlan add 101

##
## IGMP Snooping configuration
##
   ip igmp snooping unregistered multicast forward-to-mrouter-ports
   ip igmp snooping
   vlan 51 ip igmp snooping
  vlan 101 ip igmp snooping
   vlan 51 ip igmp snooping querier
   vlan 101 ip igmp snooping querier
   interface ethernet 1/11-1/15 ip igmp snooping fast-leave

##
## L3 configuration
##
ip routing
interface ethernet 1/9 no switchport force
interface ethernet 1/9 ip address 192.168.119.11/24 primary

interface vlan 11 ip address 172.16.0.1 255.255.255.0
interface vlan 21 ip address 172.17.0.1 255.255.255.0
interface vlan 31 ip address 172.18.0.1 255.255.255.0
interface vlan 41 ip address 172.19.0.1 255.255.255.0
interface vlan 51 ip address 172.20.0.1 255.255.255.0
interface vlan 101 ip address 11.11.11.1 255.255.255.0

##
## OSPF configuration
##
protocol ospf
router ospf router-id 1.1.1.11
interface ethernet 1/9 ip ospf area 0.0.0.0
interface ethernet 1/9 ip ospf network broadcast
router ospf redistribute direct

##
## IP Multicast router configuration
##
   ip multicast-routing

##
## PIM configuration
##
   protocol pim
   interface ethernet 1/9 ip pim sparse-mode
   ip pim multipath next-hop s-g-hash
   interface vlan 101 ip pim sparse-mode
   ip pim rp-address 1.1.1.9

##
## IGMP configuration
##
   interface ethernet 1/9 ip igmp immediate-leave
   interface vlan 101 ip igmp immediate-leave

##
## Network management configuration
##
   ntp disable

##
## PTP protocol
##
   protocol ptp
   ptp vrf default enable
   ptp priority1 1
   interface ethernet 1/9 ptp enable
   interface ethernet 1/11-1/15 ptp enable
   interface vlan 51 ptp enable

SW-10 (Leaf Rack 2)
SW-10 Leaf Rack 2

##
## STP configuration
##
no spanning-tree

##
## LLDP configuration
##
   lldp

##
## VLAN configuration
##

vlan 12
name storage
exit
vlan 22
name storage_mgmt
exit
vlan 32
name internal_api
exit
vlan 42
name tenant_vxlan
exit
vlan 52
name ptp
exit
vlan 101
name tenant_vlan_mc
exit

interface ethernet 1/1-1/2 switchport access vlan 42
interface ethernet 1/11-1/12 switchport mode hybrid
interface ethernet 1/11-1/12 switchport access vlan 52
interface ethernet 1/11-1/12 switchport hybrid allowed-vlan add 12
interface ethernet 1/11-1/12 switchport hybrid allowed-vlan add 22
interface ethernet 1/11-1/12 switchport hybrid allowed-vlan add 32
interface ethernet 1/11-1/12 switchport hybrid allowed-vlan add 101

##
## IGMP Snooping configuration
##
   ip igmp snooping unregistered multicast forward-to-mrouter-ports
   ip igmp snooping
   vlan 52 ip igmp snooping
   vlan 52 ip igmp snooping querier
   vlan 101 ip igmp snooping
   vlan 101 ip igmp snooping querier
   interface ethernet 1/11-1/12 ip igmp snooping fast-leave

##
## L3 configuration
##
ip routing
interface ethernet 1/9 no switchport force
interface ethernet 1/9 ip address 192.168.109.10/24 primary

interface vlan 12 ip address 172.16.2.1 255.255.255.0
interface vlan 22 ip address 172.17.2.1 255.255.255.0
interface vlan 32 ip address 172.18.2.1 255.255.255.0
interface vlan 42 ip address 172.19.2.1 255.255.255.0
interface vlan 52 ip address 172.20.2.1 255.255.255.0
interface vlan 101 ip address 22.22.22.1 255.255.255.0

##
## OSPF configuration
##
protocol ospf
router ospf router-id 2.2.2.10
interface ethernet 1/9 ip ospf area 0.0.0.0
interface ethernet 1/9 ip ospf network broadcast
router ospf redistribute direct

##
## IP Multicast router configuration
##
   ip multicast-routing

##
## PIM configuration
##
   protocol pim
   interface ethernet 1/9 ip pim sparse-mode
   ip pim multipath next-hop s-g-hash
   interface vlan 101 ip pim sparse-mode
   ip pim rp-address 1.1.1.9

##
## IGMP configuration
##
   interface ethernet 1/9 ip igmp immediate-leave
   interface vlan 101 ip igmp immediate-leave

##
## Network management configuration
##
   ntp disable

##
## PTP protocol
##
   protocol ptp
   ptp vrf default enable
   interface ethernet 1/9 ptp enable
   interface ethernet 1/11-1/12 ptp enable
   interface vlan 52 ptp enable

解决方案配置与部署

以下信息将引导您完成解决方案的配置和部署步骤。

前提条件

确保具有相同角色(计算/控制器等)的服务器的硬件规格一致。

服务器准备 - BIOS

确保所有服务器

  1. 网络引导设置为连接到PXE网络的接口。
  2. 虚拟化和SRIOV已启用。

确保计算服务器

  1. 网络引导设置为连接到PXE网络的接口。
  2. 虚拟化和SRIOV已启用。
  3. 电源配置文件设置为“最大性能”。
  4. 超线程已禁用。
  5. C-state已禁用。
  6. 睿频模式已禁用。
  7. 协作电源控制已禁用。
  8. 处理器电源和利用率监控(crtl+A)已禁用。

网卡准备

ConnectX-5网卡上默认禁用SRIOV配置,必须为计算节点使用的每个网卡启用。

要启用和配置SRIOV,请将计算网卡插入已安装操作系统的测试服务器,并按照以下步骤操作:

  1. 运行以下命令验证固件版本为16.21.2030或更高:

    [root@host ~]# ethtool -i ens2f0
    driver: mlx5_core
    version: 5.0-0
    firmware-version: 16.22.1002 (MT_0000000009)
    expansion-rom-version:
    bus-info: 0000:07:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: no
    supports-register-dump: no
    supports-priv-flags: yes
    
  2. 安装mstflint包:

    [root@host ~]# yum install mstflint
    
  3. 识别第一个100G端口的PCI ID并启用SRIOV:

    [root@host ~]# lspci | grep -i mel
    07:00.0 Ethernet controller: Mellanox Technologies MT28800 Family [ConnectX-5 Ex]
    07:00.1 Ethernet controller: Mellanox
    

技术

MT28800系列 [ConnectX-5 Ex]

[root@host ~]#
[root@host ~]# mstconfig -d 0000:07:00.0 query | grep -i sriov
SRIOV_EN False(0)
SRIOV_IB_ROUTING_MODE_P1 GID(0)
SRIOV_IB_ROUTING_MODE_P2 GID(0)
[root@host ~]# mstconfig -d 0000:07:00.0 set SRIOV_EN=1
Device #1:
----------

Device type: ConnectX5
PCI device: 0000:07:00.0

Configurations: Next Boot New
SRIOV_EN False(0) True(1)

Apply new Configuration? ? (y/n) [n] : y
Applying... Done!
-I- Please reboot machine to load new configurations.
  1. 将VF数量设置为一个较大的值,例如64,然后重启服务器以应用新配置:

    [root@host ~]# mstconfig -d 0000:07:00.0 query | grep -i vfs
    NUM_OF_VFS 0
    [root@host ~]# mstconfig -d 0000:07:00.0 set NUM_OF_VFS=64
    
    Device #1:
    ----------
    
    Device type: ConnectX5
    PCI device: 0000:07:00.0
    
    Configurations: Next Boot New
    NUM_OF_VFS 0 64
    
    Apply new Configuration? ? (y/n) [n] : y
    Applying... Done!
    -I- Please reboot machine to load new configurations.
    [root@host ~]# reboot
    
  2. 使用上述的 mstconfig 查询命令确认新设置已应用。

  3. 将网卡插回计算节点。

  4. 对设置中使用的每个计算节点网卡重复上述步骤。

注意

  • 在我们的解决方案中,每个网卡的两个100G端口中的第一个端口用于ASAP²加速数据平面。这就是我们仅在第一个ConnectX网卡PCI设备(上例中的07:00.0)上启用SR-IOV的原因。
  • 未来计划支持从Undercloud自动更新和配置计算节点上网卡的自动化流程。

加速的RH-OSP安装与部署

以下步骤将引导您完成加速的RH-OSP安装与部署流程:

  1. 在Undercloud服务器上安装Red Hat 7.6操作系统,并为其连接到外部网络的接口设置IP地址;确保其具有互联网连接。

  2. 按照Red Hat OSP Director安装与使用 - Red Hat客户门户第4节说明安装Undercloud和director。我们的 undercloud.conf 文件作为参考附在此处:配置文件

  3. 按照上述指南的第5节说明配置容器镜像源。我们的解决方案使用undercloud作为本地注册表。

    注意 我们的部署中使用了以下overcloud镜像版本:

    • rhosp-director-images-13.0-20190418.1.el7ost.noarch
    • rhosp-director-images-ipa-13.0-20190418.1.el7ost.noarch
    • rhosp-director-images-ipa-x86_64-13.0-20190418.1.el7ost.noarch
    • rhosp-director-images-x86_64-13.0-20190418.1.el7ost.noarch overcloud镜像是RH 7.6,内核版本3.10.0-957.10.1.el7.x86_64
  4. 按照第6.1节的说明注册overcloud的节点。我们的 instackenv.json 文件作为参考附在此处。

  5. 按照第6.2节的说明检查节点的硬件。 检查完成后,建议确认每个节点所需的根磁盘已被检测到,因为后续云部署可能因磁盘空间不足而失败。使用以下命令检查所选根磁盘的可用空间:

    (undercloud) [stack@rhosp-director ~]$ openstack baremetal node show 92c4c1cb-ce7d-48d4-a2d9-75b2651db097 | grep properties | properties | {u'memory_mb': u'131072', u'cpu_arch': u'x86_64', u'local_gb': u'418', u'cpus': u'24', u'capabilities': u'boot_option:local'}
    

    “local_gb”值表示磁盘大小。如果磁盘大小较小且不符合预期,请使用第6.6节中描述的过程为节点定义根磁盘。请注意,更改根磁盘后,需要对该节点进行额外的检查周期。

  6. 在继续下一步之前,验证所有节点是否已正确注册并将其状态更改为“available”:

    +--------------------------------------+--------------+---------------+-------------+--------------------+-------------+
    | UUID                                 | Name         | Instance UUID | Power State | Provisioning State | Maintenance |
    +--------------------------------------+--------------+---------------+-------------+--------------------+-------------+
    | d1fca940-e341-491b-8afd-0cf6d748aa29 | controller-1 | None          | power off   | available          | False       |
    | 6b24d02c-3fd2-4e55-a730-c45008f01723 | controller-2 | None          | power off   | available          | False       |
    | 098c3e2d-1c70-41d2-983b-6c266387de0b | controller-3 | None          | power off   | available          | False       |
    | 91492c2a-b26c-49ef-9d4e-e492a1578076 | compute-1    | None          | power off   | available          | False       |
    | cdf9e0ec-e3cb-4005-86f6-d40e684a9b19 | compute-2    | None          | power off   | available          | False       |
    | 92c4c1cb-ce7d-48d4-a2d9-75b2651db097 | compute-3    | None          | power off   | available          | False       |
    | bb5e829a-834b-4eb1-b733-0012ce9d5f00 | compute-4    | None          | power off   | available          | False       |
    +--------------------------------------+--------------+---------------+-------------+--------------------+-------------+
    

下一步是将节点标记到配置文件中。

  1. 将控制器节点标记为“control”默认配置文件:

    (undercloud) [stack@rhosp-director ~]$ openstack baremetal node set --property capabilities='profile:control,boot_option:local' controller-1
    (undercloud) [stack@rhosp-director ~]$ openstack baremetal node set --property capabilities='profile:control,boot_option:local' controller-2
    (undercloud) [stack@rhosp-director ~]$ openstack baremetal node set --property capabilities='profile:control,boot_option:local' controller-3
    
  2. 创建两个新的计算flavor——每个机架一个(compute-r1, compute-r2)——并将flavor附加到具有相关名称的配置文件:

    (undercloud) [stack@rhosp-director ~]$ openstack flavor create --id auto --ram 4096 --disk 40 --vcpus 1 compute-r1
    (undercloud) [stack@rhosp-director ~]$ openstack flavor set --property "capabilities:boot_option"="local" --property "capabilities:profile"="compute-r1" --property "resources:CUSTOM_BAREMETAL"="1" --property "resources:DISK_GB"="0" --property "resources:MEMORY_MB"="0" --property "resources:VCPU"="0" compute-r1
    
    (undercloud) [stack@rhosp-director ~]$ openstack flavor create --id auto --ram 4096 --disk 40 --vcpus 1 compute-r2
    (undercloud) [stack@rhosp-director ~]$ openstack flavor set --property "capabilities:boot_option"="local" --property "capabilities:profile"="compute-r2" --property "resources:CUSTOM_BAREMETAL"="1" --property "resources:DISK_GB"="0" --property "resources:MEMORY_MB"="0" --property "resources:VCPU"="0" compute-r2
    
  3. 将计算节点1、3标记为“compute-r1”配置文件以关联到机架1,将计算节点2、4标记为“compute-r2”配置文件以关联到机架2:

    (undercloud) [stack@rhosp-director ~]$ openstack baremetal node set --property capabilities='profile:compute-r1,boot_option:local' compute-1
    (undercloud) [stack@rhosp-director ~]$ openstack baremetal node set --property capabilities='profile:compute-r1,boot_option:local' compute-3
    (undercloud) [stack@rhosp-director ~]$ openstack baremetal node set --property capabilities='profile:compute-r2,boot_option:local' compute-2
    (undercloud) [stack@rhosp-director ~]$ openstack baremetal node set --property capabilities='profile:compute-r2,boot_option:local' compute-4
    
  4. 使用以下命令验证每个节点的配置文件标记:

    (undercloud) [stack@rhosp-director ~]$ openstack overcloud profiles list
    +--------------------------------------+--------------+-----------------+-----------------+-------------------+
    | Node UUID                            | Node Name    | Provision State | Current Profile | Possible Profiles |
    +--------------------------------------+--------------+-----------------+-----------------+-------------------+
    | d1fca940-e341-491b-8afd-0cf6d748aa29 | controller-1 | available       | control | |
    | 6b24d02c-3fd2-4e55-a730-c45008f01723 | controller-2 | available       | control | |
    | 098c3e2d-1c70-41d2-983b-6c266387de0b | controller-3 | available       | control | |
    | 91492c2a-b26c-49ef-9d4e-e492a1578076 | compute-1    | available       | compute-r1 | |
    | cdf9e0ec-e3cb-4005-86f6-d40e684a9b19 | compute-2    | available       | compute-r2 | |
    | 92c4c1cb-ce7d-48d4-a2d9-75b2651db097 | compute-3    | available       | compute-r1 | |
    | bb5e829a-834b-4eb1-b733-0012ce9d5f00 | compute-4    | available       | compute-r2 | |
    +--------------------------------------+--------------+-----------------+-----------------+-------------------+
    

    可以在节点注册期间(第6.1节)在 instackenv.json 文件中将节点标记到配置文件,而不是运行标记命令。

每个节点都需要执行命令,但无论如何都必须创建flavor和profile。

NVIDIA 网卡列表

运行以下命令遍历所有注册节点,识别双端口NVIDIA 100G网卡的接口名称。接口名称将在后续配置文件中使用。

(undercloud) [stack@rhosp-director templates]$ for node in $(openstack baremetal node list --fields uuid -f value) ; do openstack baremetal introspection interface list $node ; done
.
.
+-----------+-------------------+----------------------+-------------------+----------------+
| Interface | MAC Address       | Switch Port VLAN IDs | Switch Chassis ID | Switch Port ID |
+-----------+-------------------+----------------------+-------------------+----------------+
| eno1      | ec:b1:d7:83:11:b8 | []                   | 94:57:a5:25:fa:80 | 29 |
| eno2      | ec:b1:d7:83:11:b9 | []                   | None              | None |
| eno3      | ec:b1:d7:83:11:ba | []                   | None              | None |
| eno4      | ec:b1:d7:83:11:bb | []                   | None              | None |
| ens1f1    | ec:0d:9a:7d:81:b3 | []                   | 24:8a:07:7f:ef:00 | Eth1/14 |
| ens1f0    | ec:0d:9a:7d:81:b2 | []                   | 24:8a:07:7f:ef:00 | Eth1/1 |
+-----------+-------------------+----------------------+-------------------+----------------+

注意:所有节点的名称必须相同,或者至少所有共享相同角色的节点名称必须相同。在我们的案例中,Controller节点为ens2f0/ens2f1,Compute节点为ens1f0/ens1f1。

注意:以下各节中的配置文件示例是部分内容,用于突出显示特定部分。完整配置文件可通过以下链接下载: 配置文件

部署配置和环境文件:

角色定义文件:

  • 提供的 /home/stack/templates/roles_data_rivermax.yaml 文件包含一个标准Controller角色和两种Compute角色,每种角色对应一个关联的网络机架。
  • NeutronDhcpAgent服务已添加到Compute角色中。

以下是配置文件的局部输出:

###############################################################################
# Role: ComputeSriov1 #
###############################################################################
- name: ComputeSriov1
description: |
Compute SR-IOV Role R1
CountDefault: 1
networks:
- InternalApi
- Tenant
- Storage
- Ptp
HostnameFormatDefault: '%stackname%-computesriov1-%index%'
disable_upgrade_deployment: True
ServicesDefault:
###############################################################################
# Role: ComputeSriov2 #
###############################################################################
- name: ComputeSriov2
description: |
Compute SR-IOV Role R2
CountDefault: 1
networks:
- InternalApi_2
- Tenant_2
- Storage_2
- Ptp_2
HostnameFormatDefault: '%stackname%-computesriov2-%index%'
disable_upgrade_deployment: True
ServicesDefault:

完整配置文件附于本文档中。

节点计数和Flavor文件:

提供的 /home/stack/templates/node-info.yaml 文件指定了每个角色的节点计数和对应的flavor。

完整配置文件:
parameter_defaults:
OvercloudControllerFlavor: control
OvercloudComputeSriov1Flavor: compute-r1
OvercloudComputeSriov2Flavor: compute-r2
ControllerCount: 3
ComputeSriov1Count: 2
Rivermax环境配置文件:

提供的 /home/stack/templates/rivermax-env.yaml 文件用于配置Compute节点以实现低延迟应用和硬件卸载:

  • ens1f0用于加速VXLAN数据平面(VXLAN卸载需要Nova physical_network: null)。
  • CPU隔离:核心2-5、12-17从Hypervisor隔离,其中2-5、12-15将用于Rivermax虚拟机,核心16、17从Nova排除,专门用于在计算节点上运行linuxptp任务。
  • ens1f1用于VLAN流量。
    • 每个计算节点角色关联一个专用的物理网络,用于后续的多段网络,注意Nova PCI白名单物理网络保持不变。
    • VF功能#1从Nova PCI白名单中排除(将用于Hypervisor VF进行PTP流量)。
  • 调用userdata_disable_service.yaml以在计算过程中禁用overcloud节点上的chrony(NTP)服务——这对于稳定的PTP设置是必需的。
  • ExtraConfig用于将角色配置参数映射到正确的网络集,并设置防火墙规则以允许PTP流量到达计算节点。

完整配置文件附于本文档中。

注意:以下配置文件与特定的计算服务器硬件、操作系统和驱动程序相关,其中: NVIDIA ConnectX适配器接口名称为 ens1f0, ens1f1。 用于Nova的SR-IOV VF的PCI ID已按计算角色明确指定。 在不同系统中,名称和PCI地址可能不同。 在云部署之前,需要获取这些信息以调整配置文件。

# A Heat environment file for adjusting the compute nodes to low latency media applications with HW Offload

resource_registry:
  OS::TripleO::Services::NeutronSriovHostConfig: /usr/share/openstack-tripleo-heat-templates/puppet/services/neutron-sriov-host-config.yaml
  OS::TripleO::NodeUserData: /home/stack/templates/userdata_disable_service.yaml
  OS::TripleO::Services::Ntp: OS::Heat::None
  OS::TripleO::Services::NeutronOvsAgent: /usr/share/openstack-tripleo-heat-templates/puppet/services/neutron-ovs-agent.yaml

parameter_defaults:

  DisableService: "chronyd"
  NovaSchedulerDefaultFilters: ['RetryFilter','AvailabilityZoneFilter','RamFilter','ComputeFilter','ComputeCapabilitiesFilter','ImagePropertiesFilter','ServerGroupAntiAffinityFilter','ServerGroupAffinityFilter','PciPassthroughFilter']
  NovaSchedulerAvailableFilters: ["nova.scheduler.filters.all_filters","nova.scheduler.filters.pci_passthrough_filter.PciPassthroughFilter"]

  # ComputeSriov1 Role params: 1 vxlan offload interface, 1 legacy sriov interface, isolated cores, cores 16-17 are isolated and excluded from nova for ptp usage.
  ComputeSriov1Parameters:
    KernelArgs: "default_hugepagesz=2MB hugepagesz=2MB hugepages=8192 intel_iommu=on iommu=pt processor.max_cstate=0 intel_idle.max_cstate=0 nosoftlockup isolcpus=2-5,12-17 nohz_full=2-5,12-17 rcu_nocbs=2-5,12-17"
    NovaVcpuPinSet: "2-5,12-15"
    OvsHwOffload: True
    NovaReservedHostMemory: 4096
    NovaPCIPassthrough:
      - devname: "ens1f0"
        physical_network: null
      - address: {"domain": ".*", "bus": "08", "slot": "08", "function": "[4-7]"}
        physical_network: "tenantvlan1"
    NeutronPhysicalDevMappings: "tenantvlan1:ens1f1"
    NeutronBridgeMappings: ["tenantvlan1:br-stor"]

  # Extra config for mapping config params to rack 1 networks and for setting PTP Firewall rule
  ComputeSriov1ExtraConfig:
    neutron::agents::ml2::ovs::local_ip: "%{hiera('tenant')}"
    nova::vncproxy::host: "%{hiera('internal_api')}"
    nova::compute::vncserver_proxyclient_address: "%{hiera('internal_api')}"
    nova::compute::libvirt::vncserver_listen: "%{hiera('internal_api')}"
    nova::my_ip: "%{hiera('internal_api')}"
    nova::migration::libvirt::live_migration_inbound_addr: "%{hiera('internal_api')}"
    cold_migration_ssh_inbound_addr: "%{hiera('internal_api')}"
    live_migration_ssh_inbound_addr: "%{hiera('internal_api')}"
    tripleo::profile::base::database::mysql::client::mysql_client_bind_address: "%{hiera('internal_api')}"
    tripleo::firewall::firewall_rules:
      '199 allow PTP traffic over dedicated interface':
        dport: [319,320]
        proto: udp
        action: accept

  # ComputeSriov2 Role params: 1 vxlan offload interface, 1 legacy sriov interface, isolated cores, cores 16-17 are isolated and excluded from nova for ptp usage.
  ComputeSriov2Parameters:
    KernelArgs: "default_hugepagesz=2MB hugepagesz=2MB hugepages=8192 intel_iommu=on iommu=pt processor.max_cstate=0 intel_idle.max_cstate=0 nosoftlockup isolcpus=2-5,12-17 nohz_full=2-5,12-17 rcu_nocbs=2-5,12-17"
    NovaVcpuPinSet: "2-5,12-15"
    OvsHwOffload: True
    NovaReservedHostMemory: 4096
    NeutronSriovNumVFs:
    NovaPCIPassthrough:
      - devname: "ens1f0"
        physical_network: null
      - address: {"domain": ".*", "bus": "08", "slot": "02", "function": "[4-7]"}
        physical_network: "tenantvlan1"
    NeutronPhysicalDevMappings: "tenantvlan2:ens1f1"
    NeutronBridgeMappings: ["tenantvlan2:br-stor"]

    # Extra config for mapping config params to rack 2 networks and for setting PTP Firewall rule
  ComputeSriov2ExtraConfig:
    neutron::agents::ml2::ovs::local_ip: "%{hiera('tenant_2')}"
    nova::vncproxy::host: "%{hiera('internal_api_2')}"
    nova::compute::vncserver_proxyclient_address: "%{hiera('internal_api_2')}"
    nova::compute::libvirt::vncserver_listen: "%{hiera('internal_api_2')}"
    nova::my_ip: "%{hiera('internal_api_2')}"
    nova::migration::libvirt::live_migration_inbound_addr:

"%{hiera('internal_api_2')}" cold_migration_ssh_inbound_addr: "%{hiera('internal_api_2')}" live_migration_ssh_inbound_addr: "%{hiera('internal_api_2')}" tripleo::profile::base::database::mysql::client::mysql_client_bind_address: "%{hiera('internal_api_2')}" tripleo::firewall::firewall_rules: '199 allow PTP traffic over dedicated interface': dport: [319,320] proto: udp action: accept


<br>
<br>

### **Disable_Service 配置文件:**

提供的 `/home/stack/templates/userdata_disable_service.yaml` 用于在部署期间禁用 overcloud 节点上的服务。

它在 `rivermax-env.yaml` 中用于禁用 chrony(ntp) 服务:

heat_template_version: queens

description: > Uses cloud-init to enable root logins and set the root password. Note this is less secure than the default configuration and may not be appropriate for production environments, it's intended for illustration and development/debugging only.

parameters: DisableService: description: Disable a service hidden: true type: string

resources: userdata: type: OS::Heat::MultipartMime properties: parts: - config: {get_resource: disable_service}

disable_service: type: OS::Heat::SoftwareConfig properties: config: str_replace: template: | #!/bin/bash set -x sudo systemctl disable $service sudo systemctl stop $service params: $service: {get_param: DisableService}

outputs: OS::stack_id: value: {get_resource: userdata}


<br>

**网络配置文件:**

提供的 `network_data_rivermax.yaml` 文件用于根据以下指南配置云网络:

- 机架1网络设置的参数与机架1 Leaf交换机上配置的子网/VLAN匹配。使用的网络名称在 `roles_data.yaml` 中为 Controller\ComputeSriov1 角色网络指定。
- 机架2网络与机架2 Leaf交换机上配置的子网/VLAN匹配。网络名称在 `roles_data.yaml` 中为 ComputeSriov2 角色网络指定。
- “management”网络在我们的示例中未使用。
- PTP网络在我们的示例中为两个机架共享。

<br>

配置基于以下矩阵,以匹配上述“网络配置”部分中执行的Leaf交换机配置:
<br>
<br>

| **网络名称** | **网络集** | **网络位置** | **网络详情** | **VLAN** | **网络分配池** |
|---|---|---|---|---|---|
| Storage | 1 | Rack 1 | 172.16.0.0/24 | 11 | 172.16.0.100-250 |
| Storage_Mgmt | 1 | | 172.17.0.0/24 | 21 | 172.17.0.100-250 |
| Internal API | 1 | | 172.18.0.0/24 | 31 | 172.18.0.100-250 |
| Tenant | 1 | | 172.19.0.0/24 | 41 | 172.19.0.100-250 |
| PTP | 1 | | 172.20.0.0/24 | untagged | 172.20.0.100-250 |
| Storage_2 | 2 | Rack 2 | 172.16.2.0/24 | 12 | 172.16.2.100-250 |
| Storage_Mgmt_2 | 2 | | 172.17.2.0/24 | 22 | 172.17.2.100-250 |
| Internal API _2 | 2 | | 172.18.2.0/24 | 32 | 172.18.2.100-250 |
| Tenant _2 | 2 | | 172.19.2.0/24 | 42 | 172.19.2.100-250 |
| PTP_2 | 2 | | 172.20.2.0/24 | untagged | 172.20.2.100-250 |
| External | - | Public Switch | 10.7.208.0/24 | - | 10.7.208.10-21 |

完整配置文件附于本文档。

<br>
<br>

以下是其中一个已配置网络(Storage(2个网络集)、External和PTP网络)的部分示例:

  • name: Storage vip: true vlan: 11 name_lower: storage ip_subnet: '172.16.0.0/24' allocation_pools: [{'start': '172.16.0.100', 'end': '172.16.0.250'}] ipv6_subnet: 'fd00:fd00:fd00:1100::/64' ipv6_allocation_pools: [{'start': 'fd00:fd00:fd00:1100::10', 'end': 'fd00:fd00:fd00:1100:ffff:ffff:ffff:fffe'}] . .

  • name: Storage_2 vip: true vlan: 12 name_lower: storage_2 ip_subnet: '172.16.2.0/24' allocation_pools: [{'start': '172.16.2.100', 'end': '172.16.2.250'}] ipv6_subnet: 'fd00:fd00:fd00:1200::/64' ipv6_allocation_pools: [{'start': 'fd00:fd00:fd00:1200::10', 'end': 'fd00:fd00:fd00:1200:ffff:ffff:ffff:fffe'}] . .

  • name: External vip: true name_lower: external vlan: 10 ip_subnet: '10.7.208.0/24' allocation_pools: [{'start': '10.7.208.10', 'end': '10.7.208.21'}] gateway_ip: '10.7.208.1' ipv6_subnet: '2001:db8:fd00:1000::/64' ipv6_allocation_pools: [{'start': '2001:db8:fd00:1000::10', 'end': '2001:db8:fd00:1000:ffff:ffff:ffff:fffe'}] gateway_ipv6: '2001:db8:fd00:1000::1' . .

  • name: Ptp name_lower: ptp ip_subnet: '172.20.1.0/24' allocation_pools: [{'start': '172.20.1.100', 'end': '172.20.1.250'}]

  • name: Ptp_2 name_lower: ptp_2 ip_subnet: '172.20.2.0/24' allocation_pools: [{'start': '172.20.2.100', 'end': '172.20.2.250'}]


<br>
<br>

提供的 `network-environment-rivermax.yaml` 文件用于根据云网络配置 nova/neutron 网络参数:

- vxlan 隧道
- 用于 SRIOV 端口的租户 VLAN 范围为 100-200

完整配置文件附于本文档。

. . . NeutronNetworkType: 'vlan,vxlan,flat' NeutronTunnelTypes: 'vxlan' NeutronNetworkVLANRanges: 'tenantvlan1:100:200,tenantvlan2:100:200' NeutronFlatNetworks: 'datacentre' NeutronBridgeMappings: 'datacentre:br-ex,tenantvlan1:br-stor'


<br>

### **角色类型配置文件:**

/home/stack/templates/***controller.yaml***

- 确保配置文件中的 run-os-net-config.sh 脚本位置指向正确的脚本路径。
- 每个网络的超网和网关允许位于不同机架的网络集之间进行路由。网关是在面向该网络的叶交换机接口上配置的 IP 接口。两个租户网络的超网和网关如下所示。
- 我们使用的控制器节点网络设置:
  - 专用 1G 接口(类型为 "interface")用于配置(PXE)网络。
  - 专用 1G 接口(类型为 "ovs_bridge")用于外部网络。该网络配置了默认网关。
  - 专用 100G 接口(类型为 "interface",无 VLAN)用于机架 1 的数据平面(租户)网络。该网络关联一个超网,并有一条路由允许其访问位于不同机架的同一超网中的其他网络。
  - 专用 100G 接口(类型为 "ovs_bridge",带 VLAN)用于机架 1 的 Storage/StorageMgmt/InternalApi 网络。每个网络关联一个超网,并有一条路由允许其访问位于不同机架的同一超网中的其他网络。
- 示例如下。完整配置文件附于本文档。

```yaml
TenantSupernet:
default: '172.19.0.0/16'
description: Supernet that contains Tenant subnets for all roles.
type: string
TenantGateway:
default: '172.19.0.1'
description: Router gateway on tenant network
type: string
Tenant_2Gateway:
default: '172.19.2.1'
description: Router gateway on tenant_2 network
type: string
.
.
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
config:
str_replace:
template:
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
params:
$network_config:
network_config:
.
.
# NIC 3 - Data Plane (Tenant net)
- type: ovs_bridge
name: br-sriov
use_dhcp: false
members:
- type: interface
name: ens2f0
addresses:
- ip_netmask:
get_param: TenantIpSubnet
routes:
- ip_netmask:
get_param: TenantSupernet
next_hop:
get_param: TenantGateway

/home/stack/templates/computesriov1.yaml:

  • 确保配置文件中的 run-os-net-config.sh 脚本位置指向正确的脚本路径。
  • 每个网络的超网和网关允许位于不同机架的网络集之间进行路由。网关是在面向该网络的叶交换机接口上配置的 IP 接口。以下示例未提及,请参见上方示例或完整配置文件。
  • 机架 1 中具有 ComputeSriov1 角色的计算节点使用的网络和路由:
    • 专用 1G 接口用于配置(PXE)网络。
    • 专用 100G 接口用于机架 1 的卸载 vxlan 数据平面网络。该网络关联一个超网,并有一条路由允许其访问位于不同机架的同一超网中的其他网络。
    • 专用 100G 接口,带有用于 PTP 的主机 VF 和用于机架 1 的 Storage/InternalApi 网络的 OVS VLAN。每个网络关联一个超网,并有一条路由允许其访问位于不同机架的同一超网中的其他网络。以下示例未提及,请参见完整配置文件。
  • 示例如下。完整配置文件附于本文档。
network_config:
                 # NIC 1 - Provisioning net
              - type: interface
                name: eno1
                use_dhcp: false
                dns_servers:
                  get_param: DnsServers
                addresses:
                - ip_netmask:
                    list_join:
                    - /
                    - - get_param: ControlPlaneIp
                      - get_param: ControlPlaneSubnetCidr
                routes:
                - ip_netmask: 169.254.169.254/32
                  next_hop:
                    get_param: EC2MetadataIp
                - default: true
                  next_hop:
                    get_param: ControlPlaneDefaultRoute

                # NIC 2 - ASAP2 VXLAN Data Plane (Tenant net)
              - type: sriov_pf
                name: ens1f0
                numvfs: 8
                link_mode: switchdev
              - type: interface
                name: ens1f0
                use_dhcp: false
                addresses:
                  - ip_netmask:
                      get_param: TenantIpSubnet
                routes:
                  - ip_netmask:
                      get_param: TenantSupernet
                    next_hop:
                      get_param: TenantGateway

                # NIC 3 - Storage and Control over OVS, legacy SRIOV for Data Plane, NIC Partitioning for PTP VF owned by Host
              - type: ovs_bridge
                name: br-stor
                use_dhcp: false
                members:
                - type: sriov_pf
                  name: ens1f1
                  numvfs: 8
                  # force the MAC address of the bridge to this interface
                  primary: true
                - type: vlan
                  vlan_id:
                    get_param: StorageNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: StorageIpSubnet
                  routes:
                  - ip_netmask:
                      get_param: StorageSupernet
                    next_hop:
                      get_param: StorageGateway
                - type: vlan
                  vlan_id:
                    get_param: InternalApiNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: InternalApiIpSubnet
                  routes:
                  - ip_netmask:
                      get_param: InternalApiSupernet
                    next_hop:
                      get_param: InternalApiGateway
              - type: sriov_vf
                device: ens1f1
                vfid: 1
                addresses:
                - ip_netmask:
                    get_param: PtpIpSubnet

/home/stack/templates/computesriov2.yaml:

  • 确保配置文件中的 run-os-net-config.sh 脚本位置指向正确的脚本路径。
  • 每个网络的超网和网关允许位于不同机架的网络集之间进行路由。网关是在面向该网络的叶交换机接口上配置的 IP 接口。以下示例未提及,请参见上方示例或完整配置文件。
  • 机架 2 中具有 ComputeSriov2 角色的计算节点使用的网络和路由:
    • 专用 1G 接口用于配置(PXE)网络。以下示例未提及,请参见上方示例或完整配置文件。
    • 专用 100G 接口用于机架 1 的卸载 vxlan 数据平面网络。该网络关联一个超网,并有一条路由允许其访问位于不同机架的同一超网中的其他网络。
    • 专用 100G 接口,带有用于 PTP 的主机 VF 和用于机架 1 的 Storage/InternalApi 网络的 OVS VLAN。每个网络关联一个超网,并有一条路由允许其访问位于不同机架的同一超网中的其他网络。以下示例未提及,请参见完整配置文件。
  • 示例如下。完整配置文件附于本文档。
network_config:
                # NIC 1 - Provisioning net
              - type: interface
                name: eno1
                use_dhcp: false
                dns_servers:
                  get_param: DnsServers
                addresses:
                - ip_netmask:
                    list_join:
                    - /
                    - - get_param: ControlPlaneIp
                      - get_param: ControlPlaneSubnetCidr
                routes:
                - ip_netmask: 169.254.169.254/32
                  next_hop:
                    get_param: EC2MetadataIp
                - default: true
                  next_hop:
                    get_param: ControlPlaneDefaultRoute

                # NIC 2 - ASAP2 VXLAN Data Plane (Tenant net)
              - type: sriov_pf
                name: ens1f0
                numvfs: 8
                link_mode: switchdev
              - type: interface
                name: ens1f0
                use_dhcp: false
                addresses:
                  - ip_netmask:
                      get_param: Tenant_2IpSubnet
                routes:
                  - ip_netmask:
                      get_param: TenantSupernet
                    next_hop:
                      get_param: Tenant_2Gateway

                # NIC 3 - Storage and Control over OVS, legacy SRIOV for Data Plane, NIC Partitioning for PTP VF owned by Host
              - type: ovs_bridge
                name: br-stor
                use_dhcp: false
                members:
                - type: sriov_pf
                  name: ens1f1
                  numvfs: 8
                  # force the MAC address of the bridge to this interface
                  primary: true
                - type: vlan
                  vlan_id:
                    get_param: Storage_2NetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: Storage_2IpSubnet
                  routes:
                  - ip_netmask:
                      get_param: StorageSupernet
                    next_hop:
                      get_param: Storage_2Gateway
  • type: vlan vlan_id: get_param: InternalApi_2NetworkVlanID addresses:
    • ip_netmask: get_param: InternalApi_2IpSubnet routes:
    • ip_netmask: get_param: InternalApiSupernet next_hop: get_param: InternalApi_2Gateway
  • type: sriov_vf device: ens1f1 vfid: 1 addresses:
    • ip_netmask: get_param: Ptp_2IpSubnet

部署Overcloud

使用提供的配置和环境文件,云将通过以下方式部署:

  • 3个控制器,关联到机架1网络
  • 2个计算节点,关联到机架1(提供商网络1)
  • 2个计算节点,关联到机架2(提供商网络2)
  • 路由,允许机架/网络之间的连接
  • 所有节点之间的VXLAN覆盖隧道

在开始部署之前,请验证机架Leaf交换机SW vlan接口之间通过OSPF底层结构的连接性。如果没有所有网络的机架间连接,overcloud部署将失败。

注意

  • 不要更改部署命令中环境文件的顺序。
  • 确保部署命令中指定的NTP服务器可访问并能向undercloud节点提供时间。
  • 部署命令中使用的overcloud_images.yaml文件是在undercloud安装期间创建的,请验证其在指定位置是否存在。
  • 部署命令中指定的network-isolation.yaml和neutron-sriov.yaml文件是在部署期间从j2.yaml模板文件自动创建的。

要开始overcloud部署,请执行以下命令:

(undercloud) [stack@rhosp-director templates]$ openstack overcloud deploy --templates /usr/share/openstack-tripleo-heat-templates \
--libvirt-type kvm \
-n /home/stack/templates/network_data_rivermax.yaml \
-r /home/stack/templates/roles_data_rivermax.yaml \
--timeout 90 \
--validation-warnings-fatal \
--ntp-server 0.asia.pool.ntp.org \
-e /home/stack/templates/node-info.yaml \
-e /home/stack/templates/overcloud_images.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/neutron-sriov.yaml \
-e /home/stack/templates/network-environment-rivermax.yaml \
-e /home/stack/templates/rivermax-env.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/host-config-and-reboot.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/disable-telemetry.yaml

部署后步骤

计算节点配置:

  1. 验证系统已使用所需的低延迟调整启动

    # cat /proc/cmdline
    BOOT_IMAGE=/boot/vmlinuz-3.10.0-957.10.1.el7.x86_64 root=UUID=334f450f-1946-4577-a4eb-822bd33b8db2 ro console=tty0 console=ttyS0,115200n8 crashkernel=auto rhgb quiet default_hugepagesz=2MB hugepagesz=2MB hugepages=8192 intel_iommu=on iommu=pt processor.max_cstate=0 intel_idle.max_cstate=0 nosoftlockup isolcpus=2-5,12-17 nohz_full=2-5,12-17 rcu_nocbs=2-5,12-17
    
    # cat /sys/module/intel_idle/parameters/max_cstate
    0
    
    # cat /sys/devices/system/cpu/cpuidle/current_driver
    none
    
  2. 将MFT包上传到计算节点并安装

    注意 NVIDIA Mellanox固件工具(MFT)可从此处获取:http://www.mellanox.com/page/management_tools。 MFT安装需要GCC和kernel-devel包。

    # yum install gcc kernel-devel-3.10.0-957.10.1.el7.x86_64 -y
    # tar -xzvf mft-4.12.0-105-x86_64-rpm.tgz
    # cd mft-4.12.0-105-x86_64-rpm
    # ./install.sh
    mst start
    
  3. 验证网卡固件,如有必要升级到最新版本

    # mlxfwmanager --query
    Querying Mellanox devices firmware ...
    
    Device #1:
    ----------
    
      Device Type:      ConnectX5
      Part Number:      MCX556A-EDA_Ax
      Description:      ConnectX-5 Ex VPI adapter card; EDR IB (100Gb/s) and 100GbE; dual-port QSFP28; PCIe4.0 x16; tall bracket; ROHS R6
      PSID:             MT_0000000009
      PCI Device Name:  /dev/mst/mt4121_pciconf0
      Base MAC:         ec0d9a7d81b2
      Versions:         Current        Available
         FW             16.25.1020     N/A
         PXE            3.5.0701       N/A
         UEFI           14.18.0019     N/A
    
      Status:           No matching image found
    
  4. 在用于PTP的端口上启用packet pacing和硬件时间戳

    注意 rivermax_config脚本可从此处下载:https://mellanox.box.com/s/83c37ucsyqmna0nlw8oxp160nbtjpk5x。 相关接口在我们的案例中是ens1f1。 步骤之间需要重启。 "mcra"设置重启后不会保留。 预计在未来的固件版本中,此设置将持久化并默认启用。

    # mst start
    Starting MST (Mellanox Software Tools) driver set
    Loading MST PCI module - Success
    [warn] mst_pciconf is already loaded, skipping
    Create devices
    -W- Missing "lsusb" command, skipping MTUSB devices detection
    Unloading MST PCI module (unused) - Success
    
    # mst status -v
    MST modules:
    ------------
        MST PCI module is not loaded
        MST PCI configuration module loaded
    PCI devices:
    ------------
    DEVICE_TYPE             MST                           PCI       RDMA            NET                       NUMA
    ConnectX5(rev:0)        /dev/mst/mt4121_pciconf0.1    08:00.1   mlx5_1          net-ens1f1                0
    
    ConnectX5(rev:0)        /dev/mst/mt4121_pciconf0      08:00.0   mlx5_0          net-ens1f0                0
    
    # chmod 777 rivermax_config
    # ./rivermax_config ens1f1
    running this can take few minutes...
    enabling
    Done!
    
    # reboot
    
    # mst start
    Starting MST (Mellanox Software Tools) driver set
    Loading MST PCI module - Success
    [warn] mst_pciconf is already loaded, skipping
    Create devices
    -W- Missing "lsusb" command, skipping MTUSB devices detection
    Unloading MST PCI module (unused) - Success
    
    # mcra /dev/mst/mt4121_pciconf0.1 0xd8068 3
    
    # mcra /dev/mst/mt4121_pciconf0.1 0xd8068
    0x00000003
    
  5. 同步计算节点时钟

  6. 安装linuxptp

    # yum install -y linuxptp
    
  7. 使用以下方法之一识别用于PTP的主机VF接口名称(查找PTP网络的IP地址或查找与配置部署文件中使用的vfid 1相关的"virtfn1")

    [root@overcloud-computesriov1-0 ~]# ip addr show | grep "172.20"
        inet 172.20.0.102/24 brd 172.20.0.255 scope global enp8s8f3
    
    [root@overcloud-computesriov1-0 ~]# ls /sys/class/net/ens1f1/device/virtfn1/net/
    enp8s8f3
    
  8. 验证与时钟主机的连接(机架1的Onyx Leaf交换机sw11通过vlan 51,机架2的Onyx Leaf交换机sw10通过vlan 52)

    [root@overcloud-computesriov1-0 ~]# ping 172.20.0.1
    PING 172.20.0.1 (172.20.0.1) 56(84) bytes of data.
    64 bytes from 172.20.0.1: icmp_seq=1 ttl=64 time=0.158 ms
    
    [root@overcloud-computesriov2-0 ~]# ping 172.20.2.1
    PING 172.20.2.1 (172.20.2.1) 56(84) bytes of data.
    64 bytes from 172.20.2.1: icmp_seq=1 ttl=64 time=0.110 ms
    
  9. 编辑/etc/ptp4l.conf,包含以下全局参数和PTP接口参数

    [global]
    domainNumber 127
    priority1 128
    priority2 127
    use_syslog 1
    logging_level 6
    tx_timestamp_timeout 30
    hybrid_e2e 1
    dscp_event 46
    dscp_general 46
    
    [enp8s8f3]
    logAnnounceInterval -2
    announceReceiptTimeout 3
    logSyncInterval -3
    logMinDelayReqInterval -3
    delay_mechanism E2E
    network_transport UDPv4
    
  10. 在PTP VF接口上启动ptp4l

    注意 以下命令用于在从模式下运行ptp4l,并将其绑定到专用的主机CPU(根据我们的部署配置文件,该CPU已被隔离并从Nova中排除,本例中为核心16)。 第二个命令用于验证PTP时钟是否锁定到主时钟源,rms值应较低。

    # taskset -c 16 ptp4l -s -f /etc/ptp4l.conf &
    # tail -f /var/log/messages | grep rms
    ptp4l: [2560.009]
    

rms 12 max 22 freq -12197 +/- 16 ptp4l: [2561.010] rms 10 max 18 freq -12200 +/- 13 delay 63 +/- 0 ptp4l: [2562.010] rms 10 max 21 freq -12212 +/- 10 delay 63 +/- 0 ptp4l: [2563.011] rms 10 max 21 freq -12208 +/- 14 delay 63 +/- 0 ptp4l: [2564.012] rms 9 max 14 freq -12220 +/- 8


> **注意**:以下命令用于在专用主机 CPU 上运行 phc2sys,该 CPU 已根据我们的部署配置文件(本例中为核心 17)被隔离并从 Nova 中排除。
> 第二个命令用于验证系统时钟是否与 PTP 同步,偏移值应较低且与 ptp4l rms 值匹配。

```bash
# taskset -c 17  phc2sys -s enp8s8f3 -w -m -n 127 >> /var/log/messages &
# tail -f /var/log/messages | grep offset
phc2sys[2797.730] phc offset         0 s2 freq  +14570 delay    959
phc2sys[2798.730]: phc offset       -43 s2 freq  +14527 delay    957
phc2sys[2799.730]: phc offset        10 s2 freq  +14567 delay    951

应用虚拟机与用例

以下部分将涵盖两个主要用例:

  1. 位于不同 L3 路由提供商网络中的媒体虚拟机之间的 IP 多播流

    use_case1.png

  2. 位于不同 L3 路由提供商网络中的媒体虚拟机之间通过 VXLAN 隧道的硬件卸载单播流

    use_case2.png

创建媒体实例

每个媒体虚拟机将同时拥有基于 SRIOV 的 VLAN 网络和基于 ASAP² 的 VXLAN 网络。相同的虚拟机可用于测试所有用例。

  1. 联系 NVIDIA 网络支持以获取 Rivermax 虚拟机云镜像文件(RivermaxCloud_v3.qcow2)

    注意:使用此镜像的虚拟机的登录凭据为:root/3tango

  2. 将 Rivermax 云镜像上传到 overcloud 镜像仓库

    source overcloudrc
    openstack image create --file RivermaxCloud_v3.qcow2 --disk-format qcow2 --container-format bare rivermax
    
  3. 创建具有专用 CPU 策略的 flavor,以确保虚拟机 vCPU 固定到隔离的主机 CPU

    openstack flavor create m1.rivermax --id auto --ram 4096 --disk 20 --vcpus 4
    openstack flavor set m1.rivermax --property hw:mem_page_size=large
    openstack flavor set m1.rivermax --property hw:cpu_policy=dedicated
    
  4. 为租户 VLAN 多播流量创建多段网络

    注意:每个网络段包含一个来自不同子网的 SRIOV 直连端口。 子网与不同的物理网络关联,每个物理网络对应不同的路由提供商机架。 子网之间的路由通过提供商 L3 基础设施(本例中为 OSPF)在机架间传播。 子网的网关是每个机架的 Leaf ToR 交换机。 此多段网络下的两个段承载相同的段 VLAN。

    openstack network create mc_vlan_net --provider-physical-network tenantvlan1 --provider-network-type vlan --provider-segment 101 --share
    openstack network segment list --network mc_vlan_net
    +--------------------------------------+------+--------------------------------------+--------------+---------+
    | ID                                   | Name | Network                              | Network Type | Segment |
    +--------------------------------------+------+--------------------------------------+--------------+---------+
    | 309dd695-b45d-455e-b171-5739cc309dcf | None | 00665b03-eeae-4b5d-af65-063f8e989c24 | vlan         |     101 |
    +--------------------------------------+------+--------------------------------------+--------------+---------+
    
    openstack network segment set --name segment1 309dd695-b45d-455e-b171-5739cc309dcf
    openstack network segment create --physical-network tenantvlan2 --network-type vlan --segment 101 --network mc_vlan_net segment2
    
    (overcloud) [stack@rhosp-director ~]$ openstack network segment list
    +--------------------------------------+----------+--------------------------------------+--------------+---------+
    | ID                                   | Name     | Network                              | Network Type | Segment |
    +--------------------------------------+----------+--------------------------------------+--------------+---------+
    | 309dd695-b45d-455e-b171-5739cc309dcf | segment1 | 00665b03-eeae-4b5d-af65-063f8e989c24 | vlan         |     101 |
    | cac89791-2d7f-45e7-8c85-cc0a65060e81 | segment2 | 00665b03-eeae-4b5d-af65-063f8e989c24 | vlan         |     101 |
    +--------------------------------------+----------+--------------------------------------+--------------+---------+
    
    openstack subnet create mc_vlan_subnet --dhcp --network mc_vlan_net --network-segment segment1 --subnet-range 11.11.11.0/24 --gateway 11.11.11.1
    openstack subnet create mc_vlan_subnet_2 --dhcp --network mc_vlan_net --network-segment segment2 --subnet-range 22.22.22.0/24 --gateway 22.22.22.1
    
    openstack port create mc_direct1 --vnic-type=direct --network mc_vlan_net
    openstack port create mc_direct2 --vnic-type=direct --network mc_vlan_net
    
  5. 为单播流量创建 VXLAN 租户网络,包含 2 个 ASAP² 卸载端口

    openstack network create tenant_vxlan_net --provider-network-type vxlan --share
    openstack subnet create tenant_vxlan_subnet --dhcp --network tenant_vxlan_net --subnet-range 33.33.33.0/24 --gateway none
    openstack port create offload1 --vnic-type=direct --network tenant_vxlan_net --binding-profile '{"capabilities":["switchdev"]}'
    openstack port create offload2 --vnic-type=direct --network tenant_vxlan_net --binding-profile '{"capabilities":["switchdev"]}'
    
  6. 在位于机架 1(提供商网络段 1)的媒体计算节点上创建一个 Rivermax 实例,该实例具有一个 VLAN 网络上的直连 SRIOV 端口和一个 VXLAN 网络上的 ASAP² 卸载端口

    openstack server create --flavor m1.rivermax --image rivermax --nic port-id=mc_direct1 --nic port-id=offload1 vm1 --availability-zone nova:overcloud-computesriov1-0.localdomain
    
  7. 在位于机架 2(提供商网络段 2)的媒体计算节点上创建第二个 Rivermax 实例,该实例具有一个 VLAN 网络上的直连 SRIOV 端口和一个 VXLAN 网络上的 ASAP² 卸载端口

    openstack server create --flavor m1.rivermax --image rivermax --nic port-id=mc_direct2 --nic port-id=offload2 vm2 --availability-zone nova:overcloud-computesriov2-0.localdomain
    
  8. 连接到计算节点并验证虚拟机是否固定到隔离的 CPU

    [root@overcloud-computesriov1-0 ~]# virsh list
     Id    Name                           State
    ----------------------------------------------------
     1     instance-0000002b              running
    
    [root@overcloud-computesriov1-0 ~]# virsh vcpupin 1
    VCPU: CPU Affinity
    ----------------------------------
       0: 15
       1: 2
       2: 3
       3: 4
    

Rivermax 应用测试 - 用例 1:

以下部分我们使用位于不同网络机架的两个媒体计算节点上创建的 Rivermax 应用虚拟机。

首先,我们将锁定由 Onyx 交换机生成并通过 KVM vPTP 驱动程序传播到虚拟机中的 PTP 时钟。

接下来,我们将在 VM1 上生成符合媒体标准的流,并使用 VM2 上的 NVIDIA Rivermax AnalyzeX 工具验证合规性。VM1 生成的多播流将通过 PIM-SM 在网络中传输,并由加入该组的 VM2 接收。请注意,此流包含每个数据包的 RTP 头部(包括 1 个 SRD),并符合已知的媒体 RFC,但 RTP 负载为 0,因此无法可视化显示。

最后一步,我们将在 VM1 上解码并流式传输一个真实视频文件,并在接收端 VM2 的图形界面中使用 NVIDIA Rivermax Simple Viewer 工具播放。

  1. 将 Rivermax 和 AnalyzeX 许可证文件上传到 Rivermax 虚拟机,并放置在 /opt/mellanox/rivermx 目录下。

  2. 在两个虚拟机上运行以下命令,将系统时间与 PTP 同步:

    taskset
    

-c 1 phc2sys -s /dev/ptp2 -O 0 -m >> /var/log/messages &

tail -f /var/log/messages | grep offset

phc2sys[2797.730] phc offset 0 s2 freq +14570 delay 959 phc2sys[2798.730]: phc offset -43 s2 freq +14527 delay 957 phc2sys[2799.730]: phc offset 10 s2 freq +14567 delay 951

注意: phc2sys 在专用虚拟机核心 1(已从虚拟机监控程序隔离)上运行,并应用于 ptp2 设备。在某些情况下,虚拟机中的 ptp 设备名称会不同。 应用命令时忽略“clock is not adjustable”消息。 低且稳定的偏移值表示锁定。

重要提示: 验证输出中的 freq 值是否与计算节点级别看到的值接近(请参见上面在主机上执行命令的位置)。 如果不是,请在 phc2sys 命令中使用虚拟机系统中可用的不同 /dev/ptp 设备。

  1. 在两个虚拟机上,运行 SDP 文件修改脚本,根据需要调整媒体配置文件(sdp_hd_video_audio):

    #cd /home/Rivermax
    #./sdp_modify.sh
    === SDP File Modification Script ===
    Default source IP Address is 11.11.11.10 would you like to change it (Y\N)?y
    Please select source IP Address in format X.X.X.X :11.11.11.25
    Default Video stream multicast IP Address is 224.1.1.20 would you like to change it (Y\N)?y
    Please select Video stream multicast IP Address:224.1.1.110
    Default  Video stream multicast Port is 5000 would you like to change it (Y\N)?n
    Default Audio stream multicast IP Address is 224.1.1.30 would you like to change it (Y\N)?y
    Please select Audio stream multicast IP Address:224.1.1.110
    Default Audio stream multicast Port: is 5010 would you like to change it (Y\N)?n
    Your SDP file is ready with the following parameters:
    IP_ADDR 11.11.11.25
    MC_VIDEO_IP 224.1.1.110
    MC_VIDEO_PORT 5000
    MC_AUDIO_IP 224.1.1.110
    MC_AUDIO_PORT 5010
    
    # cat sdp_hd_video_audio
    v=0
    o=- 1443716955 1443716955 IN IP4 11.11.11.25
    s=st2110 stream
    t=0 0
    m=video 5000 RTP/AVP 96
    c=IN IP4 224.1.1.110/64
    a=source-filter:incl IN IP4 224.1.1.110 11.11.11.25
    a=rtpmap:96 raw/90000
    a=fmtp:96 sampling=YCbCr-4:2:2; width=1920; height=1080; exactframerate=50; depth=10; TCS=SDR; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPN;
    a=mediaclk:direct=0
    a=ts-refclk:localmac=40-a3-6b-a0-2b-d2
    m=audio 5010 RTP/AVP 97
    c=IN IP4 224.1.1.110/64
    a=source-filter:incl IN IP4 224.1.1.110 11.11.11.25
    a=rtpmap:97 L24/48000/2
    a=mediaclk:direct=0 rate=48000
    a=ptime:1
    a=ts-refclk:localmac=40-a3-6b-a0-2b-d2
    
  2. 在两个虚拟机上执行以下命令以定义 VMA 内存缓冲区:

    export VMA_RX_BUFS=2048
    export VMA_TX_BUFS=2048
    export VMA_RX_WRE=1024
    export VMA_TX_WRE=1024
    
  3. 在第一个虚拟机(“发送方虚拟机”)上,使用 Rivermax media_sender 应用程序生成媒体流。以下命令用于在专用虚拟机 vCPU 2、3(已从虚拟机监控程序隔离)上运行 Rivermax media_sender 应用程序。

    Media sender 应用程序使用系统时间运行。

    # ./media_sender -c 2 -a 3 -s sdp_hd_video_audio -m
    
  4. 在第二个虚拟机(“接收方虚拟机”)上,运行 AnalyzeX 工具以验证合规性。以下命令用于在专用虚拟机 vCPU 1-3(已从虚拟机监控程序隔离)上运行 Rivermax AnalyzeX 合规性工具。

    # VMA_HW_TS_CONVERSION=2 ANALYZEX_STACK_JITTER=2 LD_PRELOAD=libvma.so taskset -c 1-3 ./analyzex -i ens4 -s sdp_hd_video_audio -p
    
  5. 以下 AnalyzeX 结果表示完全符合 ST2110 媒体标准:

    analyzex.png

  6. 停止 VM1 上的 Rivermax media_sender 应用程序和 VM2 上的 AnalyzeX 工具。

  7. 登录 VM1 并解压 /home/Rivermax 目录下的视频文件:

    # gunzip mellanoxTV_1080p50.ycbcr.gz
    
  8. 重新在 VM1 上运行 Rivermax media_sender 应用程序 - 这次指定视频文件。使用较低的速率以允许图形界面处理视频播放任务:

    # ./media_sender -c 2 -a 3 -s sdp_hd_video_audio -m -f mellanoxTV_1080p50.ycbcr --fps 25
    
  9. 打开到 VM2 的图形远程会话。在我们的案例中,我们为 VM2 分配了一个公共浮动 IP,并使用 X2Go 客户端打开远程会话:

    x2go_client.png

  10. 打开终端并运行 /home/Rivermax 目录下的 Rivermax rx_hello_wolrd_viewer 应用程序。指定 VM2 的本地 VLAN IP 地址和流的多播地址。命令发出后,视频将开始在屏幕上播放。

    #cd /home/Rivermax
    # ./rx_hello_world_viewer -i 22.22.22.4 -m 224.1.1.110 -p 5000
    

    x2go_terminal.png x2go_rx.png

    x2go_tv.png

    以下视频演示了该过程: Simple_player.mp4

Rivermax 应用程序测试 - 用例 2

在以下部分中,我们使用在 2 个远程媒体计算节点上创建的相同 Rivermax 应用程序虚拟机,通过 VXLAN 覆盖网络在虚拟机之间生成单播流。

在验证 PTP 时钟已锁定后,我们将启动流并使用相同的工具进行监控。

VM1 生成的单播流将创建 VXLAN OVS 流,该流将被卸载到网卡硬件。

  1. 确保按照用例 1 中的说明将 rivermax 和 analyzex 许可证文件放置在 Rivermax 虚拟机上。

  2. 确保按照用例 1 中的说明从 PTP 更新两个虚拟机的系统时间。

    # tail -f /var/log/messages | grep offset
    phc2sys[2797.730] phc offset         0 s2 freq  +14570 delay    959
    phc2sys[2798.730]: phc offset       -43 s2 freq  +14527 delay    957
    phc2sys[2799.730]: phc offset        10 s2 freq  +14567 delay    951
    
  3. 在发送方 VM1 上运行 SDP 文件修改脚本以创建单播配置文件 - 指定 VM1 VXLAN IP 地址作为源 IP,VM2 VXLAN IP 地址作为流目标。

    # ./sdp_modify.sh
    === SDP File Modification Script ===
    Default source IP Address is 11.11.11.10 would you like to change it (Y\N)?y
    Please select source IP Address in format X.X.X.X :33.33.33.12
    Default Video stream multicast IP Address is 224.1.1.20 would you like to change it (Y\N)?y
    Please select Video stream multicast IP Address:33.33.33.16
    Default  Video stream multicast Port is 5000 would you like to change it (Y\N)?n
    Default Audio stream multicast IP Address is 224.1.1.30 would you like to change it (Y\N)?y
    Please select Audio stream multicast IP Address:33.33.33.16
    Default Audio stream multicast Port: is 5010 would you like to change it (Y\N)?n
    Your SDP file is ready with the following parameters:
    IP_ADDR 33.33.33.12
    MC_VIDEO_IP 33.33.33.16
    MC_VIDEO_PORT 5000
    MC_AUDIO_IP 33.33.33.16
    MC_AUDIO_PORT 5010
    
  4. 在 VM1 上使用 Rivermax media_sender 应用程序生成媒体流 - 使用上一步创建的单播 SDP 文件。

    # ./media_sender -c 2 -a 3 -s sdp_hd_video_audio -m
    
  5. 在接收方 VM2 上使用本地 VXLAN 接口 IP 运行 Rivermax rx_hello_wolrd 应用程序。

    注意: 确保使用 rx_hello_world 工具,而不是

rx_hello_world_viewer.

# ./rx_hello_world -i 33.33.33.16 -m 33.33.33.16 -p 5000
  1. 在计算节点上验证流已卸载到硬件
    1. 在托管发送方VM1的计算节点1上,卸载的流包括来自VM的流量,经过Representor接口进入VXLAN隧道:

      [root@overcloud-computesriov1-0 heat-admin]# ovs-dpctl dump-flows type=offloaded --name
      
      in_port(eth4),eth(src=fa:16:3e:94:a4:5d,dst=fa:16:3e:fc:59:f3),eth_type(0x0800),ipv4(tos=0/0x3,frag=no), packets:54527279, bytes:71539619808, used:0.330s, actions:set(tunnel(tun_id=0x8,src=172.19.0.100,dst=172.19.2.105,tp_dst=4789,flags(key))),vxlan_sys_4789
      
    2. 在托管接收方VM2的计算节点2上,卸载的流包括来自VXLAN隧道的流量,经过Representor接口进入VM:

      [root@overcloud-computesriov2-0 ~]# ovs-dpctl dump-flows type=offloaded --name
      
      tunnel(tun_id=0x8,src=172.19.0.100,dst=172.19.2.105,tp_dst=4789,flags(+key)),in_port(vxlan_sys_4789),eth(src=fa:16:3e:94:a4:5d,dst=fa:16:3e:fc:59:f3),eth_type(0x0800),ipv4(frag=no), packets:75722169, bytes:95561342656, used:0.420s, actions:eth5 sys_4789
      

Authors

image-2025-9-15_10-4-30.png Itai Levy过去几年中,Itai Levy担任NVIDIA网络“解决方案实验室”团队的解决方案架构师。他设计和执行围绕云计算、软件定义网络、存储和安全的前沿解决方案。他的主要专业领域包括NVIDIA BlueField数据处理单元(DPU)解决方案以及加速的K8s/OpenStack平台。

Related Documents

Filter by label

There are no items with the selected labels at this time.