blob: db2fc5cc826fa1168615e4ef056fafe29ae1972f [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 Scandolo4b006ae2020-11-09 16:14:40 -0800214 '''
215 }
216 }
217 stage('Deploy Voltha') {
218 steps {
219 deploy_voltha_stacks(params.volthaStacks)
220 }
221 }
222 stage('Start logging') {
223 steps {
224 sh returnStdout: false, script: '''
225 # start logging with kail
226
227 mkdir -p $LOG_FOLDER
228
229 list=($APPS_TO_LOG)
230 for app in "${list[@]}"
231 do
232 echo "Starting logs for: ${app}"
233 _TAG=kail-$app kail -l app=$app --since 1h > $LOG_FOLDER/$app.log&
234 done
235 '''
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800236 }
237 }
238 stage('Configuration') {
239 steps {
240 script {
241 sh returnStdout: false, script: """
Matteo Scandolo68978752020-12-02 12:23:42 -0800242
243 # NOTE this is temporary, for now the bbsim-sadis-server service will be overridden and ONOS will use the new server
244 helm del -n infra bbsim-sadis-server
245 kubectl apply -n infra -f $HOME/bbsim-sadis-server/deployments/bbsim-sadis-server.yaml
246
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800247 # TODO this needs to be repeated per stack
248 # kubectl exec \$(kubectl get pods | grep -E "bbsim[0-9]" | awk 'NR==1{print \$1}') -- bbsimctl log ${logLevel.toLowerCase()} false
249
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800250 #Setting link discovery
251 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 -0800252 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
253 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 -0800254 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 -0800255 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
256
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800257 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg log:set ${logLevel} org.onosproject
258 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 -0800259
260 # Set Flows/Ports/Meters poll frequency
261 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}
262 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}
263
264 if [ ${withFlows} = false ]; then
265 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.olt
266 fi
267
268 if [ ${withMibTemplate} = true ] ; then
269 rm -f BBSM-12345123451234512345-00000000000001-v1.json
270 wget https://raw.githubusercontent.com/opencord/voltha-openonu-adapter/master/templates/BBSM-12345123451234512345-00000000000001-v1.json
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800271 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 -0800272 fi
273
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800274 if [ ${withPcap} = true ] && [ ${volthaStacks} -eq 1 ] ; then
275 # FIXME ofagent pcap has to be replicated per stack
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800276 # Start the tcp-dump in ofagent
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800277 export OF_AGENT=\$(kubectl -n \$INFRA_NS get pods -l app=ofagent -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800278 kubectl exec \$OF_AGENT -- apk update
279 kubectl exec \$OF_AGENT -- apk add tcpdump
280 kubectl exec \$OF_AGENT -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800281 _TAG=ofagent-tcpdump kubectl -n \$INFRA_NS exec \$OF_AGENT -- tcpdump -nei eth0 -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800282
283 # Start the tcp-dump in radius
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800284 export RADIUS=\$(kubectl -n \$INFRA_NS get pods -l app=radius -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800285 kubectl exec \$RADIUS -- apt-get update
286 kubectl exec \$RADIUS -- apt-get install -y tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800287 _TAG=radius-tcpdump kubectl -n \$INFRA_NS exec \$RADIUS -- tcpdump -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800288
289 # Start the tcp-dump in ONOS
290 for i in \$(seq 0 \$ONOSES); do
291 INSTANCE="onos-onos-classic-\$i"
292 kubectl exec \$INSTANCE -- apt-get update
293 kubectl exec \$INSTANCE -- apt-get install -y tcpdump
294 kubectl exec \$INSTANCE -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800295 _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 -0800296 done
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800297 else
298 echo "PCAP not supported for multiple VOLTHA stacks"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800299 fi
300 """
301 }
302 }
303 }
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800304 stage('Setup Test') {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800305 steps {
306 sh '''
307 mkdir -p $WORKSPACE/RobotLogs
308 cd $WORKSPACE/voltha-system-tests
309 make vst_venv
310 '''
311 sh '''
312 if [ ${withProfiling} = true ] ; then
313 mkdir -p $LOG_FOLDER/pprof
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800314 cat << EOF > $WORKSPACE/pprof.sh
315timestamp() {
316 date +"%T"
317}
318
319i=0
320while [[ true ]]; do
321 ((i++))
322 ts=$(timestamp)
323 go tool pprof -png http://127.0.0.1:6060/debug/pprof/heap > $LOG_FOLDER/pprof/rw-core-heap-\\$i-\\$ts.png
324 go tool pprof -png http://127.0.0.1:6060/debug/pprof/goroutine > $LOG_FOLDER/pprof/rw-core-goroutine-\\$i-\\$ts.png
325 curl -o $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=10
326 go tool pprof -png $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.png
327
328 go tool pprof -png http://127.0.0.1:6061/debug/pprof/heap > $LOG_FOLDER/pprof/openolt-heap-\\$i-\\$ts.png
329 go tool pprof -png http://127.0.0.1:6061/debug/pprof/goroutine > $LOG_FOLDER/pprof/openolt-goroutine-\\$i-\\$ts.png
330 curl -o $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof http://127.0.0.1:6061/debug/pprof/profile?seconds=10
331 go tool pprof -png $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.png
332
333 go tool pprof -png http://127.0.0.1:6062/debug/pprof/heap > $LOG_FOLDER/pprof/ofagent-heap-\\$i-\\$ts.png
334 go tool pprof -png http://127.0.0.1:6062/debug/pprof/goroutine > $LOG_FOLDER/pprof/ofagent-goroutine-\\$i-\\$ts.png
335 curl -o $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof http://127.0.0.1:6062/debug/pprof/profile?seconds=10
336 go tool pprof -png $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.png
337
338 sleep 10
339done
340EOF
341
342 _TAG="pprof"
343 _TAG=$_TAG bash $WORKSPACE/pprof.sh &
344 fi
345 '''
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800346 // bbsim-sadis server takes a while to cache the subscriber entries
347 // wait for that before starting the tests
348 sleep(60)
349 }
350 }
351 stage('Run Test') {
352 steps {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800353 test_voltha_stacks(params.volthaStacks)
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800354 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800355 }
356 }
357 post {
358 always {
359 // collect result, done in the "post" step so it's executed even in the
360 // event of a timeout in the tests
361 sh '''
362
363 # stop the kail processes
364 list=($APPS_TO_LOG)
365 for app in "${list[@]}"
366 do
367 echo "Stopping logs for: ${app}"
368 _TAG="kail-$app"
369 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
370 if [ -n "$P_IDS" ]; then
371 echo $P_IDS
372 for P_ID in $P_IDS; do
373 kill -9 $P_ID
374 done
375 fi
376 done
377
378 if [ ${withPcap} = true ] ; then
379 # stop ofAgent tcpdump
380 P_ID="\$(ps e -ww -A | grep "_TAG=ofagent-tcpdump" | grep -v grep | awk '{print \$1}')"
381 if [ -n "\$P_ID" ]; then
382 kill -9 \$P_ID
383 fi
384
385 # stop radius tcpdump
386 P_ID="\$(ps e -ww -A | grep "_TAG=radius-tcpdump" | grep -v grep | awk '{print \$1}')"
387 if [ -n "\$P_ID" ]; then
388 kill -9 \$P_ID
389 fi
390
391 # stop onos tcpdump
392 LIMIT=$(($NUM_OF_ONOS - 1))
393 for i in $(seq 0 $LIMIT); do
394 INSTANCE="onos-onos-classic-$i"
395 P_ID="\$(ps e -ww -A | grep "_TAG=$INSTANCE" | grep -v grep | awk '{print \$1}')"
396 if [ -n "\$P_ID" ]; then
397 kill -9 \$P_ID
398 fi
399 done
400
401 # copy the file
402 export OF_AGENT=$(kubectl get pods -l app=ofagent | awk 'NR==2{print $1}') || true
403 kubectl cp $OF_AGENT:out.pcap $LOG_FOLDER/ofagent.pcap || true
404
405 export RADIUS=$(kubectl get pods -l app=radius | awk 'NR==2{print $1}') || true
406 kubectl cp $RADIUS:out.pcap $LOG_FOLDER/radius.pcap || true
407
408 LIMIT=$(($NUM_OF_ONOS - 1))
409 for i in $(seq 0 $LIMIT); do
410 INSTANCE="onos-onos-classic-$i"
411 kubectl cp $INSTANCE:out.pcap $LOG_FOLDER/$INSTANCE.pcap || true
412 done
413 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800414 '''
415 sh '''
416 if [ ${withProfiling} = true ] ; then
417 _TAG="pprof"
418 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
419 if [ -n "$P_IDS" ]; then
420 echo $P_IDS
421 for P_ID in $P_IDS; do
422 kill -9 $P_ID
423 done
424 fi
425 fi
426 '''
427 plot([
428 csvFileName: 'scale-test.csv',
429 csvSeries: [
430 [file: 'plots/plot-voltha-onus.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
431 [file: 'plots/plot-onos-ports.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
432 [file: 'plots/plot-voltha-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
433 [file: 'plots/plot-voltha-openolt-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
434 [file: 'plots/plot-onos-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
435 [file: 'plots/plot-onos-auth.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
436 [file: 'plots/plot-voltha-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
437 [file: 'plots/plot-voltha-openolt-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
438 [file: 'plots/plot-onos-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
439 [file: 'plots/plot-onos-dhcp.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
440 ],
441 group: 'Voltha-Scale-Numbers', numBuilds: '20', style: 'line', title: "Scale Test (OLTs: ${olts}, PONs: ${pons}, ONUs: ${onus})", yaxis: 'Time (s)', useDescr: true
442 ])
443 step([$class: 'RobotPublisher',
444 disableArchiveOutput: false,
Matteo Scandolod4064492020-11-13 10:48:30 -0800445 logFileName: 'RobotLogs/**/log.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800446 otherFiles: '',
Matteo Scandolod4064492020-11-13 10:48:30 -0800447 outputFileName: 'RobotLogs/**/output.xml',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800448 outputPath: '.',
449 passThreshold: 100,
Matteo Scandolod4064492020-11-13 10:48:30 -0800450 reportFileName: 'RobotLogs/**/report.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800451 unstableThreshold: 0]);
452 // get all the logs from kubernetes PODs
453 sh returnStdout: false, script: '''
454
455 # store information on running charts
Matteo Scandolod4064492020-11-13 10:48:30 -0800456 helm ls --all-namespaces > $LOG_FOLDER/helm-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800457
458 # store information on the running pods
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800459 kubectl get pods --all-namespaces -o wide > $LOG_FOLDER/pods.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800460 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-images.txt || true
461 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-imagesId.txt || true
462
463 # copy the ONOS logs directly from the container to avoid the color codes
Matteo Scandolobe823242020-11-20 13:48:13 -0800464 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 -0800465
466 # get radius logs out of the container
Matteo Scandolod4064492020-11-13 10:48:30 -0800467 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 -0800468 '''
469 // dump all the BBSim(s) ONU information
Matteo Scandolod4064492020-11-13 10:48:30 -0800470 script {
471 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
472 stack_ns="voltha"+i
473 sh """
474 BBSIM_IDS=\$(kubectl -n ${stack_ns} get pods | grep bbsim | grep -v server | awk '{print \$1}')
475 IDS=(\$BBSIM_IDS)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800476
Matteo Scandolod4064492020-11-13 10:48:30 -0800477 for bbsim in "\${IDS[@]}"
478 do
Matteo Scandolof6656562020-11-16 14:45:44 -0800479 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl onu list > $LOG_FOLDER/\$bbsim-device-list.txt || true
480 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl service list > $LOG_FOLDER/\$bbsim-service-list.txt || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800481 done
482 """
483 }
484 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800485 // get ONOS debug infos
486 sh '''
487
488 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
489 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
490 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
491 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
492
493 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
494 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
495
496 if [ ${withFlows} = true ] ; then
497 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
498 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
499 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
500 fi
501
502 if [ ${provisionSubscribers} = true ]; then
503 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
504 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
505 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
506 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
507 fi
508
509 if [ ${withEapol} = true ] ; then
510 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
511 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
512 fi
513
514 if [ ${withDhcp} = true ] ; then
515 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
516 fi
517 '''
518 // collect etcd metrics
519 sh '''
520 mkdir -p $WORKSPACE/etcd-metrics
521 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
522 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
523 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
524 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
525 '''
526 // get VOLTHA debug infos
527 script {
Matteo Scandolod4064492020-11-13 10:48:30 -0800528 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
529 stack_ns="voltha"+i
530 voltcfg="~/.volt/config-voltha"+i
531 println stack_ns
532 try {
533 sh """
534 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list -o json > $LOG_FOLDER/device-list.json || true
535 python -m json.tool $LOG_FOLDER/device-list.json > $LOG_FOLDER/voltha-devices-list.json || true
536 rm $LOG_FOLDER/device-list.json || true
537 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 -0800538
Matteo Scandolod4064492020-11-13 10:48:30 -0800539 DEVICE_LIST=
Matteo Scandolobe823242020-11-20 13:48:13 -0800540 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
541 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 -0800542
Matteo Scandolobe823242020-11-20 13:48:13 -0800543 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
544 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 -0800545 """
546 } catch(e) {
547 sh '''
548 echo "Can't get device list from voltclt"
549 '''
550 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800551 }
552 }
553 // get cpu usage by container
554 sh '''
555 if [ ${withMonitoring} = true ] ; then
556 cd $WORKSPACE/voltha-system-tests
557 source ./vst_venv/bin/activate
558 sleep 60 # we have to wait for prometheus to collect all the information
559 python tests/scale/sizing.py -o $WORKSPACE/plots || true
560 fi
561 '''
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800562 archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time.txt,logs/*,logs/pprof/*,RobotLogs/**/*,plots/*,etcd-metrics/*'
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800563 }
564 }
565}
566
567def deploy_voltha_stacks(numberOfStacks) {
568 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
569 stage("Deploy VOLTHA stack " + i) {
570 sh returnStdout: false, script: """
571 cd $WORKSPACE/kind-voltha/
572
573 export NAME=voltha${i}
574 export VOLTHA_NS=voltha${i}
575 export ADAPTER_NS=voltha${i}
576 export BBSIM_NS=voltha${i}
577 export BBSIM_BASE_INDEX=${i}
578 export WITH_ETCD=etcd.\$INFRA_NS.svc:2379
579 export WITH_KAFKA=kafka.\$INFRA_NS.svc:9092
580 export WITH_ONOS=onos-onos-classic-hs.\$INFRA_NS.svc:6653
581
582 export EXTRA_HELM_FLAGS+=' '
583
584 # Load the release defaults
585 if [ '${release.trim()}' != 'master' ]; then
586 source $WORKSPACE/kind-voltha/releases/${release}
587 EXTRA_HELM_FLAGS+=" ${extraHelmFlags} "
588 fi
589
590 # BBSim custom image handling
591 if [ '${bbsimImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'bbsim' ]; then
592 IFS=: read -r bbsimRepo bbsimTag <<< '${bbsimImg.trim()}'
593 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=\$bbsimRepo,images.bbsim.tag=\$bbsimTag "
594 fi
595
596 # VOLTHA and ofAgent custom image handling
597 # NOTE to override the rw-core image in a released version you must set the ofAgent image too
598 # TODO split ofAgent and voltha-go
599 if [ '${rwCoreImg.trim()}' != '' ] && [ '${ofAgentImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-go' ]; then
600 IFS=: read -r rwCoreRepo rwCoreTag <<< '${rwCoreImg.trim()}'
601 IFS=: read -r ofAgentRepo ofAgentTag <<< '${ofAgentImg.trim()}'
602 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=\$rwCoreRepo,images.rw_core.tag=\$rwCoreTag,images.ofagent.repository=\$ofAgentRepo,images.ofagent.tag=\$ofAgentTag "
603 fi
604
605 # OpenOLT custom image handling
606 if [ '${openoltAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openolt-adapter' ]; then
607 IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< '${openoltAdapterImg.trim()}'
608 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=\$openoltAdapterRepo,images.adapter_open_olt.tag=\$openoltAdapterTag "
609 fi
610
611 # OpenONU custom image handling
612 if [ '${openonuAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter' ]; then
613 IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< '${openonuAdapterImg.trim()}'
614 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=\$openonuAdapterRepo,images.adapter_open_onu.tag=\$openonuAdapterTag "
615 fi
616
Andrea Campanella28763082020-11-18 10:55:31 +0100617 # OpenONU Go custom image handling
618 if [ '${openonuAdapterGoImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter-go' ]; then
619 IFS=: read -r openonuAdapterGoRepo openonuAdapterGoTag <<< '${openonuAdapterGoImg.trim()}'
Andrea Campanellaed026982020-11-20 10:06:42 +0100620 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 +0100621 fi
622
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800623 # ONOS custom image handling
624 if [ '${onosImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-onos' ]; then
625 IFS=: read -r onosRepo onosTag <<< '${onosImg.trim()}'
626 EXTRA_HELM_FLAGS+="--set images.onos.repository=\$onosRepo,images.onos.tag=\$onosTag "
627 fi
628
629 # set BBSim parameters
630 EXTRA_HELM_FLAGS+='--set enablePerf=true,pon=${pons},onu=${onus} '
631
632 # disable the securityContext, this is a development cluster
633 EXTRA_HELM_FLAGS+='--set securityContext.enabled=false '
634
635 # No persistent-volume-claims in Atomix
636 EXTRA_HELM_FLAGS+="--set atomix.persistence.enabled=false "
637
638 echo "Installing with the following extra arguments:"
639 echo $EXTRA_HELM_FLAGS
640
641 # if it's newer than voltha-2.4 set the correct BBSIM_CFG
642 if [ '${release.trim()}' != 'voltha-2.4' ]; then
643 export BBSIM_CFG="$WORKSPACE/kind-voltha/configs/bbsim-sadis-${workflow}.yaml"
644 fi
645
646 # Use custom built images
647
648 if [ '\$GERRIT_PROJECT' == 'voltha-go' ]; then
649 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=${dockerRegistry}/voltha/voltha-rw-core,images.rw_core.tag=voltha-scale "
650 fi
651
652 if [ '\$GERRIT_PROJECT' == 'voltha-openolt-adapter' ]; then
653 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=${dockerRegistry}/voltha/voltha-openolt-adapter,images.adapter_open_olt.tag=voltha-scale "
654 fi
655
656 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter' ]; then
657 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=${dockerRegistry}/voltha/voltha-openonu-adapter,images.adapter_open_onu.tag=voltha-scale "
658 fi
659
Andrea Campanellaed026982020-11-20 10:06:42 +0100660 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter-go' ]; then
661 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu_go.repository=${dockerRegistry}/voltha/voltha-openonu-adapter-go,images.adapter_open_onu_go.tag=voltha-scale "
662 fi
663
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800664 if [ '\$GERRIT_PROJECT' == 'ofagent-go' ]; then
665 EXTRA_HELM_FLAGS+="--set images.ofagent.repository=${dockerRegistry}/voltha/voltha-ofagent-go,images.ofagent.tag=voltha-scale "
666 fi
667
668 if [ '\$GERRIT_PROJECT' == 'voltha-onos' ]; then
669 EXTRA_HELM_FLAGS+="--set images.onos.repository=${dockerRegistry}/voltha/voltha-onos,images.onos.tag=voltha-scale "
670 fi
671
672 if [ '\$GERRIT_PROJECT' == 'bbsim' ]; then
673 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=${dockerRegistry}/voltha/bbsim,images.bbsim.tag=voltha-scale "
674 fi
675
676 ./voltha up
677 """
678 }
679 }
680}
681
682def test_voltha_stacks(numberOfStacks) {
683 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
684 stage("Test VOLTHA stack " + i) {
685 timeout(time: 15, unit: 'MINUTES') {
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800686 sh """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800687 export VOLTCONFIG="$HOME/.volt/config-voltha${i}"
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800688 ROBOT_PARAMS="-v stackId:${i} \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800689 -v olt:${olts} \
690 -v pon:${pons} \
691 -v onu:${onus} \
692 -v workflow:${workflow} \
693 -v withEapol:${withEapol} \
694 -v withDhcp:${withDhcp} \
695 -v withIgmp:${withIgmp} \
696 --noncritical non-critical \
697 -e teardown "
698
699 if [ ${withEapol} = false ] ; then
700 ROBOT_PARAMS+="-e authentication "
701 fi
702
703 if [ ${withDhcp} = false ] ; then
704 ROBOT_PARAMS+="-e dhcp "
705 fi
706
707 if [ ${provisionSubscribers} = false ] ; then
708 # if we're not considering subscribers then we don't care about authentication and dhcp
709 ROBOT_PARAMS+="-e authentication -e provision -e flow-after -e dhcp "
710 fi
711
712 if [ ${withFlows} = false ] ; then
713 ROBOT_PARAMS+="-i setup -i activation "
714 fi
715
716 cd $WORKSPACE/voltha-system-tests
717 source ./vst_venv/bin/activate
Matteo Scandolo5f6c5492020-11-12 17:37:25 -0800718 robot -d $WORKSPACE/RobotLogs/voltha${i} \
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800719 \$ROBOT_PARAMS tests/scale/Voltha_Scale_Tests.robot
Matteo Scandolof7ca6312020-11-16 15:57:15 -0800720
721 # collect results
722 python tests/scale/collect-result.py -r $WORKSPACE/RobotLogs/voltha${i}/output.xml -p $WORKSPACE/plots > $WORKSPACE/execution-time-voltha${i}.txt || true
723 cat $WORKSPACE/execution-time-voltha${i}.txt
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800724 """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800725 }
726 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800727 }
728}