blob: c958f8f7063962acec9a76b6e77487bc82b1cc92 [file] [log] [blame]
Matteo Scandolo4b006ae2020-11-09 16:14:40 -08001// Copyright 2019-present Open Networking Foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// deploy VOLTHA using kind-voltha and performs a scale test
16
17pipeline {
18
19 /* no label, executor is determined by JJB */
20 agent {
21 label "${params.buildNode}"
22 }
23 options {
Matteo Scandolof7ca6312020-11-16 15:57:15 -080024 timeout(time: 120, unit: 'MINUTES')
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080025 }
26 environment {
27 JENKINS_NODE_COOKIE="dontKillMe" // do not kill processes after the build is done
28 KUBECONFIG="$HOME/.kube/config"
29 SSHPASS="karaf"
30 PATH="$PATH:$WORKSPACE/kind-voltha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
31 SCHEDULE_ON_CONTROL_NODES="yes"
32 FANCY=0
33 WAIT_ON_DOWN="yes"
34 WITH_SIM_ADAPTERS="no"
35 WITH_RADIUS="${withRadius}"
36 WITH_BBSIM="yes"
37 LEGACY_BBSIM_INDEX="no"
38 DEPLOY_K8S="no"
39 CONFIG_SADIS="external"
40 WITH_KAFKA="yes"
41 WITH_ETCD="yes"
42 VOLTHA_ETCD_PORT=9999
43
44 // VOLTHA namespaces are defined at runtime depending on the stack we're installing
45 // VOLTHA_NS="default"
46 // ADAPTER_NS="default"
47 // BBSIM_NS="default"
48 INFRA_NS="infra"
49
50 // configurable options
51 WITH_EAPOL="${withEapol}"
52 WITH_DHCP="${withDhcp}"
53 WITH_IGMP="${withIgmp}"
54 VOLTHA_LOG_LEVEL="${logLevel}"
55 NUM_OF_BBSIM="${olts}"
56 NUM_OF_OPENONU="${openonuAdapterReplicas}"
57 NUM_OF_ONOS="${onosReplicas}"
58 NUM_OF_ATOMIX="${atomixReplicas}"
59 NUM_OF_KAFKA="${kafkaReplicas}"
60 NUM_OF_ETCD="${etcdReplicas}"
61 WITH_PPROF="${withProfiling}"
62 EXTRA_HELM_FLAGS="${extraHelmFlags} " // note that the trailing space is required to separate the parameters from appends done later
63 VOLTHA_CHART="${volthaChart}"
64 VOLTHA_BBSIM_CHART="${bbsimChart}"
65 VOLTHA_ADAPTER_OPEN_OLT_CHART="${openoltAdapterChart}"
66 VOLTHA_ADAPTER_OPEN_ONU_CHART="${openonuAdapterChart}"
67 ONOS_CLASSIC_CHART="${onosChart}"
68 RADIUS_CHART="${radiusChart}"
69
70 APPS_TO_LOG="etcd kafka onos-onos-classic adapter-open-onu adapter-open-olt rw-core ofagent bbsim radius"
71 LOG_FOLDER="$WORKSPACE/logs"
72
73 GERRIT_PROJECT="${GERRIT_PROJECT}"
74 }
75
76 stages {
77 stage ('Cleanup') {
78 steps {
79 timeout(time: 11, unit: 'MINUTES') {
80 sh returnStdout: false, script: """
Matteo Scandolobe823242020-11-20 13:48:13 -080081 helm repo add stable https://charts.helm.sh/stable
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080082 helm repo add onf https://charts.opencord.org
83 helm repo add cord https://charts.opencord.org
84 helm repo add onos https://charts.onosproject.org
85 helm repo add atomix https://charts.atomix.io
86 helm repo add bbsim-sadis https://ciena.github.io/bbsim-sadis-server/charts
87 helm repo update
88
89 # removing ETCD port forward
90 P_ID="\$(ps e -ww -A | grep "_TAG=etcd-port-forward" | grep -v grep | awk '{print \$1}')"
91 if [ -n "\$P_ID" ]; then
92 kill -9 \$P_ID
93 fi
94
Matteo Scandolo9fe8cad2020-11-13 12:54:19 -080095 NAMESPACES="voltha1 voltha2 infra default"
96 for NS in \$NAMESPACES
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080097 do
Matteo Scandolo9fe8cad2020-11-13 12:54:19 -080098 for hchart in \$(helm list -n \$NS -q | grep -E -v 'docker-registry|kafkacat');
99 do
100 echo "Purging chart: \${hchart}"
101 helm delete -n \$NS "\${hchart}"
102 done
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800103 done
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800104
105 test -e $WORKSPACE/kind-voltha/voltha && cd $WORKSPACE/kind-voltha && ./voltha down
106
Matteo Scandolobe823242020-11-20 13:48:13 -0800107 ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800108
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800109 cd $WORKSPACE
110 rm -rf $WORKSPACE/*
111 """
112 }
113 }
114 }
115 stage('Clone kind-voltha') {
116 steps {
117 checkout([
118 $class: 'GitSCM',
119 userRemoteConfigs: [[
120 url: "https://gerrit.opencord.org/kind-voltha",
121 refspec: "${kindVolthaChange}"
122 ]],
123 branches: [[ name: "master", ]],
124 extensions: [
125 [$class: 'WipeWorkspace'],
126 [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
127 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
128 ],
129 ])
130 script {
131 sh(script:"""
132 if [ '${kindVolthaChange}' != '' ] ; then
133 cd $WORKSPACE/kind-voltha;
134 git fetch https://gerrit.opencord.org/kind-voltha ${kindVolthaChange} && git checkout FETCH_HEAD
135 fi
136 """)
137 }
138 }
139 }
140 stage('Clone voltha-system-tests') {
141 steps {
142 checkout([
143 $class: 'GitSCM',
144 userRemoteConfigs: [[
145 url: "https://gerrit.opencord.org/voltha-system-tests",
146 refspec: "${volthaSystemTestsChange}"
147 ]],
148 branches: [[ name: "${release}", ]],
149 extensions: [
150 [$class: 'WipeWorkspace'],
151 [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
152 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
153 ],
154 ])
155 script {
156 sh(script:"""
157 if [ '${volthaSystemTestsChange}' != '' ] ; then
158 cd $WORKSPACE/voltha-system-tests;
159 git fetch https://gerrit.opencord.org/voltha-system-tests ${volthaSystemTestsChange} && git checkout FETCH_HEAD
160 fi
161 """)
162 }
163 }
164 }
165 stage('Build patch') {
166 when {
167 expression {
168 return params.GERRIT_PROJECT
169 }
170 }
171 steps {
172 sh """
173 git clone https://\$GERRIT_HOST/\$GERRIT_PROJECT
174 cd \$GERRIT_PROJECT
175 git fetch https://\$GERRIT_HOST/\$GERRIT_PROJECT \$GERRIT_REFSPEC && git checkout FETCH_HEAD
176
177 DOCKER_REGISTRY=${dockerRegistry}/ DOCKER_REPOSITORY=voltha/ DOCKER_TAG=voltha-scale make docker-build
178 DOCKER_REGISTRY=${dockerRegistry}/ DOCKER_REPOSITORY=voltha/ DOCKER_TAG=voltha-scale make docker-push
179 """
180 }
181 }
182 stage('Deploy common infrastructure') {
183 // includes monitoring, kafka, etcd
184 steps {
185 sh '''
186 if [ ${withMonitoring} = true ] ; then
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800187 helm install -n $INFRA_NS nem-monitoring cord/nem-monitoring \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800188 -f $HOME/voltha-scale/grafana.yaml \
189 --set prometheus.alertmanager.enabled=false,prometheus.pushgateway.enabled=false \
190 --set kpi_exporter.enabled=false,dashboards.xos=false,dashboards.onos=false,dashboards.aaa=false,dashboards.voltha=false
191 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800192 '''
193 }
194 }
195 stage('Deploy VOLTHA infrastructure') {
196 steps {
197 sh returnStdout: false, script: '''
198 cd $WORKSPACE/kind-voltha/
199
Matteo Scandolof6656562020-11-16 14:45:44 -0800200 export ETCD_CHART=$HOME/teone/helm-charts/etcd
201 export KAFKA_CHART=$HOME/teone/helm-charts/kafka
Matteo Scandolob28a97b2020-11-13 10:58:32 -0800202
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800203 # KAFKA config
Matteo Scandolof6656562020-11-16 14:45:44 -0800204 export NUM_OF_KAFKA=${kafkaReplicas}
205 export EXTRA_HELM_FLAGS+=' --set prometheus.kafka.enabled=true,prometheus.operator.enabled=true,prometheus.jmx.enabled=true,prometheus.operator.serviceMonitor.namespace=default '
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800206
207 # ETCD config
Matteo Scandolof6656562020-11-16 14:45:44 -0800208 export EXTRA_HELM_FLAGS+=" --set memoryMode=${inMemoryEtcdStorage} "
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800209
210 NAME=infra JUST_INFRA=y ./voltha up
211
212 # Forward the ETCD port onto $VOLTHA_ETCD_PORT
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800213 _TAG=etcd-port-forward kubectl -n \$INFRA_NS port-forward --address 0.0.0.0 -n default service/etcd $VOLTHA_ETCD_PORT:2379&
Matteo Scandolo6cdbc5e2020-12-01 17:46:56 -0800214
215 # NOTE this is temporary, for now the bbsim-sadis-server service will be overridden and ONOS will use the new server
216 kubectl apply -n infra -f $HOME/bbsim-sadis-server/deployments/bbsim-sadis-server.yaml
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800217 '''
218 }
219 }
220 stage('Deploy Voltha') {
221 steps {
222 deploy_voltha_stacks(params.volthaStacks)
223 }
224 }
225 stage('Start logging') {
226 steps {
227 sh returnStdout: false, script: '''
228 # start logging with kail
229
230 mkdir -p $LOG_FOLDER
231
232 list=($APPS_TO_LOG)
233 for app in "${list[@]}"
234 do
235 echo "Starting logs for: ${app}"
236 _TAG=kail-$app kail -l app=$app --since 1h > $LOG_FOLDER/$app.log&
237 done
238 '''
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800239 }
240 }
241 stage('Configuration') {
242 steps {
243 script {
244 sh returnStdout: false, script: """
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800245 # TODO this needs to be repeated per stack
246 # kubectl exec \$(kubectl get pods | grep -E "bbsim[0-9]" | awk 'NR==1{print \$1}') -- bbsimctl log ${logLevel.toLowerCase()} false
247
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800248 #Setting link discovery
249 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.provider.lldp.impl.LldpLinkProvider enabled ${withLLDP}
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800250 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.net.flow.impl.FlowRuleManager allowExtraneousRules true
251 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.net.flow.impl.FlowRuleManager importExtraneousRules true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800252 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.net.flowobjective.impl.InOrderFlowObjectiveManager accumulatorMaxBatchMillis 1000
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800253 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.net.flowobjective.impl.InOrderFlowObjectiveManager accumulatorMaxIdleMillis 500
254
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800255 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg log:set ${logLevel} org.onosproject
256 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg log:set ${logLevel} org.opencord
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800257
258 # Set Flows/Ports/Meters poll frequency
259 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.provider.of.flow.impl.OpenFlowRuleProvider flowPollFrequency ${onosStatInterval}
260 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg set org.onosproject.provider.of.device.impl.OpenFlowDeviceProvider portStatsPollFrequency ${onosStatInterval}
261
262 if [ ${withFlows} = false ]; then
263 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.olt
264 fi
265
266 if [ ${withMibTemplate} = true ] ; then
267 rm -f BBSM-12345123451234512345-00000000000001-v1.json
268 wget https://raw.githubusercontent.com/opencord/voltha-openonu-adapter/master/templates/BBSM-12345123451234512345-00000000000001-v1.json
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800269 cat BBSM-12345123451234512345-00000000000001-v1.json | kubectl -n \$INFRA_NS exec -it \$(kubectl -n \$INFRA_NS get pods -l app=etcd | awk 'NR==2{print \$1}') -- etcdctl put service/voltha/omci_mibs/templates/BBSM/12345123451234512345/00000000000001
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800270 fi
271
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800272 if [ ${withPcap} = true ] && [ ${volthaStacks} -eq 1 ] ; then
273 # FIXME ofagent pcap has to be replicated per stack
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800274 # Start the tcp-dump in ofagent
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800275 export OF_AGENT=\$(kubectl -n \$INFRA_NS get pods -l app=ofagent -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800276 kubectl exec \$OF_AGENT -- apk update
277 kubectl exec \$OF_AGENT -- apk add tcpdump
278 kubectl exec \$OF_AGENT -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800279 _TAG=ofagent-tcpdump kubectl -n \$INFRA_NS exec \$OF_AGENT -- tcpdump -nei eth0 -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800280
281 # Start the tcp-dump in radius
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800282 export RADIUS=\$(kubectl -n \$INFRA_NS get pods -l app=radius -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800283 kubectl exec \$RADIUS -- apt-get update
284 kubectl exec \$RADIUS -- apt-get install -y tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800285 _TAG=radius-tcpdump kubectl -n \$INFRA_NS exec \$RADIUS -- tcpdump -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800286
287 # Start the tcp-dump in ONOS
288 for i in \$(seq 0 \$ONOSES); do
289 INSTANCE="onos-onos-classic-\$i"
290 kubectl exec \$INSTANCE -- apt-get update
291 kubectl exec \$INSTANCE -- apt-get install -y tcpdump
292 kubectl exec \$INSTANCE -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800293 _TAG=\$INSTANCE kubectl -n \$INFRA_NS exec \$INSTANCE -- /usr/bin/tcpdump -nei eth0 port 1812 -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800294 done
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800295 else
296 echo "PCAP not supported for multiple VOLTHA stacks"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800297 fi
298 """
299 }
300 }
301 }
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800302 stage('Setup Test') {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800303 steps {
304 sh '''
305 mkdir -p $WORKSPACE/RobotLogs
306 cd $WORKSPACE/voltha-system-tests
307 make vst_venv
308 '''
309 sh '''
310 if [ ${withProfiling} = true ] ; then
311 mkdir -p $LOG_FOLDER/pprof
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800312 cat << EOF > $WORKSPACE/pprof.sh
313timestamp() {
314 date +"%T"
315}
316
317i=0
318while [[ true ]]; do
319 ((i++))
320 ts=$(timestamp)
321 go tool pprof -png http://127.0.0.1:6060/debug/pprof/heap > $LOG_FOLDER/pprof/rw-core-heap-\\$i-\\$ts.png
322 go tool pprof -png http://127.0.0.1:6060/debug/pprof/goroutine > $LOG_FOLDER/pprof/rw-core-goroutine-\\$i-\\$ts.png
323 curl -o $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=10
324 go tool pprof -png $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.png
325
326 go tool pprof -png http://127.0.0.1:6061/debug/pprof/heap > $LOG_FOLDER/pprof/openolt-heap-\\$i-\\$ts.png
327 go tool pprof -png http://127.0.0.1:6061/debug/pprof/goroutine > $LOG_FOLDER/pprof/openolt-goroutine-\\$i-\\$ts.png
328 curl -o $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof http://127.0.0.1:6061/debug/pprof/profile?seconds=10
329 go tool pprof -png $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.png
330
331 go tool pprof -png http://127.0.0.1:6062/debug/pprof/heap > $LOG_FOLDER/pprof/ofagent-heap-\\$i-\\$ts.png
332 go tool pprof -png http://127.0.0.1:6062/debug/pprof/goroutine > $LOG_FOLDER/pprof/ofagent-goroutine-\\$i-\\$ts.png
333 curl -o $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof http://127.0.0.1:6062/debug/pprof/profile?seconds=10
334 go tool pprof -png $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.png
335
336 sleep 10
337done
338EOF
339
340 _TAG="pprof"
341 _TAG=$_TAG bash $WORKSPACE/pprof.sh &
342 fi
343 '''
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800344 // bbsim-sadis server takes a while to cache the subscriber entries
345 // wait for that before starting the tests
346 sleep(60)
347 }
348 }
349 stage('Run Test') {
350 steps {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800351 test_voltha_stacks(params.volthaStacks)
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800352 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800353 }
354 }
355 post {
356 always {
357 // collect result, done in the "post" step so it's executed even in the
358 // event of a timeout in the tests
359 sh '''
360
361 # stop the kail processes
362 list=($APPS_TO_LOG)
363 for app in "${list[@]}"
364 do
365 echo "Stopping logs for: ${app}"
366 _TAG="kail-$app"
367 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
368 if [ -n "$P_IDS" ]; then
369 echo $P_IDS
370 for P_ID in $P_IDS; do
371 kill -9 $P_ID
372 done
373 fi
374 done
375
376 if [ ${withPcap} = true ] ; then
377 # stop ofAgent tcpdump
378 P_ID="\$(ps e -ww -A | grep "_TAG=ofagent-tcpdump" | grep -v grep | awk '{print \$1}')"
379 if [ -n "\$P_ID" ]; then
380 kill -9 \$P_ID
381 fi
382
383 # stop radius tcpdump
384 P_ID="\$(ps e -ww -A | grep "_TAG=radius-tcpdump" | grep -v grep | awk '{print \$1}')"
385 if [ -n "\$P_ID" ]; then
386 kill -9 \$P_ID
387 fi
388
389 # stop onos tcpdump
390 LIMIT=$(($NUM_OF_ONOS - 1))
391 for i in $(seq 0 $LIMIT); do
392 INSTANCE="onos-onos-classic-$i"
393 P_ID="\$(ps e -ww -A | grep "_TAG=$INSTANCE" | grep -v grep | awk '{print \$1}')"
394 if [ -n "\$P_ID" ]; then
395 kill -9 \$P_ID
396 fi
397 done
398
399 # copy the file
400 export OF_AGENT=$(kubectl get pods -l app=ofagent | awk 'NR==2{print $1}') || true
401 kubectl cp $OF_AGENT:out.pcap $LOG_FOLDER/ofagent.pcap || true
402
403 export RADIUS=$(kubectl get pods -l app=radius | awk 'NR==2{print $1}') || true
404 kubectl cp $RADIUS:out.pcap $LOG_FOLDER/radius.pcap || true
405
406 LIMIT=$(($NUM_OF_ONOS - 1))
407 for i in $(seq 0 $LIMIT); do
408 INSTANCE="onos-onos-classic-$i"
409 kubectl cp $INSTANCE:out.pcap $LOG_FOLDER/$INSTANCE.pcap || true
410 done
411 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800412 '''
413 sh '''
414 if [ ${withProfiling} = true ] ; then
415 _TAG="pprof"
416 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
417 if [ -n "$P_IDS" ]; then
418 echo $P_IDS
419 for P_ID in $P_IDS; do
420 kill -9 $P_ID
421 done
422 fi
423 fi
424 '''
425 plot([
426 csvFileName: 'scale-test.csv',
427 csvSeries: [
428 [file: 'plots/plot-voltha-onus.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
429 [file: 'plots/plot-onos-ports.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
430 [file: 'plots/plot-voltha-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
431 [file: 'plots/plot-voltha-openolt-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
432 [file: 'plots/plot-onos-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
433 [file: 'plots/plot-onos-auth.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
434 [file: 'plots/plot-voltha-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
435 [file: 'plots/plot-voltha-openolt-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
436 [file: 'plots/plot-onos-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
437 [file: 'plots/plot-onos-dhcp.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
438 ],
439 group: 'Voltha-Scale-Numbers', numBuilds: '20', style: 'line', title: "Scale Test (OLTs: ${olts}, PONs: ${pons}, ONUs: ${onus})", yaxis: 'Time (s)', useDescr: true
440 ])
441 step([$class: 'RobotPublisher',
442 disableArchiveOutput: false,
Matteo Scandolod4064492020-11-13 10:48:30 -0800443 logFileName: 'RobotLogs/**/log.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800444 otherFiles: '',
Matteo Scandolod4064492020-11-13 10:48:30 -0800445 outputFileName: 'RobotLogs/**/output.xml',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800446 outputPath: '.',
447 passThreshold: 100,
Matteo Scandolod4064492020-11-13 10:48:30 -0800448 reportFileName: 'RobotLogs/**/report.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800449 unstableThreshold: 0]);
450 // get all the logs from kubernetes PODs
451 sh returnStdout: false, script: '''
452
453 # store information on running charts
Matteo Scandolod4064492020-11-13 10:48:30 -0800454 helm ls --all-namespaces > $LOG_FOLDER/helm-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800455
456 # store information on the running pods
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800457 kubectl get pods --all-namespaces -o wide > $LOG_FOLDER/pods.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800458 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-images.txt || true
459 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-imagesId.txt || true
460
461 # copy the ONOS logs directly from the container to avoid the color codes
Matteo Scandolobe823242020-11-20 13:48:13 -0800462 printf '%s\n' $(kubectl -n \$INFRA_NS get pods -l app=onos-onos-classic -o=jsonpath="{.items[*]['metadata.name']}") | xargs --no-run-if-empty -I# bash -c "kubectl -n \$INFRA_NS cp #:${karafHome}/data/log/karaf.log $LOG_FOLDER/#.log" || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800463
464 # get radius logs out of the container
Matteo Scandolod4064492020-11-13 10:48:30 -0800465 kubectl -n \$INFRA_NS cp $(kubectl -n \$INFRA_NS get pods -l app=radius --no-headers | awk '{print $1}'):/var/log/freeradius/radius.log $LOG_FOLDER//radius.log || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800466 '''
467 // dump all the BBSim(s) ONU information
Matteo Scandolod4064492020-11-13 10:48:30 -0800468 script {
469 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
470 stack_ns="voltha"+i
471 sh """
472 BBSIM_IDS=\$(kubectl -n ${stack_ns} get pods | grep bbsim | grep -v server | awk '{print \$1}')
473 IDS=(\$BBSIM_IDS)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800474
Matteo Scandolod4064492020-11-13 10:48:30 -0800475 for bbsim in "\${IDS[@]}"
476 do
Matteo Scandolof6656562020-11-16 14:45:44 -0800477 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl onu list > $LOG_FOLDER/\$bbsim-device-list.txt || true
478 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl service list > $LOG_FOLDER/\$bbsim-service-list.txt || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800479 done
480 """
481 }
482 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800483 // get ONOS debug infos
484 sh '''
485
486 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 apps -a -s > $LOG_FOLDER/onos-apps.txt || true
487 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 nodes > $LOG_FOLDER/onos-nodes.txt || true
488 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 masters > $LOG_FOLDER/onos-masters.txt || true
489 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 roles > $LOG_FOLDER/onos-roles.txt || true
490
491 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 ports > $LOG_FOLDER/onos-ports-list.txt || true
492 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 hosts > $LOG_FOLDER/onos-hosts-list.txt || true
493
494 if [ ${withFlows} = true ] ; then
495 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-olts > $LOG_FOLDER/onos-olt-list.txt || true
496 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 flows -s > $LOG_FOLDER/onos-flows-list.txt || true
497 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 meters > $LOG_FOLDER/onos-meters-list.txt || true
498 fi
499
500 if [ ${provisionSubscribers} = true ]; then
501 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-programmed-subscribers > $LOG_FOLDER/onos-programmed-subscribers.txt || true
502 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-programmed-meters > $LOG_FOLDER/onos-programmed-meters.txt || true
503 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-bpmeter-mappings > $LOG_FOLDER/onos-bpmeter-mappings.txt || true
504 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-failed-subscribers > $LOG_FOLDER/onos-failed-subscribers.txt || true
505 fi
506
507 if [ ${withEapol} = true ] ; then
508 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 aaa-users > $LOG_FOLDER/onos-aaa-users.txt || true
509 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 aaa-statistics > $LOG_FOLDER/onos-aaa-statistics.txt || true
510 fi
511
512 if [ ${withDhcp} = true ] ; then
513 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 dhcpl2relay-allocations > $LOG_FOLDER/onos-dhcp-allocations.txt || true
514 fi
515 '''
516 // collect etcd metrics
517 sh '''
518 mkdir -p $WORKSPACE/etcd-metrics
519 curl -s -X GET -G http://10.90.0.101:31301/api/v1/query --data-urlencode 'query=etcd_debugging_mvcc_keys_total' | jq '.data' > $WORKSPACE/etcd-metrics/etcd-key-count.json || true
520 curl -s -X GET -G http://10.90.0.101:31301/api/v1/query --data-urlencode 'query=grpc_server_handled_total{grpc_service="etcdserverpb.KV"}' | jq '.data' > $WORKSPACE/etcd-metrics/etcd-rpc-count.json || true
521 curl -s -X GET -G http://10.90.0.101:31301/api/v1/query --data-urlencode 'query=etcd_debugging_mvcc_db_total_size_in_bytes' | jq '.data' > $WORKSPACE/etcd-metrics/etcd-db-size.json || true
522 curl -s -X GET -G http://10.90.0.101:31301/api/v1/query --data-urlencode 'query=etcd_disk_backend_commit_duration_seconds_sum' | jq '.data' > $WORKSPACE/etcd-metrics/etcd-backend-write-time.json || true
523 '''
524 // get VOLTHA debug infos
525 script {
Matteo Scandolod4064492020-11-13 10:48:30 -0800526 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
527 stack_ns="voltha"+i
528 voltcfg="~/.volt/config-voltha"+i
529 println stack_ns
530 try {
531 sh """
532 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list -o json > $LOG_FOLDER/device-list.json || true
533 python -m json.tool $LOG_FOLDER/device-list.json > $LOG_FOLDER/voltha-devices-list.json || true
534 rm $LOG_FOLDER/device-list.json || true
535 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list > $LOG_FOLDER/voltha-devices-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800536
Matteo Scandolod4064492020-11-13 10:48:30 -0800537 DEVICE_LIST=
Matteo Scandolobe823242020-11-20 13:48:13 -0800538 printf '%s\n' \$(voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl -c $HOME/.volt/config-${stack_ns}-m 8MB device flows # > $LOG_FOLDER/voltha-device-flows-#.txt" || true
539 printf '%s\n' \$(voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device port list --format 'table{{.PortNo}}\t{{.Label}}\t{{.Type}}\t{{.AdminState}}\t{{.OperStatus}}' # > $LOG_FOLDER/voltha-device-ports-#.txt" || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800540
Matteo Scandolobe823242020-11-20 13:48:13 -0800541 printf '%s\n' \$(voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB logicaldevice list -q) | xargs --no-run-if-empty -I# bash -c "voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB logicaldevice flows # > $LOG_FOLDER/voltha-logicaldevice-flows-#.txt" || true
542 printf '%s\n' \$(voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB logicaldevice list -q) | xargs --no-run-if-empty -I# bash -c "voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB logicaldevice port list # > $LOG_FOLDER/voltha-logicaldevice-ports-#.txt" || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800543 """
544 } catch(e) {
545 sh '''
546 echo "Can't get device list from voltclt"
547 '''
548 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800549 }
550 }
551 // get cpu usage by container
552 sh '''
553 if [ ${withMonitoring} = true ] ; then
554 cd $WORKSPACE/voltha-system-tests
555 source ./vst_venv/bin/activate
556 sleep 60 # we have to wait for prometheus to collect all the information
557 python tests/scale/sizing.py -o $WORKSPACE/plots || true
558 fi
559 '''
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800560 archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time.txt,logs/*,logs/pprof/*,RobotLogs/**/*,plots/*,etcd-metrics/*'
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800561 }
562 }
563}
564
565def deploy_voltha_stacks(numberOfStacks) {
566 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
567 stage("Deploy VOLTHA stack " + i) {
568 sh returnStdout: false, script: """
569 cd $WORKSPACE/kind-voltha/
570
571 export NAME=voltha${i}
572 export VOLTHA_NS=voltha${i}
573 export ADAPTER_NS=voltha${i}
574 export BBSIM_NS=voltha${i}
575 export BBSIM_BASE_INDEX=${i}
576 export WITH_ETCD=etcd.\$INFRA_NS.svc:2379
577 export WITH_KAFKA=kafka.\$INFRA_NS.svc:9092
578 export WITH_ONOS=onos-onos-classic-hs.\$INFRA_NS.svc:6653
579
580 export EXTRA_HELM_FLAGS+=' '
581
582 # Load the release defaults
583 if [ '${release.trim()}' != 'master' ]; then
584 source $WORKSPACE/kind-voltha/releases/${release}
585 EXTRA_HELM_FLAGS+=" ${extraHelmFlags} "
586 fi
587
588 # BBSim custom image handling
589 if [ '${bbsimImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'bbsim' ]; then
590 IFS=: read -r bbsimRepo bbsimTag <<< '${bbsimImg.trim()}'
591 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=\$bbsimRepo,images.bbsim.tag=\$bbsimTag "
592 fi
593
594 # VOLTHA and ofAgent custom image handling
595 # NOTE to override the rw-core image in a released version you must set the ofAgent image too
596 # TODO split ofAgent and voltha-go
597 if [ '${rwCoreImg.trim()}' != '' ] && [ '${ofAgentImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-go' ]; then
598 IFS=: read -r rwCoreRepo rwCoreTag <<< '${rwCoreImg.trim()}'
599 IFS=: read -r ofAgentRepo ofAgentTag <<< '${ofAgentImg.trim()}'
600 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=\$rwCoreRepo,images.rw_core.tag=\$rwCoreTag,images.ofagent.repository=\$ofAgentRepo,images.ofagent.tag=\$ofAgentTag "
601 fi
602
603 # OpenOLT custom image handling
604 if [ '${openoltAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openolt-adapter' ]; then
605 IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< '${openoltAdapterImg.trim()}'
606 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=\$openoltAdapterRepo,images.adapter_open_olt.tag=\$openoltAdapterTag "
607 fi
608
609 # OpenONU custom image handling
610 if [ '${openonuAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter' ]; then
611 IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< '${openonuAdapterImg.trim()}'
612 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=\$openonuAdapterRepo,images.adapter_open_onu.tag=\$openonuAdapterTag "
613 fi
614
Andrea Campanella28763082020-11-18 10:55:31 +0100615 # OpenONU Go custom image handling
616 if [ '${openonuAdapterGoImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter-go' ]; then
617 IFS=: read -r openonuAdapterGoRepo openonuAdapterGoTag <<< '${openonuAdapterGoImg.trim()}'
Andrea Campanellaed026982020-11-20 10:06:42 +0100618 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu_go.repository=\$openonuAdapterGoRepo,images.adapter_open_onu_go.tag=\$openonuAdapterGoTag "
Andrea Campanella28763082020-11-18 10:55:31 +0100619 fi
620
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800621 # ONOS custom image handling
622 if [ '${onosImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-onos' ]; then
623 IFS=: read -r onosRepo onosTag <<< '${onosImg.trim()}'
624 EXTRA_HELM_FLAGS+="--set images.onos.repository=\$onosRepo,images.onos.tag=\$onosTag "
625 fi
626
627 # set BBSim parameters
628 EXTRA_HELM_FLAGS+='--set enablePerf=true,pon=${pons},onu=${onus} '
629
630 # disable the securityContext, this is a development cluster
631 EXTRA_HELM_FLAGS+='--set securityContext.enabled=false '
632
633 # No persistent-volume-claims in Atomix
634 EXTRA_HELM_FLAGS+="--set atomix.persistence.enabled=false "
635
636 echo "Installing with the following extra arguments:"
637 echo $EXTRA_HELM_FLAGS
638
639 # if it's newer than voltha-2.4 set the correct BBSIM_CFG
640 if [ '${release.trim()}' != 'voltha-2.4' ]; then
641 export BBSIM_CFG="$WORKSPACE/kind-voltha/configs/bbsim-sadis-${workflow}.yaml"
642 fi
643
644 # Use custom built images
645
646 if [ '\$GERRIT_PROJECT' == 'voltha-go' ]; then
647 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=${dockerRegistry}/voltha/voltha-rw-core,images.rw_core.tag=voltha-scale "
648 fi
649
650 if [ '\$GERRIT_PROJECT' == 'voltha-openolt-adapter' ]; then
651 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=${dockerRegistry}/voltha/voltha-openolt-adapter,images.adapter_open_olt.tag=voltha-scale "
652 fi
653
654 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter' ]; then
655 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=${dockerRegistry}/voltha/voltha-openonu-adapter,images.adapter_open_onu.tag=voltha-scale "
656 fi
657
Andrea Campanellaed026982020-11-20 10:06:42 +0100658 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter-go' ]; then
659 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu_go.repository=${dockerRegistry}/voltha/voltha-openonu-adapter-go,images.adapter_open_onu_go.tag=voltha-scale "
660 fi
661
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800662 if [ '\$GERRIT_PROJECT' == 'ofagent-go' ]; then
663 EXTRA_HELM_FLAGS+="--set images.ofagent.repository=${dockerRegistry}/voltha/voltha-ofagent-go,images.ofagent.tag=voltha-scale "
664 fi
665
666 if [ '\$GERRIT_PROJECT' == 'voltha-onos' ]; then
667 EXTRA_HELM_FLAGS+="--set images.onos.repository=${dockerRegistry}/voltha/voltha-onos,images.onos.tag=voltha-scale "
668 fi
669
670 if [ '\$GERRIT_PROJECT' == 'bbsim' ]; then
671 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=${dockerRegistry}/voltha/bbsim,images.bbsim.tag=voltha-scale "
672 fi
673
674 ./voltha up
675 """
676 }
677 }
678}
679
680def test_voltha_stacks(numberOfStacks) {
681 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
682 stage("Test VOLTHA stack " + i) {
683 timeout(time: 15, unit: 'MINUTES') {
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800684 sh """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800685 export VOLTCONFIG="$HOME/.volt/config-voltha${i}"
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800686 ROBOT_PARAMS="-v stackId:${i} \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800687 -v olt:${olts} \
688 -v pon:${pons} \
689 -v onu:${onus} \
690 -v workflow:${workflow} \
691 -v withEapol:${withEapol} \
692 -v withDhcp:${withDhcp} \
693 -v withIgmp:${withIgmp} \
694 --noncritical non-critical \
695 -e teardown "
696
697 if [ ${withEapol} = false ] ; then
698 ROBOT_PARAMS+="-e authentication "
699 fi
700
701 if [ ${withDhcp} = false ] ; then
702 ROBOT_PARAMS+="-e dhcp "
703 fi
704
705 if [ ${provisionSubscribers} = false ] ; then
706 # if we're not considering subscribers then we don't care about authentication and dhcp
707 ROBOT_PARAMS+="-e authentication -e provision -e flow-after -e dhcp "
708 fi
709
710 if [ ${withFlows} = false ] ; then
711 ROBOT_PARAMS+="-i setup -i activation "
712 fi
713
714 cd $WORKSPACE/voltha-system-tests
715 source ./vst_venv/bin/activate
Matteo Scandolo5f6c5492020-11-12 17:37:25 -0800716 robot -d $WORKSPACE/RobotLogs/voltha${i} \
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800717 \$ROBOT_PARAMS tests/scale/Voltha_Scale_Tests.robot
Matteo Scandolof7ca6312020-11-16 15:57:15 -0800718
719 # collect results
720 python tests/scale/collect-result.py -r $WORKSPACE/RobotLogs/voltha${i}/output.xml -p $WORKSPACE/plots > $WORKSPACE/execution-time-voltha${i}.txt || true
721 cat $WORKSPACE/execution-time-voltha${i}.txt
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800722 """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800723 }
724 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800725 }
726}