aboutsummaryrefslogtreecommitdiffstats
path: root/samples/vnf_samples/nsut/cmts/tc_k8s_pktgen_01.yaml
blob: cab8bb885917364cd183d9be359a023a2c14a740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
schema: yardstick:task:0.1
scenarios:
- type: NSPerf
  traffic_profile: ../../traffic_profiles/pktgen_throughput.yaml
  topology: cmts-tg-topology.yaml
  nodes:
    tg__0: trafficgen-k8syardstick
    vnf__0: vnf-k8syardstick
  options: {}
  runner:
    type: IterationIPC
    iterations: 10
    interval: 15
    timeout: 10000
context:
  name: k8syardstick
  type: Kubernetes

  servers:
    vnf:
      containers:
        - image: si-docker.ir.intel.com/vcmts-ubuntu/vcmts-pktgen-uepi
          args: ["/opt/bin/cmk isolate --conf-dir=/etc/cmk --socket-id=0 --pool=dataplane /vcmts/setup.sh anga_mac_1_ds.pcap ds"]
          env:
            - name: LUA_PATH
              value: "/vcmts/Pktgen.lua"
            - name: CMK_PROC_FS
              value: "/host/proc"
          resources:
            requests:
              pod.alpha.kubernetes.io/opaque-int-resource-cmk: "1"
          ports:
            - containerPort: 22022
          volumeMounts:
            - name: hugepages
              mountPath: /dev/hugepages
            - name: sysfs
              mountPath: /sys
            - name: sriov
              mountPath: /sriov-cni
            - name: host-proc
              mountPath: /host/proc
              readOnly: true
            - name: cmk-install-dir
              mountPath: /opt/bin
            - name: cmk-conf-dir
              mountPath: /etc/cmk
          securityContext:
            allowPrivilegeEscalation: true
            privileged: true

      node_ports:
        - name: lua  # Lower case alphanumeric characters or '-'
          port: 22022
      networks:
        - flannel
        - sriov01
      volumes:
        - name: hugepages
          hostPath:
            path: /dev/hugepages
        - name: sysfs
          hostPath:
            path: /sys
        - name: sriov
          hostPath:
            path: /var/lib/cni/sriov
        - name: cmk-install-dir
          hostPath:
            path: /opt/bin
        - name: host-proc
          hostPath:
            path: /proc
        - name: cmk-conf-dir
          hostPath:
            path: /etc/cmk

    trafficgen:
      containers:
        - image: si-docker.ir.intel.com/vcmts-ubuntu/vcmts-pktgen-uepi
          args: ["/opt/bin/cmk isolate --conf-dir=/etc/cmk --socket-id=0 --pool=dataplane /vcmts/setup.sh anga_mac_1_ds.pcap ds"]
          env:
            - name: LUA_PATH
              value: "/vcmts/Pktgen.lua"
            - name: CMK_PROC_FS
              value: "/host/proc"
          resources:
            requests:
              pod.alpha.kubernetes.io/opaque-int-resource-cmk: "1"
          ports:
            - containerPort: 22022
          volumeMounts:
            - name: hugepages
              mountPath: /dev/hugepages
            - name: sysfs
              mountPath: /sys
            - name: sriov
              mountPath: /sriov-cni
            - name: host-proc
              mountPath: /host/proc
              readOnly: true
            - name: cmk-install-dir
              mountPath: /opt/bin
            - name: cmk-conf-dir
              mountPath: /etc/cmk
          securityContext:
            allowPrivilegeEscalation: true
            privileged: true

      node_ports:
        - name: lua  # Lower case alphanumeric characters or '-'
          port: 22022
      networks:
        - flannel
        - sriov01
      volumes:
        - name: hugepages
          hostPath:
            path: /dev/hugepages
        - name: sysfs
          hostPath:
            path: /sys
        - name: sriov
          hostPath:
            path: /var/lib/cni/sriov
        - name: cmk-install-dir
          hostPath:
            path: /opt/bin
        - name: host-proc
          hostPath:
            path: /proc
        - name: cmk-conf-dir
          hostPath:
            path: /etc/cmk

  networks:
    flannel:
      args: '[{ "delegate": { "isDefaultGateway": true }}]'
      plugin: flannel
    sriov01:
      plugin: sriov
      args: '[{"if0": "ens802f0",
               "if0name": "net0",
               "dpdk": {
                   "kernel_driver": "i40evf",
                   "dpdk_driver": "igb_uio",
                   "dpdk_tool": "/opt/nsb_bin/dpdk-devbind.py"}
             }]'
    sriov02:
      plugin: sriov
      args: '[{"if0": "ens802f0",
               "if0name": "net0",
               "dpdk": {
                   "kernel_driver": "i40evf",
                   "dpdk_driver": "igb_uio",
                   "dpdk_tool": "/opt/nsb_bin/dpdk-devbind.py"}
             }]'