安装瞻博网络云原生路由器
总结 瞻博网络云原生路由器 (JCNR) 使用 JCNR-Controller(基于 cRPD 的控制平面)和 JCNR-CNI 提供控制平面功能和容器网络接口。瞻博网络云原生路由器使用支持 DPDK 的 vRouter 提供高性能数据平面功能和 Syslog-NG 来提供通知功能。本节介绍如何安装云原生路由器的这些组件。
JCNR-Controller (cRPD) 是一种初始化容器,可为云原生路由器提供控制平面功能。控制平面负责调配瞻博网络云原生路由器中使用的工作负载和结构接口。它还通过 gRPC 连接管理与 vRouter 代理和 vRouter 本身的通信。
JCNR-CNI 是瞻博网络云原生路由器用于与服务器和 Pod 及容器网络接口上的物理接口通信的容器网络接口。
瞻博网络云原生路由器虚拟路由器 (vRouter) 是一种容器应用程序集,可提供高级转发平面功能。它将网络从物理路由器和交换机扩展为虚拟化服务器中托管的虚拟叠加网络。数据平面开发套件 (DPDK) 使 vRouter 能够处理比 vRouter 作为内核模块运行时更多的数据包。
Syslog-NG 是一种容器应用程序,允许瞻博网络云原生路由器向用户提供有关云原生路由器部署中事件的通知。
使用 Helm 图表安装瞻博网络云原生路由器
阅读本节,了解使用 Helm 图表将云原生路由器映像组件加载到 docker 和安装云原生路由器组件所需的步骤。
如 系统资源要求中所述,必须先安装 Kubernetes 的 Helm 包管理器,之后才能安装瞻博网络云原生路由器组件。
我们不提供您必须下载软件包和安装软件的特定路径。因此,您可以将整个文档中显示的命令复制并粘贴到服务器的 CLI 中。
瞻博网络云原生路由器安装的高级概述是:
下面详细介绍了上述每个高级过程
- 将 tarball(Juniper_Cloud_Native_Router_<release-number>.tgz)下载到您选择的目录中。
如何将数据中心输入服务器上的可写目录,由您决定。您必须以二进制模式执行文件传输,以便压缩焦油文件将正确扩展。
- 扩展文件
Juniper_Cloud_Native_Router_<release-number>.tgz
。tar xzvf Juniper_Cloud_Native_Router_<release-number>.tgz
Juniper_Cloud_Native_Router_22.3/ Juniper_Cloud_Native_Router_22.3/secrets/ Juniper_Cloud_Native_Router_22.3/secrets/jcnr-secrets.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/Chart.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/values.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/.helmignore Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/Chart.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/templates/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/templates/_helpers.tpl Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/templates/jcnrvrouter_cleanup.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/templates/vrouter.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/values.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-vrouter/README.md Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/.helmignore Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/Chart.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/files/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/files/syslog-ng.conf Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/templates/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/templates/_helpers.tpl Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/templates/syslog.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/templates/syslog-config.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/syslog-ng/values.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/.helmignore Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/Chart.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/files/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/files/jcnr-cni-config.tmpl Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/templates/ Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/templates/_helpers.tpl Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/templates/jcnr-config.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/templates/jcnr_cleanup.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/templates/jcnr.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/templates/jcnr-nad.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/values.yaml Juniper_Cloud_Native_Router_22.3/helm_charts/jcnr/charts/jcnr-cni/README.md Juniper_Cloud_Native_Router_22.3/contrail-tools/ Juniper_Cloud_Native_Router_22.3/contrail-tools/contrail-tools.yaml Juniper_Cloud_Native_Router_22.3/images/ Juniper_Cloud_Native_Router_22.3/images/jcnr-cni-images.tar.gz Juniper_Cloud_Native_Router_22.3/images/jcnr-vrouter-images.tar.gz Juniper_Cloud_Native_Router_22.3/images/syslog-ng-images.tar.gz Juniper_Cloud_Native_Router_22.3/README.md
- 将目录更改为 Juniper_Cloud_Native_Router_22.3
cd Juniper_Cloud_Native_Router_22.3
注意:安装中的所有剩余步骤假设您当前的工作目录现在 Juniper_Cloud_Native_Router_22.3。
- 将图像文件、
jcnr-cni-images.tar.gz
jcnr-vrouter-images.tar.gz 和 syslog-ng-images.tar.gz 加载到 docker 中。图像文件位于Juniper_Cloud_Native_Router_22.3/图像目录中,相对于您在前一步中扩展 tarball 的位置。docker load -i images/jcnr-cni-images.tar.gz
94c4181ae7dd: Loading layer [==================================================>] 524.2MB/524.2MB Loaded image: svl-artifactory.juniper.net/junos-docker-local/warthog/crpd:22.3R1-S1.5 86441b6792e3: Loading layer [==================================================>] 160.3kB/160.3kB 2f858df19dda: Loading layer [==================================================>] 26.74MB/26.74MB dc5b9d2f0f0a: Loading layer [==================================================>] 7.68kB/7.68kB Loaded image: svl-artifactory.juniper.net/junos-docker-local/warthog/jcnr-cni:20220810-f753972 67e3ffed6327: Loading layer [==================================================>] 11.26kB/11.26kB Loaded image: svl-artifactory.juniper.net/junos-docker-local/warthog/crpdconfig-generator:v3 Loaded image: svl-artifactory.juniper.net/atom_virtual_docker/busybox:latest
docker load -i images/jcnr-vrouter-images.tar.gz
50244b5caf0a: Loading layer [==================================================>] 3.584kB/3.584kB 4793f35d3ae7: Loading layer [==================================================>] 5.632kB/5.632kB f1697a784d3d: Loading layer [==================================================>] 3.584kB/3.584kB 9d6c27fd1364: Loading layer [==================================================>] 28.79MB/28.79MB 877da3dd69a5: Loading layer [==================================================>] 11.26kB/11.26kB f3519070976e: Loading layer [==================================================>] 1.396MB/1.396MB 145f8619ed40: Loading layer [==================================================>] 183.5MB/183.5MB d4fe4ae73ff1: Loading layer [==================================================>] 6.812MB/6.812MB 9a9e214f9045: Loading layer [==================================================>] 2.467MB/2.467MB 2c026bac5448: Loading layer [==================================================>] 41.59MB/41.59MB 8f873ca42faf: Loading layer [==================================================>] 40.13MB/40.13MB b6e9fea633a7: Loading layer [==================================================>] 72.19kB/72.19kB 19234c4cbb31: Loading layer [==================================================>] 498.2kB/498.2kB f9c52ee9be26: Loading layer [==================================================>] 18.66MB/18.66MB Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-vrouter-agent:JCNR-22.3-6 8d7366c22fd8: Loading layer [==================================================>] 3.697MB/3.697MB a93413564615: Loading layer [==================================================>] 18.29MB/18.29MB 415be476c298: Loading layer [==================================================>] 1.352MB/1.352MB e83d4114481d: Loading layer [==================================================>] 2.365MB/2.365MB 623e9ce88f39: Loading layer [==================================================>] 2.81MB/2.81MB f4e7db2826f6: Loading layer [==================================================>] 54.39MB/54.39MB Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-vrouter-kernel-init-dpdk:JCNR-22.3-6 4aa40b94fdb4: Loading layer [==================================================>] 5.632kB/5.632kB 2079da3dd3ea: Loading layer [==================================================>] 250.6MB/250.6MB 5f6b6a83bbc2: Loading layer [==================================================>] 22.02kB/22.02kB 3c479d39cdd2: Loading layer [==================================================>] 13.82kB/13.82kB a8e86ba6a002: Loading layer [==================================================>] 9.216kB/9.216kB ce903f8e71cc: Loading layer [==================================================>] 25.03MB/25.03MB 8b94a98d6508: Loading layer [==================================================>] 372.5MB/372.5MB Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-tools:JCNR-22.3-6 Loaded image: svl-artifactory.juniper.net/atom_virtual_docker/busybox:latest Loaded image: svl-artifactory.juniper.net/junos-docker-local/warthog/busybox:latest Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-telemetry-exporter:JCNR-22.3-6 cfd97936a580: Loading layer [==================================================>] 1.455MB/1.455MB Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/busybox:latest 1e7fbcfd6526: Loading layer [==================================================>] 6.144kB/6.144kB 1b2e64d61760: Loading layer [==================================================>] 182.2MB/182.2MB c58c4d0e394a: Loading layer [==================================================>] 68.61kB/68.61kB ae3bac1d08f4: Loading layer [==================================================>] 4.608kB/4.608kB 173cf86d714f: Loading layer [==================================================>] 720.9kB/720.9kB 7c5fc69220bb: Loading layer [==================================================>] 4.608kB/4.608kB fc23189a25c0: Loading layer [==================================================>] 4.608kB/4.608kB 9e4ba1a88748: Loading layer [==================================================>] 44.09MB/44.09MB 999a87d50c2c: Loading layer [==================================================>] 54.22MB/54.22MB b7247dc2bdc4: Loading layer [==================================================>] 478.7kB/478.7kB Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-vrouter-dpdk:JCNR-22.3-6 e94ef981fc21: Loading layer [==================================================>] 63.51MB/63.51MB Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-k8s-crdloader:JCNR-22.3-6 Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-k8s-applier:JCNR-22.3-6 a5af639475d7: Loading layer [==================================================>] 59.58MB/59.58MB Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-k8s-deployer:JCNR-22.3-6 da2cd5786adc: Loading layer [==================================================>] 62.68MB/62.68MB Loaded image: svl-artifactory.juniper.net/atom-docker/cn2/bazel-build/dev/contrail-init:JCNR-22.3-6
docker load -i images/syslog-ng-images.tar.gz
Loaded image: svl-artifactory.juniper.net/contrail-docker/syslog-ng:v6
- 将主机服务器和瞻博网络云原生路由器许可证文件的 root 密码输入密钥/jcnr-secrets.yaml 文件。
您必须以基本 64 编码格式输入密码和许可证。要对密码进行编码,请创建仅在单行中具有纯文本密码的文件。然后发出 命令:
base64 rootPasswordFile
输出为单行随机查找文本,类似于:UGFzc3cwcmQhCg==
要对许可证文件进行编码,请将文件复制到主机服务器上并发出 以下命令:base64 licenseFile
输出是一长行随机查找文本,类似于:VGhpcyBpcyBhIHJlYWxseSBtdWNoIGxvbmdlciB0ZXh0IGZpbGUgdGhhdCBpbmNsdWRlcyBsaWNlbnNlIGluZm9ybWF0aW9uCkFTREZERktERktIQUxHS0hiYW9qa2hkZmFzZGZOS0FTREdOR0FKYWRzZmxodmFibmRzZmdramh2Ym5ramFzZnVxYmF1amgyMDEwdGIydDQweGtqYjR3eTB1dmRxd3J2MGl3aGV0Ymd1YnMwcWRqZmhkc2tqdmJkc2ZramhkdmFkZnNiO2d2a2pzZGI7aWRzamc7ZmFzZGhma2pkc2J2YWlzdWRmZ3dFWUlUR1ZCMzlWRVlCVjM0OVVHQlZHQlFVOUFXR1ZJQkVSV0c5VUJWV0U5Rwo=
注意:您必须从客户团队处获取许可证文件,并按照上述说明将其安装在 机密.yaml 文件中。如果没有 机密.yaml 文件中正确的基本 64 编码许可证文件和 root 密码,cRPD Pod 不会进入运行状态,但仍然处于 CrashLoopBackOff 状态。
您必须复制基本 64 输出,并将其粘贴到相应位置的秘密 /jcnr-secrets.yaml 文件中。 - 将机密/jcnr-secrets.yaml 应用于 K8s 系统
kubectl apply -f secrets/jcnr-secrets.yaml
- 编辑helm_charts/jcnr/values.yaml 文件。
您必须自定义瞻博网络云原生路由器安装的 Helm 图表:
-
选择交换矩阵接口 – 使用主机系统中的接口名称
-
为中继接口创建 VLAN ID 列表 –使用适合您网络的 VLAN ID
-
从主机系统中选择结构工作负载接口-使用接口名称
-
为工作负载接口上的流量设置 VLAN ID
-
设置 JCNR-vRouter 日志记录的严重性级别
注意:将log_level设置为 INFO,除非 JTAC 指示更改此信息。
-
设置 cpu 核心掩码– 物理核心、逻辑核心
-
选择结构接口 – 使用主机系统中的接口名称
-
选择工作负载接口 – 使用主机系统中的接口名称
-
为每秒以字节为单位的广播和组播流量设置速率限制
-
为 syslog-ng 设置可写目录位置以存储通知
-
(可选)如果指定了一个键接口作为您的
fabricInterface:
,请在该节下提供slaveInterface
系统中的bondInterfaceConfigs:
名称。 -
默认情况下
restoreInterface
设置为错误。在此设置中,当 vrouter Pod 崩溃或被删除时,接口将不会恢复为主机。
注意:如果您使用 Intel XL710 NIC,则必须在
值.yaml 文件。ddp=false
有关默认helm_charts/jcnr/values.yaml 文件的已评论示例,请参阅示例配置文件。
-
- 使用 Helm 部署瞻博网络云原生路由器
helm install jcnr .
NAME: jcnr LAST DEPLOYED: Mon Aug 15 14:29:41 2022 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None
- 确认瞻博网络云原生路由器部署
helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION jcnr default 1 2022-08-17 18:51:18.472130634 -0700 PDT deployed jcnr-22.3.0 22.3.0
验证容器的操作
kubectl get pods -A
命令的kubectl
输出显示所有名称空间中的 K8s 群集中的所有 Pod。成功部署意味着所有 Pod 都显示它们处于运行状态。在此示例中,我们 粗体标记了瞻博网络云原生路由器 Pods。例如:kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE contrail-deploy contrail-k8s-deployer-7b5dd699b9-nd7xf 1/1 Running 0 41m contrail contrail-vrouter-masters-dfxgm 3/3 Running 0 41m default delete-crpd-dirs--1-6jmxz 0/1 Completed 0 43m default delete-vrouter-dirs--1-645dt 0/1 Completed 0 43m kube-system calico-kube-controllers-57b9767bdb-5wbj6 1/1 Running 2 (92d ago) 129d kube-system calico-node-j4m5b 1/1 Running 2 (92d ago) 129d kube-system coredns-8474476ff8-fpw78 1/1 Running 2 (92d ago) 129d kube-system dns-autoscaler-7f76f4dd6-q5vdp 1/1 Running 2 (92d ago) 129d kube-system kube-apiserver-5a5s5-node2 1/1 Running 3 (92d ago) 129d kube-system kube-controller-manager-5a5s5-node2 1/1 Running 4 (92d ago) 129d kube-system kube-crpd-worker-ds-8tnf7 1/1 Running 0 41m kube-system kube-multus-ds-amd64-4zm5k 1/1 Running 2 (92d ago) 129d kube-system kube-proxy-l6xm8 1/1 Running 2 (92d ago) 129d kube-system kube-scheduler-5a5s5-node2 1/1 Running 4 (92d ago) 129d kube-system nodelocaldns-6kwg5 1/1 Running 2 (92d ago) 129d kube-system syslog-ng-54749b7b77-v24hq 1/1 Running 0 41m
kubectl get ds -A
使用 kubectl get ds-A 命令获取守护程序容器列表。kubectl get ds -A
NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE contrail contrail-vrouter-masters 1 1 1 1 1 node-role.kubernetes.io/master= 43m kube-system calico-node 1 1 1 1 1 kubernetes.io/os=linux 129d kube-system kube-crpd-worker-ds 1 1 1 1 1 <none> 43m kube-system kube-multus-ds-amd64 1 1 1 1 1 kubernetes.io/arch=amd64 129d kube-system kube-proxy 1 1 1 1 1 kubernetes.io/os=linux 129d kube-system nodelocaldns 1 1 1 1 1 kubernetes.io/os=linux 129d