샘플 구성 파일
이 섹션을 읽고 주니퍼 클라우드 네이티브 라우터 구축에 사용할 샘플 YAML 구성 파일을 찾아보십시오. 이러한 YAML 파일은 배포 지침에 영향을 주어 클라우드 네이티브 라우터에서 사용할 수 있는 기능을 제어합니다. 워크로드 구성을 위한 YAML 파일도 포함되어 있습니다. 워크로드 구성 파일은 워크로드 기능을 제어합니다.
다음과 같은 샘플 구성 파일이 포함되어 있습니다.
- 주니퍼 클라우드 네이티브 라우터 기본 구성 파일
-
- 메인
values.yaml
파일
- 메인
- 주니퍼 클라우드 네이티브 라우터 vRouter별 구성 파일
- 주니퍼 클라우드 네이티브 라우터 JCNR-CNI 특정 구성 파일
- 워크로드 구성 파일
이 파일을 사용하여 주니퍼 클라우드 네이티브 라우터 구축에 사용할 수 있는 구성 옵션을 이해할 수 있습니다. 워크로드 구성 파일에는 트렁크 및 액세스 인터페이스를 구성하고 각 유형에 대해 다양한 VLAN을 구성하는 방법이 표시됩니다. 각 파일에는 해시 표시(#)로 시작하고 이 예제에서 굵 게 강조 표시된 주석이 포함되어 있습니다.
-
values.yaml
이것은 기본 values.yaml 파일입니다. TAR 파일에는 3개의 다른 values.yaml 파일이 제공됩니다. 각 설치 구성 요소에 대한 1 values.yaml : jcnr-cni, jcnr-vrouter 및 syslog-ng.
개별 values.yaml 파일과 기본 values.yaml 파일 간에 충돌하는 설정이 있는 경우 기본 values.yaml 파일의 설정이 우선합니다.
#################################################################### # Common Configuration (global vars) # #################################################################### global: registry: svl-artifactory.juniper.net/ # uncomment below if all images are available in the same path; it will # take precedence over "repository" paths under "common" section below #repository: path/to/allimages/ common: vrouter: repository: atom-docker/cn2/bazel-build/dev/ tag: JCNR-22.3-6 crpd: repository: junos-docker-local/warthog/ tag: 22.3R1.8 jcnrcni: repository: junos-docker-local/warthog/ tag: 20220918-4adf886 # defines the log severity. Possible options: DEBUG, INFO, WARN, ERR log_level: "INFO" # "log_path": this directory will contain various jcnr related descriptive logs # such as contrail-vrouter-agent.log, contrail-vrouter-dpdk.log etc. log_path: "/var/log/jcnr/" # "syslog_notifications": absolute path to the file that will contain syslog-ng # generated notifications in json format syslog_notifications: "/var/log/jcnr/jcnr_notifications.json" # fabricInterface: NGDU or tor side interface, expected all types # of traffic; interface_mode is always trunk for this mode fabricInterface: - bond0: interface_mode: trunk vlan-id-list: [100, 200, 300, 700-705] # fabricWorkloadInterface: RU side interfaces, expected traffic is only # management/control traffic; interface mode is always access for this mode fabricWorkloadInterface: - enp59s0f1v0: interface_mode: access vlan-id-list: [700] jcnr-vrouter: # restoreInterfaces: setting this to true will restore the interfaces # back to their original state in case vrouter pod crashes or restarts restoreInterfaces: false # bond interface configurations bondInterfaceConfigs: - name: "bond0" mode: 1 # ACTIVE_BACKUP MODE -- This is the only supported mode slaveInterfaces: - "enp59s0f0v0" - "enp59s0f0v1" # MTU for all physical interfaces( all VF’s and PF’s) mtu: "9000" # vrouter fwd core mask cpu_core_mask: "2,3" # rate limit for broadcast/multicast traffic on fabric interfaces in bytes per second fabricBMCastRateLimit: 0 # Set ddp to true to enable Dynamic Device Personalization (DDP) # It provides datapath optimization at NIC for traffic like GTPU, SCTP etc. ddp: true #set to false if you use the Intel XL710 NIC
-
jcnr-vrouter 특정
values.yaml
이 values.yaml 파일은 jcnr-vrouter Pod에 특정합니다. Juniper_Cloud_Native_Router_<release-number>/helm_charts/jcnr/charts/jcnr-vrouter 디렉토리 아래에 있습니다. 이 파일에 기본 values.yaml 파일의 값과 충돌하는 값을 입력하면 기본 values.yaml 파일의 값이 우선합니다.
# # This is a YAML-formatted file. # # Declare variables to be passed into your templates. common: registry: svl-artifactory.juniper.net/ repository: atom-docker/cn2/bazel-build/dev/ # anchor tag for vrouter container images vrouter-tag: &vrouter_tag JCNR-22.3-6 contrail_init: image: contrail-init tag: *vrouter_tag pullPolicy: IfNotPresent contrail_vrouter_kernel_init_dpdk: image: contrail-vrouter-kernel-init-dpdk tag: *vrouter_tag pullPolicy: IfNotPresent contrail_vrouter_agent: image: contrail-vrouter-agent tag: *vrouter_tag pullPolicy: IfNotPresent contrail_vrouter_agent_dpdk: image: contrail-vrouter-dpdk tag: *vrouter_tag pullPolicy: IfNotPresent resources: limits: memory: 4Gi hugepages-1Gi: 4Gi # Hugepages must be enabled with default size as 1G; minimum 4Gi to be used requests: memory: 4Gi hugepages-1Gi: 4Gi contrail_vrouter_telemetry_exporter: image: contrail-telemetry-exporter tag: *vrouter_tag pullPolicy: IfNotPresent contrail_k8s_deployer: image: contrail-k8s-deployer tag: *vrouter_tag pullPolicy: IfNotPresent contrail_k8s_crdloader: image: contrail-k8s-crdloader tag: *vrouter_tag pullPolicy: IfNotPresent contrail_k8s_applier: image: contrail-k8s-applier tag: *vrouter_tag pullPolicy: IfNotPresent busyBox: image: busybox tag: "latest" pullPolicy: IfNotPresent vrouter_name: master # uio driver will be vfio-pci or uio_pci_generic vrouter_dpdk_uio_driver: "vfio-pci" # MTU for all physical interfaces( all VF’s and PF’s) mtu: "9000" vrouter_log_path: "/var/log/jcnr/" # Defines the log severity. Possible options: DEBUG, INFO, WARN, ERR log_level: "INFO" dpdkCommandAdditionalArgs: "--yield_option 0" # Set ddp to true to enable Dynamic Device Personalization (DDP) # It provides datapath optimization at NIC for traffic like GTPU, SCTP etc. ddp: true # vrouter fwd core mask cpu_core_mask: "2,3" # vrouter service thread mask service_core_mask: "" # vrouter control thread mask dpdk_ctrl_thread_mask: "" # dpdk_mem_per_socket: "1024" # L3 disabled for switching mode jcnr_mode: "l2_only" # global Mac table size - We recommend leaving this at the default value mac_table_size: "10240" # timeout (seconds) for aging Mac table entries (S) mac_table_ageout: 60 # parameters for vRouter livenessProbe livenessProbe: initialDelaySeconds: 10 periodSeconds: 20 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 # parameters for vRouter startupProbe startupProbe: initialDelaySeconds: 10 periodSeconds: 20 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 # setting this to true will restore the interfaces back to # their original state in case vrouter pod crashes or restarts restoreInterfaces: false # tor side interface, expected all types of traffic fabricInterface: - enp4s0f0vf0 - bond0 # RU side interfaces, expected traffic is only management/control traffic fabricWorkloadInterface: - enp4s0f1vf0 # bond interface configurations bondInterfaceConfigs: - name: "bond0" mode: 1 # ACTIVE_BACKUP MODE slaveInterfaces: - "enp1s0f1" - "enp2s0f1" # rate limit for broadcast/multicast traffic on fabric interfaces in bytes per second fabricBMCastRateLimit: 0
-
JCNR-CNI별
values.yaml
이 values.yaml 파일은 jcnr-cni 파드에 특정한다. jcnr-cni specfic values.yaml 파일은 Juniper_Cloud_Native_Router_<release-number>/helm_charts/jcnr/charts/jcnr-cni 디렉토리 아래에 있습니다. 이 파일에 기본 values.yaml 파일의 값과 충돌하는 값을 입력하면 기본 values.yaml 파일의 값이 우선합니다.
# Default values for jcnr. # This is a YAML-formatted file. # Declare variables to be passed into your templates. common: registry: svl-artifactory.juniper.net/ repository: junos-docker-local/warthog/ crpdImage: image: crpd tag: "22.3R1.8" pullPolicy: IfNotPresent jcnrCNIImage: image: jcnr-cni tag: "20220918-fadf886" pullPolicy: IfNotPresent crpdConfigGeneratorImage: image: crpdconfig-generator tag: "v3" pullPolicy: IfNotPresent busyBox: image: busybox tag: "latest" pullPolicy: IfNotPresent #data plane default is dpdk for vrouter case, linux for kernel module dataplane: dpdk networkAttachmentDefinitionName: vswitch crpd_log_path: "/var/log/jcnr/" # Defines the log severity. Possible options: panic, fatal, error, # warn or warning, info, debug, trace log_level: "info" # parameters for cRPD livenessProbe livenessProbe: initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 # parameters for cRPD startupProbe startupProbe: initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 crpdConfigs: interface_groups: fabricInterface: # TOR side interface, expected all types of traffic - bond0: interface_mode: trunk # interface mode is always trunk for fabricInterface vlan-id-list: [100, 200, 700] # vlan-id-lists - enp4s0f0vf0: interface_mode: trunk # interface mode is always trunk for fabricInterface vlan-id-list: [300, 500, 3001, 3002] # vlan-id-lists - enp4s0f0vf1: interface_mode: trunk # interface mode is always trunk for fabricInterface vlan-id-list: [3003, 3004, 3201-3250, 900] # vlan-id-lists - enp4s0f0vf2: interface_mode: trunk # interface mode is always trunk for fabricInterface vlan-id-list: [3251-3255] # vlan-id-lists fabricWorkloadInterface: # RU side interfaces, expected traffic is only management/control traffic - enp4s0f1vf0: interface_mode: access # interface mode is always access for fabricWorkloadInterface vlan-id-list: [700] # vlan-id-list must always be a single value for fabricWorkloadInterface - enp4s1f1vf0: interface_mode: access # interface mode is always access for fabricWorkloadInterface vlan-id-list: [900] # vlan-id-list must always be a single value for fabricWorkloadInterface routing_instances: - vswitch: instance-type: virtual-switch
-
nad-dpdk_trunk_vlan_3002.yaml
apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: nad-vswitch-bd3002 spec: config: '{ "cniVersion":"0.4.0", "name": "nad-vswitch-bd3002", "capabilities":{"ips":true}, "plugins": [ { "type": "jcnr", "args": { "instanceName": "vswitch", "instanceType": "virtual-switch", "bridgeDomain": "bd3002", "bridgeVlanId": "3002", "dataplane":"dpdk", "mtu": "9000" }, "ipam": { "type": "static", "capabilities":{"ips":true}, "addresses":[ { "address":"2001:db8:3002::10.2.0.1/64", "gateway":"2001:db83002::10.2.0.254" }, { "address":"10.2.0.1/24", "gateway":"10.2.0.254" } ] }, "kubeConfig":"/etc/kubernetes/kubelet.conf" } ] }'
-
nad-kernel_access_vlan_3001.yaml
apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: pod1-vswitch-bd3001-1 spec: config: '{ "cniVersion":"0.4.0", "name": "pod1-vswitch-bd3001-1", "capabilities":{"ips":true}, "plugins": [ { "type": "jcnr", "args": { "instanceName": "vswitch", "instanceType": "virtual-switch", "bridgeDomain": "bd3001", "bridgeVlanId": "3001", "dataplane":"dpdk", "mtu": "9000", "interfaceType":"veth" }, "ipam": { "type": "static", "capabilities":{"ips":true}, "addresses":[ { "address":"2001:db8:3001::10.1.0.1/64", "gateway":"2001:db8:3001::10.1.0.254" }, { "address":"10.1.0.1/24", "gateway":"10.1.0.254" } ] }, "kubeConfig":"/etc/kubernetes/kubelet.conf" } ] }'
-
nad-odu-bd3003-sub.yaml
apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: vswitch-bd3003-sub spec: config: '{ "cniVersion":"0.4.0", "name": "vswitch-bd3003-sub", "capabilities":{"ips":true}, "plugins": [ { "type": "jcnr", "args": { "instanceName": "vswitch", "instanceType": "virtual-switch", "bridgeDomain": "bd3003", "bridgeVlanId": "3003", "parentInterface":"net1", "interface":"net1.3003", "dataplane":"dpdk" }, "ipam": { "type": "static", "capabilities":{"ips":true}, "addresses":[ { "address":"10.3.0.1/24", "gateway":"10.3.0.254" }, { "address":"2001:db8:3003::10.3.0.1/120", "gateway":"2001:db8:3003::10.3.0.1" } ] }, "kubeConfig":"/etc/kubernetes/kubelet.conf" } ] }'
-
nad-odu-bd3004-sub.yaml
apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: vswitch-bd3004-sub spec: config: '{ "cniVersion":"0.4.0", "name": "vswitch-bd3004-sub", "capabilities":{"ips":true}, "plugins": [ { "type": "jcnr", "args": { "instanceName": "vswitch", "instanceType": "virtual-switch", "bridgeDomain": "bd3004", "bridgeVlanId": "3004", "parentInterface":"net1", "interface":"net1.3004", "dataplane":"dpdk" }, "ipam": { "type": "static", "capabilities":{"ips":true}, "addresses":[ { "address":"30.4.0.1/24", "gateway":"30.4.0.254" }, { "address":"2001:db8:3004::10.4.0.1/120", "gateway":"2001:db8:3004::10.4.0.1" } ] }, "kubeConfig":"/etc/kubernetes/kubelet.conf" } ] }'
-
odu-virtio-subinterface.yaml
apiVersion: v1 kind: Pod metadata: name: odu-subinterface-1 annotations: k8s.v1.cni.cncf.io/networks: | [ { "name": "vswitch-bd3003-sub" }, { "name": "vswitch-bd3004-sub" } ] spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 5d7s39.englab.juniper.net containers: - name: odu-subinterface image: svl-artifactory.juniper.net/junos-docker-local/warthog/pktgen19116:subint imagePullPolicy: IfNotPresent securityContext: privileged: false resources: requests: memory: 2Gi limits: hugepages-1Gi: 2Gi env: - name: KUBERNETES_POD_UID valueFrom: fieldRef: fieldPath: metadata.uid volumeMounts: - name: dpdk mountPath: /dpdk subPathExpr: $(KUBERNETES_POD_UID) - mountPath: /dev/hugepages name: hugepage volumes: - name: dpdk hostPath: path: /var/run/jcnr/containers - name: hugepage emptyDir: medium: HugePages
-
pod-dpdk-trunk-vlan3002.yaml
apiVersion: v1 kind: Pod metadata: name: odu-trunk-1 annotations: k8s.v1.cni.cncf.io/networks: nad-vswitch-bd3002 spec: containers: - name: odu-trunk image: svl-artifactory.juniper.net/junos-docker-local/warthog/pktgen19116:trunk imagePullPolicy: IfNotPresent securityContext: privileged: true resources: requests: memory: 2Gi limits: hugepages-1Gi: 2Gi env: - name: KUBERNETES_POD_UID valueFrom: fieldRef: fieldPath: metadata.uid volumeMounts: - name: dpdk mountPath: /dpdk subPathExpr: $(KUBERNETES_POD_UID) - mountPath: /dev/hugepages name: hugepage volumes: - name: dpdk hostPath: path: /var/run/jcnr/containers - name: hugepage emptyDir: medium: HugePages
-
pod-kernel-access-vlan-3001.yaml
apiVersion: v1 kind: Pod metadata: name: odu-kenel-pod-bd3001-1 annotations: k8s.v1.cni.cncf.io/networks: pod1-vswitch-bd3001-1 spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 5d8s7.englab.juniper.net containers: - name: odu-kenel-pod-bd3001-1 image: vinod-iperf3:latest imagePullPolicy: IfNotPresent command: ["/bin/bash","-c","sleep infinity"] securityContext: privileged: false env: - name: KUBERNETES_POD_UID valueFrom: fieldRef: fieldPath: metadata.uid volumeMounts: - name: dpdk mountPath: /dpdk subPathExpr: $(KUBERNETES_POD_UID) volumes: - name: dpdk hostPath: path: /var/run/jcnr/containers