如何搞定Netronome Agilio vRouter智能网卡(安装和设置指南)



  • 作者:Savithru Lokanath 译者:TF编译组

    Netronome专注于智能网络流处理器的开发,使用可扩展、可编程芯片架构,将软件创新的速度和灵活性与硬件的性能和可扩展性结合在一起。Netronome Agilio系列智能芯片网卡,结合TF vRouter虚拟路由器功能,可为服务提供商和企业云网络提供更高性能、更具开放性、软件和硬件相结合的网络智能化解决方案,从而将大型数据中心的效率带入主流服务器和边缘计算市场。
    

    TF-Netronome体系架构

    bf0c5133-5bea-4a4f-b48b-360e044d2a2c-image.png

    Lab设置

    48ce9214-1972-49a2-80ed-ddf31aeaacfa-image.png

    准备条件

    • 至少两个节点:一个控制器节点+一个计算节点
    • Ubuntu 14.04.4(3.13.0-100 Errata 47 patched kernel)
    • TF- Cloud 3.1.2.0-65(OpenStack Kilo/Mitaka)
    • Agilio vRouter 3.1.0.0-124

    Netronome SmartNIC安装指南(新装)

    注意:本指南假定您已经在服务器上插入了Netronome NIC。

    在所有节点上

    在设置中的所有节点上安装Ubuntu 14.04.4

    在节点上下载并安装Tungsten Fabric软件包

    (all-nodes)# dpkg -i contrail-install-packages_3.1.2.0-65~mitaka_all.deb
    (all-nodes)# /opt/contrail/contrail_packages/setup.sh
    (all-nodes)# apt-get update
    

    下载Netronome(Agilio vRouter)软件包并复制到所有节点

    (all-nodes)# tar -xvf ns-agilio-vrouter-release_3.1.0.0-124.tgz 
    (all-nodes)# cd ns-agilio-vrouter-release_3.1.0.0-124/
    (all-nodes)# cp ns-agilio-vrouter-depends-packages_3.1.0.0-124_amd64.deb /opt/contrail/contrail_install_repo/
    (all-nodes)# cd /opt/contrail/contrail_install_repo/
    (all-nodes)# dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
    (all-nodes)# apt-get update
    

    在控制器节点上

    用相关信息填充测试平台

    (controller-node)# vim /opt/contrail/utils/fabfile/testbeds/testbed.py
    
             bond= {
                 compute1 : { 'name': 'bond0', 'member': ['nfp_p0','nfp_p1','nfp_p2','nfp_p3'], 'mode': '802.3ad',    
                           'xmit_hash_policy': 'layer3+4' },
                 compute2 : { 'name': 'bond0', 'member': ['nfp_p0','nfp_p1','nfp_p2','nfp_p3'], 'mode': '802.3ad',    
                           'xmit_hash_policy': 'layer3+4' },
             }
    
             control_data = {
                 controller : { 'ip': '172.31.255.1/24', 'gw' : '172.31.255.1', 'device': 'eth1' },
                 compute1 : { 'ip': '172.31.255.2/24', 'gw' : '172.31.255.1', 'device': 'bond0' },
                 compute2 : { 'ip': '172.31.255.3/24', 'gw' : '172.31.255.1', 'device': 'bond0' },
             }
    
             env.ns_agilio_vrouter = {
                 compute1: {'huge_page_alloc': '24G', 'huge_page_size': '1G', 'coremask': '2,4', 'pinning_mode': 
                             'auto:split'},
                 compute2: {'huge_page_alloc': '24G', 'huge_page_size': '1G', 'coremask': '2,4', 'pinning_mode': 
                             'auto:split'}
             }
    

    示例文件请见:https://github.com/savithruml/netronome-agilio-vrouter/tree/3.1.2/testbed

    启用Netronome SmartNIC

    (controller-node)# cd /opt/contrail/utils/
    (controller-node)# fab install_ns_agilio_nic
    (controller-node)# reboot
    (controller-node)# fab install_ns_agilio_nic
    

    注意:您可能会遇到“在目标节点上找不到python-dev软件包”的错误。

    (target-node)# aptitude install python-dev
    

    在第一个提示中选择“否”,在第二个提示中选择“是”。重新运行

    fab install_ns_agilio_nic
    
    (controller-node)# fab install_ns_agilio_nic
    

    如果您使用的是分支电缆(4×10GbE → 1×40GbE),请更改SmartNIC的media配置。

    This should create four NFP interfaces: nfp_p0, nfp_p1, nfp_p2, nfp_p3
    
    (compute-node)# /opt/netronome/bin/nfp-media --set-media=phy0=4x10G
    (compute-node)# service ns-core-nic.autorun clean
    (compute-node)# reboot
    

    安装Tungsten Fabric

    (controller-node)# cd /opt/contrail/utils
    (controller-node)# fab install_contrail
    

    注意:您可能会遇到“在目标节点上找不到default-jre-headless软件包”的错误。

    (target-node)# aptitude install default-jre-headless
    

    在第一个提示中选择“否”,在第二个提示中选择“是”。重新运行

    fab install_contrail
    
    (controller-node)# fab setup_interface (Verify if all nodes can talk with each other on Control/Data interface)
    (controller-node)# fab setup_all
    

    在Netronome计算节点上

    验证预配是否成功

    (compute-nodes)# contrail-status
    (compute-nodes)# /opt/netronome/libexec/nfp-vrouter-status -r
    

    a1472352-6a1d-49fc-ac02-fb8a542612f4-image.png

    创建VirtIO flavors

    注意:仅执行一次

    (compute-node)# cd /ns-agilio-vrouter-release_3.1.0.0-124/ns-agilio-vrouter_3.1.0.0-124/opt/netronome/openstack
    (compute-node)# ./make_virtio_flavors.sh 
    

    Netronome SmartNIC安装指南(现有设置)

    注意:本指南假定您已经在服务器上插入了Netronome NIC。

    在新的Netronome计算节点上

    安装所需的Linux内核

    (compute-node)# apt-get install linux-image-3.13.0-100-generic 
    (compute-node)# apt-get install linux-headers-3.13.0-100-generic 
    (compute-node)# apt-get install linux-image-extra-3.13.0-100-generic 
    (compute-node)# apt-get install linux-image-generic 
    (compute-node)# apt-get install linux-generic
    

    在/etc/default/grub目录中,确保

    GRUB_DEFAULT='1>Ubuntu, with Linux 3.13.0-100-generic'
    GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on iommu=pt intremap=on"
    
    (compute-node)# update-grub
    (compute-node)# reboot
    

    安装NFP所需项

    (compute-node)# apt-get install dkms libftdi1 libjansson4
    

    下载Netronome(Agilio vRouter)软件包

    (compute-node)# tar -xvf ns-agilio-vrouter-release_3.1.0.0-124.tgz 
    (compute-node)# cd ns-agilio-vrouter-release_3.1.0.0-124/
    

    安装NFP软件包

    (compute-node)# dpkg -i nfp-bsp-6000-b0*
    (compute-node)# ldconfig
    

    刷新SmartNIC

    (compute-node)# /opt/netronome/bin/nfp-flash -P --i-accept-the-risk-of-overwriting-miniloader -w /opt/netronome/flash/flash-nic.bin 
    (compute-node)# /opt/netronome/bin/nfp-one
    (compute-node)# reboot
    

    安装核心网卡程序包

    (compute-node)# cd ns-agilio-vrouter-release_3.1.0.0-124/
    (compute-node)# dpkg -i ns-agilio-core-nic*.deb
    

    如果您使用的是分支电缆(4×10GbE → 1×40GbE),请更改SmartNIC的media配置。

    This should create four NFP interfaces: nfp_p0, nfp_p1, nfp_p2, nfp_p3
    
    (compute-node)# /opt/netronome/bin/nfp-media --set-media=phy0=4x10G
    (compute-node)# service ns-core-nic.autorun clean
    (compute-node)# reboot
    

    使用新计算节点的信息填充测试平台

    (controller-node)# vim /opt/contrail/utils/fabfile/testbeds/testbed.py
    
             bond= {
                 compute3 : { 'name': 'bond0', 'member': ['nfp_p0','nfp_p1','nfp_p2','nfp_p3'], 'mode': '802.3ad',    
                           'xmit_hash_policy': 'layer3+4' }
             }
    
             control_data = {
                 controller : { 'ip': '172.31.255.1/24', 'gw' : '172.31.255.1', 'device': 'eth1' },
                 compute3 : { 'ip': '172.31.255.4/24', 'gw' : '172.31.255.1', 'device': 'bond0' }
             }
    
             env.ns_agilio_vrouter = {
                 compute3: {'huge_page_alloc': '24G', 'huge_page_size': '1G', 'coremask': '2,4', 'pinning_mode': 
                             'auto:split'},
             }
    

    示例文件请见:
    https://github.com/savithruml/netronome-agilio-vrouter/tree/3.1.2/testbed

    安装Tungsten Fabric

    (controller-node)# cd /opt/contrail/utils
     (controller-node)# fab install_pkg_node:/tmp/contrail-install-packages*.deb,root@
     (controller-node)# ssh root@ "cd /opt/contrail/contrail_packages; ./setup.sh"
    
     (controller-node)# scp /tmp/ns-agilio-vrouter-depends-packages*.deb root@::/opt/contrail/contrail_install_repo/
     (controller-node)# fab install_pkg_node:/tmp/ns-agilio-vrouter-depends-packages*.deb,root@
     (controller-node)# ssh root@ "cd /opt/contrail/contrail_packages_ns_agilio_vrouter; ./setup.sh"
     (controller-node)# ssh root@ "cd /opt/contrail/contrail_install_repo; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz; apt-get update"
    
     (controller-node)# fab add_vrouter_node:root@
    

    (注:文中Contrail以功能一致的Tungsten Fabric替换)

    原文链接:https://savithru.me/netronome-agilio-vrouter/



  • ns-agilio-vrouter-release_3.1.0.0-124.tgz 哪里有下载


Log in to reply