如何使用NVIDIA建立纯声波图像

pure sonic 是 sonic 的版本,它消除了对供应商的依赖。社区开发、公开可用和 100% 开源使您能够构建与所需社区分支同步的纯 sonic 映像。这意味着 sonic 的每一行代码和 sai ( switch abstraction interface )的 nvidia 实现只需点击一下 主映像 。
nvidia 当您选择 pure sonic 时,我们将致力于您的成功。为了确保 pure sonic 得到强化和限定, nvidia 建议使用特定的公共哈希来构建映像,这是一种在特定时间点对 git 存储库进行快照的机制。通过广泛的 qa ,在所有 nvidia 平台上验证传递给用户的每个公共散列。此外, nvidia 承认需要有价值的文件。发行说明和用户手册与特定的公共哈希绑定。
建立一个纯粹的声波图像
下面是我如何建立我的纯声波图像,包括 ztp ,运行在我的 nvidia mellanox spectrum 开放式以太网交换机上。我的解决方案受到了关于 github 的 构建 sonic 交换机映像 教程的启发。默认情况下,在回购的 生成配置文件 中禁用 ztp 。
spectrum 交换机预装了 onie ( open network install environment ),这是一个引导加载程序,提供了在裸机交换机系统上安装任何网络操作系统的环境。 onie 允许最终用户自动安装网络操作系统,作为数据中心配置的一部分,类似于 onie 交换机管理 linux 服务器的方式。
我的构建服务器由 24 核 cpu 、 250 gb 构建存储和 64 gb ram 组成,运行在 ubuntu16.04 上, docker 版本 18.03.0-ce 、 python 和 jinja2 。我发现我的构建配置至少需要 100 gb 的可用磁盘空间。最终的构建目录消耗了大约 30gb 。在构建时间对业务至关重要的情况下,我建议升级 cpu 和 ram 以允许更多的内核并行工作,从而缩短构建时间。
出于自动化和代码重用的目的,我将代码分为三个短文件:
build.cfg :初始化公共环境变量并由其他文件进行源处理。
gitsonic.sh :获取公共 git 存储库源代码。
build.sh :执行生成。
运行脚本执行构建过程。
第一步:创建 build.cfg
# an example to hash that was qualified by nvidiasonicbranch=201911commithash=bea968bbldbranch=${sonicbranch}build_number=00005let bldnum=${build_number} #ztp is disabled by default per community decision. i found it useful to enable in my build, more#options are available in the file ./rules/configenable_ztp=y sonic_image_version=sonic.${sonicbranch}.${bldnum}-${commithash}_internalsonic_override_build_vars='sonicimage_version=sonic.${sonicbranch}.${bldnum}-${commithash}_internalbuild_number=${bldnum} enable_ztp=y'blddir=./sonic-buildimage_${bldbranch}_${build_number}_${commithash}_ztp 第二步:创建 sonicgit.sh#!/bin/bashsource ./build.cfg if [ -d ${blddir} ];then   echo directory sonic-buildimage already exists, aborting git   exit 1fi # git clone the top-level# source code from the public repository, sonicbranch=201911 git clone -b ${sonicbranch} https://github.com/azure/sonic-buildimage.git # move the cloned source to a build-specific named directory# avoid overwriting earlier versions that you may need.mv ./sonic-buildimage ${blddir} # if you are making any changes to the latest checked in branch, you must make# changes to the configuration.# because you are making changes, create a build branch based on the specific commit hash#this git branch information shows up in the build image,#when you run command $show version from the switch command line. cd ${blddir}git checkout -b ${bldbranch} ${commithash} # the git clone step only pulls the top-level module.# the underlying submodules must be recursively# init-ed and updated. git submodule update --init --recursive #display the statusecho ${blddir}git status | grep branch 第 3 步:创建 build.sh#!/bin/bash source ./build.cfg #helper functions start###function checkerrors(){    x=`grep -i -c ${1} ${2}`    if [ ${x} != 0 ];then       grep -i -n ${1} ${2}    fi} function dosetup(){  configztp=enable_ztp=${enable_ztp}  configsonic={$configztp}} function domakeconfig(){  #execute make configure once to configure asic  #make configure platform=[asic_vendor]  make configure platform=mellanox} # build sonic imagefunction domake(){  logfile=../logs/${blddir}.log  echo time makesonic_build_jobs=24 ${sonic_override_build_vars}target/sonic-mellanox.bin > ${logfile}  time make sonic_build_jobs=24 ${sonic_override_build_vars} target/sonic-mellanox.bin | tee ${logfile}  checkerrors fail ${logfile}  checkerrors warning ${logfile}  checkerrors error ${logfile}}#helper functions end### cd ${blddir}dosetupdomakeconfigdomake 概括
步骤 1-3 中描述的构建过程将生成启用 ztp 的纯声波图像。一些人会认为,这张图片展示了开放网络的最佳状态:构建一个开源操作系统,消除对供应商的依赖。
关于作者
yuval borenstein 是 nvidia 的以太网交换机产品经理。在此之前的几年里, borenstein 先生在 nvidia 担任过多个芯片设计职位,负责开发 infiniband 和以太网交换机。尤瓦尔拥有以色列理工学院电子工程学士学位和特拉维夫大学和西北大学的联合工商管理硕士学位。


图像处理怎么入门?
iOS11Beta2怎么样?苹果系统大改版,iOS11又增25个新特性,iOS11正式版和iPhone8一起来,你期待吗?
pcb表面涂层有什么优势劣势
TI的UCC21520驱动器实现业内最快的5.7k VRMS
中国移动与诺基亚等合作伙伴联合首发5G预商用核心网
如何使用NVIDIA建立纯声波图像
深度解析AP&CP AUTOSAR中的信息安全架构
PC VR及VR一体机的现状和未来总结分析
PI氮化镓的质量与可靠性介绍
Realtek瑞昱半导体在2009微软管理高峰会议中展出DA
JavaScript的基础知识和代码写法说明
鸿蒙2.0或在明年搭载于智慧穿戴中首次亮相
物联卡怎么用?物联卡与SIM卡有什么不同?
亚信科技与英特尔达成全球重磅合作,联合发布多款软硬一体产品
安森美半导体最新LED通用照明方案 即将亮相广州国际照明展
ELMOS推出基于E523.81的新一代三相直流无刷电机控制器芯片
llama.cpp代码结构&调用流程分析
现代化数据架构,当下企业的标配
智能科技未来的三大预测:开展更多协作
手机市场洗牌 华为、荣耀引领国产手机杀出血路