blob: 5a56f29697fb447179da268682a1df727d70cc28 [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
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080043 INFRA_NS="infra"
44
45 // configurable options
46 WITH_EAPOL="${withEapol}"
47 WITH_DHCP="${withDhcp}"
48 WITH_IGMP="${withIgmp}"
49 VOLTHA_LOG_LEVEL="${logLevel}"
50 NUM_OF_BBSIM="${olts}"
51 NUM_OF_OPENONU="${openonuAdapterReplicas}"
52 NUM_OF_ONOS="${onosReplicas}"
53 NUM_OF_ATOMIX="${atomixReplicas}"
54 NUM_OF_KAFKA="${kafkaReplicas}"
55 NUM_OF_ETCD="${etcdReplicas}"
56 WITH_PPROF="${withProfiling}"
57 EXTRA_HELM_FLAGS="${extraHelmFlags} " // note that the trailing space is required to separate the parameters from appends done later
58 VOLTHA_CHART="${volthaChart}"
59 VOLTHA_BBSIM_CHART="${bbsimChart}"
60 VOLTHA_ADAPTER_OPEN_OLT_CHART="${openoltAdapterChart}"
61 VOLTHA_ADAPTER_OPEN_ONU_CHART="${openonuAdapterChart}"
62 ONOS_CLASSIC_CHART="${onosChart}"
63 RADIUS_CHART="${radiusChart}"
64
Matteo Scandolo7c803cb2020-12-15 11:33:32 -100065 APPS_TO_LOG="etcd kafka onos-onos-classic adapter-open-onu adapter-open-olt rw-core ofagent bbsim radius bbsim-sadis-server"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080066 LOG_FOLDER="$WORKSPACE/logs"
67
68 GERRIT_PROJECT="${GERRIT_PROJECT}"
69 }
70
71 stages {
72 stage ('Cleanup') {
73 steps {
74 timeout(time: 11, unit: 'MINUTES') {
75 sh returnStdout: false, script: """
Matteo Scandolobe823242020-11-20 13:48:13 -080076 helm repo add stable https://charts.helm.sh/stable
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080077 helm repo add onf https://charts.opencord.org
78 helm repo add cord https://charts.opencord.org
79 helm repo add onos https://charts.onosproject.org
80 helm repo add atomix https://charts.atomix.io
81 helm repo add bbsim-sadis https://ciena.github.io/bbsim-sadis-server/charts
82 helm repo update
83
84 # removing ETCD port forward
85 P_ID="\$(ps e -ww -A | grep "_TAG=etcd-port-forward" | grep -v grep | awk '{print \$1}')"
86 if [ -n "\$P_ID" ]; then
87 kill -9 \$P_ID
88 fi
89
Matteo Scandolo9fe8cad2020-11-13 12:54:19 -080090 NAMESPACES="voltha1 voltha2 infra default"
91 for NS in \$NAMESPACES
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080092 do
Matteo Scandolo9fe8cad2020-11-13 12:54:19 -080093 for hchart in \$(helm list -n \$NS -q | grep -E -v 'docker-registry|kafkacat');
94 do
95 echo "Purging chart: \${hchart}"
96 helm delete -n \$NS "\${hchart}"
97 done
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080098 done
Matteo Scandolo4b006ae2020-11-09 16:14:40 -080099
100 test -e $WORKSPACE/kind-voltha/voltha && cd $WORKSPACE/kind-voltha && ./voltha down
101
102 cd $WORKSPACE
103 rm -rf $WORKSPACE/*
104 """
105 }
106 }
107 }
108 stage('Clone kind-voltha') {
109 steps {
110 checkout([
111 $class: 'GitSCM',
112 userRemoteConfigs: [[
113 url: "https://gerrit.opencord.org/kind-voltha",
114 refspec: "${kindVolthaChange}"
115 ]],
116 branches: [[ name: "master", ]],
117 extensions: [
118 [$class: 'WipeWorkspace'],
119 [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
120 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
121 ],
122 ])
123 script {
124 sh(script:"""
125 if [ '${kindVolthaChange}' != '' ] ; then
126 cd $WORKSPACE/kind-voltha;
127 git fetch https://gerrit.opencord.org/kind-voltha ${kindVolthaChange} && git checkout FETCH_HEAD
128 fi
129 """)
130 }
131 }
132 }
133 stage('Clone voltha-system-tests') {
134 steps {
135 checkout([
136 $class: 'GitSCM',
137 userRemoteConfigs: [[
138 url: "https://gerrit.opencord.org/voltha-system-tests",
139 refspec: "${volthaSystemTestsChange}"
140 ]],
141 branches: [[ name: "${release}", ]],
142 extensions: [
143 [$class: 'WipeWorkspace'],
144 [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
145 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
146 ],
147 ])
148 script {
149 sh(script:"""
150 if [ '${volthaSystemTestsChange}' != '' ] ; then
151 cd $WORKSPACE/voltha-system-tests;
152 git fetch https://gerrit.opencord.org/voltha-system-tests ${volthaSystemTestsChange} && git checkout FETCH_HEAD
153 fi
154 """)
155 }
156 }
157 }
158 stage('Build patch') {
159 when {
160 expression {
161 return params.GERRIT_PROJECT
162 }
163 }
164 steps {
165 sh """
166 git clone https://\$GERRIT_HOST/\$GERRIT_PROJECT
167 cd \$GERRIT_PROJECT
168 git fetch https://\$GERRIT_HOST/\$GERRIT_PROJECT \$GERRIT_REFSPEC && git checkout FETCH_HEAD
169
170 DOCKER_REGISTRY=${dockerRegistry}/ DOCKER_REPOSITORY=voltha/ DOCKER_TAG=voltha-scale make docker-build
171 DOCKER_REGISTRY=${dockerRegistry}/ DOCKER_REPOSITORY=voltha/ DOCKER_TAG=voltha-scale make docker-push
172 """
173 }
174 }
175 stage('Deploy common infrastructure') {
176 // includes monitoring, kafka, etcd
177 steps {
178 sh '''
179 if [ ${withMonitoring} = true ] ; then
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800180 helm install -n $INFRA_NS nem-monitoring cord/nem-monitoring \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800181 -f $HOME/voltha-scale/grafana.yaml \
182 --set prometheus.alertmanager.enabled=false,prometheus.pushgateway.enabled=false \
183 --set kpi_exporter.enabled=false,dashboards.xos=false,dashboards.onos=false,dashboards.aaa=false,dashboards.voltha=false
184 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800185 '''
186 }
187 }
188 stage('Deploy VOLTHA infrastructure') {
189 steps {
190 sh returnStdout: false, script: '''
Matteo Scandolo128ee7a2020-12-03 14:16:54 -0800191
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800192 cd $WORKSPACE/kind-voltha/
193
Matteo Scandolof6656562020-11-16 14:45:44 -0800194 export ETCD_CHART=$HOME/teone/helm-charts/etcd
195 export KAFKA_CHART=$HOME/teone/helm-charts/kafka
Matteo Scandolob28a97b2020-11-13 10:58:32 -0800196
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800197 # KAFKA config
Matteo Scandolof6656562020-11-16 14:45:44 -0800198 export NUM_OF_KAFKA=${kafkaReplicas}
199 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 -0800200
201 # ETCD config
Matteo Scandolof6656562020-11-16 14:45:44 -0800202 export EXTRA_HELM_FLAGS+=" --set memoryMode=${inMemoryEtcdStorage} "
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800203
204 NAME=infra JUST_INFRA=y ./voltha up
205
206 # Forward the ETCD port onto $VOLTHA_ETCD_PORT
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800207 _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 -0800208 '''
209 }
210 }
211 stage('Deploy Voltha') {
212 steps {
213 deploy_voltha_stacks(params.volthaStacks)
214 }
215 }
216 stage('Start logging') {
217 steps {
218 sh returnStdout: false, script: '''
219 # start logging with kail
220
221 mkdir -p $LOG_FOLDER
222
223 list=($APPS_TO_LOG)
224 for app in "${list[@]}"
225 do
226 echo "Starting logs for: ${app}"
227 _TAG=kail-$app kail -l app=$app --since 1h > $LOG_FOLDER/$app.log&
228 done
229 '''
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800230 }
231 }
232 stage('Configuration') {
233 steps {
234 script {
235 sh returnStdout: false, script: """
Matteo Scandolo68978752020-12-02 12:23:42 -0800236
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800237 # TODO this needs to be repeated per stack
238 # kubectl exec \$(kubectl get pods | grep -E "bbsim[0-9]" | awk 'NR==1{print \$1}') -- bbsimctl log ${logLevel.toLowerCase()} false
239
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800240 #Setting link discovery
241 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 -0800242 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
243 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 -0800244 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 -0800245 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
246
Matteo Scandoloffe19c92020-11-24 15:25:25 -0800247 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 cfg log:set ${logLevel} org.onosproject
248 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 -0800249
250 # Set Flows/Ports/Meters poll frequency
251 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}
252 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}
253
254 if [ ${withFlows} = false ]; then
255 sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 app deactivate org.opencord.olt
256 fi
257
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800258 if [ ${withPcap} = true ] && [ ${volthaStacks} -eq 1 ] ; then
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800259 # Start the tcp-dump in ofagent
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800260 export OF_AGENT=\$(kubectl -n \$INFRA_NS get pods -l app=ofagent -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800261 kubectl exec \$OF_AGENT -- apk update
262 kubectl exec \$OF_AGENT -- apk add tcpdump
263 kubectl exec \$OF_AGENT -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800264 _TAG=ofagent-tcpdump kubectl -n \$INFRA_NS exec \$OF_AGENT -- tcpdump -nei eth0 -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800265
266 # Start the tcp-dump in radius
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800267 export RADIUS=\$(kubectl -n \$INFRA_NS get pods -l app=radius -o name)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800268 kubectl exec \$RADIUS -- apt-get update
269 kubectl exec \$RADIUS -- apt-get install -y tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800270 _TAG=radius-tcpdump kubectl -n \$INFRA_NS exec \$RADIUS -- tcpdump -w out.pcap&
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800271
272 # Start the tcp-dump in ONOS
273 for i in \$(seq 0 \$ONOSES); do
274 INSTANCE="onos-onos-classic-\$i"
275 kubectl exec \$INSTANCE -- apt-get update
276 kubectl exec \$INSTANCE -- apt-get install -y tcpdump
277 kubectl exec \$INSTANCE -- mv /usr/sbin/tcpdump /usr/bin/tcpdump
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800278 _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 -0800279 done
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800280 else
281 echo "PCAP not supported for multiple VOLTHA stacks"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800282 fi
283 """
284 }
285 }
286 }
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800287 stage('Setup Test') {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800288 steps {
289 sh '''
290 mkdir -p $WORKSPACE/RobotLogs
291 cd $WORKSPACE/voltha-system-tests
292 make vst_venv
293 '''
294 sh '''
Matteo Scandolod1430a72020-12-04 15:14:44 -0800295 if [ ${withProfiling} = true ] && [ ${volthaStacks} -eq 1 ]; then
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800296 mkdir -p $LOG_FOLDER/pprof
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800297 cat << EOF > $WORKSPACE/pprof.sh
298timestamp() {
299 date +"%T"
300}
301
302i=0
303while [[ true ]]; do
304 ((i++))
305 ts=$(timestamp)
306 go tool pprof -png http://127.0.0.1:6060/debug/pprof/heap > $LOG_FOLDER/pprof/rw-core-heap-\\$i-\\$ts.png
307 go tool pprof -png http://127.0.0.1:6060/debug/pprof/goroutine > $LOG_FOLDER/pprof/rw-core-goroutine-\\$i-\\$ts.png
308 curl -o $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=10
309 go tool pprof -png $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/rw-core-profile-\\$i-\\$ts.png
310
311 go tool pprof -png http://127.0.0.1:6061/debug/pprof/heap > $LOG_FOLDER/pprof/openolt-heap-\\$i-\\$ts.png
312 go tool pprof -png http://127.0.0.1:6061/debug/pprof/goroutine > $LOG_FOLDER/pprof/openolt-goroutine-\\$i-\\$ts.png
313 curl -o $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof http://127.0.0.1:6061/debug/pprof/profile?seconds=10
314 go tool pprof -png $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/openolt-profile-\\$i-\\$ts.png
315
316 go tool pprof -png http://127.0.0.1:6062/debug/pprof/heap > $LOG_FOLDER/pprof/ofagent-heap-\\$i-\\$ts.png
317 go tool pprof -png http://127.0.0.1:6062/debug/pprof/goroutine > $LOG_FOLDER/pprof/ofagent-goroutine-\\$i-\\$ts.png
318 curl -o $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof http://127.0.0.1:6062/debug/pprof/profile?seconds=10
319 go tool pprof -png $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.pprof > $LOG_FOLDER/pprof/ofagent-profile-\\$i-\\$ts.png
320
321 sleep 10
322done
323EOF
324
325 _TAG="pprof"
326 _TAG=$_TAG bash $WORKSPACE/pprof.sh &
Matteo Scandolod1430a72020-12-04 15:14:44 -0800327 else
328 echo "Profiling not supported for multiple VOLTHA stacks"
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800329 fi
330 '''
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800331 }
332 }
333 stage('Run Test') {
334 steps {
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800335 test_voltha_stacks(params.volthaStacks)
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800336 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800337 }
338 }
339 post {
340 always {
341 // collect result, done in the "post" step so it's executed even in the
342 // event of a timeout in the tests
343 sh '''
344
345 # stop the kail processes
346 list=($APPS_TO_LOG)
347 for app in "${list[@]}"
348 do
349 echo "Stopping logs for: ${app}"
350 _TAG="kail-$app"
351 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
352 if [ -n "$P_IDS" ]; then
353 echo $P_IDS
354 for P_ID in $P_IDS; do
355 kill -9 $P_ID
356 done
357 fi
358 done
359
Matteo Scandolod1430a72020-12-04 15:14:44 -0800360 if [ ${withPcap} = true ] && [ ${volthaStacks} -eq 1 ]; then
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800361 # stop ofAgent tcpdump
362 P_ID="\$(ps e -ww -A | grep "_TAG=ofagent-tcpdump" | grep -v grep | awk '{print \$1}')"
363 if [ -n "\$P_ID" ]; then
364 kill -9 \$P_ID
365 fi
366
367 # stop radius tcpdump
368 P_ID="\$(ps e -ww -A | grep "_TAG=radius-tcpdump" | grep -v grep | awk '{print \$1}')"
369 if [ -n "\$P_ID" ]; then
370 kill -9 \$P_ID
371 fi
372
373 # stop onos tcpdump
374 LIMIT=$(($NUM_OF_ONOS - 1))
375 for i in $(seq 0 $LIMIT); do
376 INSTANCE="onos-onos-classic-$i"
377 P_ID="\$(ps e -ww -A | grep "_TAG=$INSTANCE" | grep -v grep | awk '{print \$1}')"
378 if [ -n "\$P_ID" ]; then
379 kill -9 \$P_ID
380 fi
381 done
382
383 # copy the file
384 export OF_AGENT=$(kubectl get pods -l app=ofagent | awk 'NR==2{print $1}') || true
385 kubectl cp $OF_AGENT:out.pcap $LOG_FOLDER/ofagent.pcap || true
386
387 export RADIUS=$(kubectl get pods -l app=radius | awk 'NR==2{print $1}') || true
388 kubectl cp $RADIUS:out.pcap $LOG_FOLDER/radius.pcap || true
389
390 LIMIT=$(($NUM_OF_ONOS - 1))
391 for i in $(seq 0 $LIMIT); do
392 INSTANCE="onos-onos-classic-$i"
393 kubectl cp $INSTANCE:out.pcap $LOG_FOLDER/$INSTANCE.pcap || true
394 done
395 fi
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800396 '''
397 sh '''
Matteo Scandolod1430a72020-12-04 15:14:44 -0800398 if [ ${withProfiling} = true ] && [ ${volthaStacks} -eq 1 ]; then
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800399 _TAG="pprof"
400 P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
401 if [ -n "$P_IDS" ]; then
402 echo $P_IDS
403 for P_ID in $P_IDS; do
404 kill -9 $P_ID
405 done
406 fi
407 fi
408 '''
409 plot([
410 csvFileName: 'scale-test.csv',
411 csvSeries: [
412 [file: 'plots/plot-voltha-onus.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
413 [file: 'plots/plot-onos-ports.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
414 [file: 'plots/plot-voltha-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
415 [file: 'plots/plot-voltha-openolt-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
416 [file: 'plots/plot-onos-flows-before.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
417 [file: 'plots/plot-onos-auth.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
418 [file: 'plots/plot-voltha-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
419 [file: 'plots/plot-voltha-openolt-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
420 [file: 'plots/plot-onos-flows-after.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
421 [file: 'plots/plot-onos-dhcp.txt', displayTableFlag: false, exclusionValues: '', inclusionFlag: 'OFF', url: ''],
422 ],
Matteo Scandolod1430a72020-12-04 15:14:44 -0800423 group: 'Voltha-Scale-Numbers', numBuilds: '20', style: 'line', title: "Scale Test (Stacks: ${params.volthaStacks}, OLTs: ${olts}, PONs: ${pons}, ONUs: ${onus})", yaxis: 'Time (s)', useDescr: true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800424 ])
425 step([$class: 'RobotPublisher',
426 disableArchiveOutput: false,
Matteo Scandolod4064492020-11-13 10:48:30 -0800427 logFileName: 'RobotLogs/**/log.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800428 otherFiles: '',
Matteo Scandolod4064492020-11-13 10:48:30 -0800429 outputFileName: 'RobotLogs/**/output.xml',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800430 outputPath: '.',
431 passThreshold: 100,
Matteo Scandolod4064492020-11-13 10:48:30 -0800432 reportFileName: 'RobotLogs/**/report.html',
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800433 unstableThreshold: 0]);
434 // get all the logs from kubernetes PODs
435 sh returnStdout: false, script: '''
436
437 # store information on running charts
Matteo Scandolod4064492020-11-13 10:48:30 -0800438 helm ls --all-namespaces > $LOG_FOLDER/helm-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800439
440 # store information on the running pods
Matteo Scandolod4d55b72020-11-25 12:29:07 -0800441 kubectl get pods --all-namespaces -o wide > $LOG_FOLDER/pods.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800442 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-images.txt || true
443 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-imagesId.txt || true
444
445 # copy the ONOS logs directly from the container to avoid the color codes
Matteo Scandolobe823242020-11-20 13:48:13 -0800446 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 -0800447
448 # get radius logs out of the container
Matteo Scandolod4064492020-11-13 10:48:30 -0800449 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 -0800450 '''
451 // dump all the BBSim(s) ONU information
Matteo Scandolod4064492020-11-13 10:48:30 -0800452 script {
453 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
454 stack_ns="voltha"+i
455 sh """
456 BBSIM_IDS=\$(kubectl -n ${stack_ns} get pods | grep bbsim | grep -v server | awk '{print \$1}')
457 IDS=(\$BBSIM_IDS)
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800458
Matteo Scandolod4064492020-11-13 10:48:30 -0800459 for bbsim in "\${IDS[@]}"
460 do
Matteo Scandolod1430a72020-12-04 15:14:44 -0800461 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl onu list > $LOG_FOLDER/${stack_ns}/\$bbsim-device-list.txt || true
462 kubectl -n ${stack_ns} exec -t \$bbsim -- bbsimctl service list > $LOG_FOLDER/${stack_ns}/\$bbsim-service-list.txt || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800463 done
464 """
465 }
466 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800467 // get ONOS debug infos
468 sh '''
469
470 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
471 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
472 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
473 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
474
475 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
476 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
477
478 if [ ${withFlows} = true ] ; then
479 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
480 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
481 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
482 fi
483
484 if [ ${provisionSubscribers} = true ]; then
485 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
486 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
487 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
488 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
489 fi
490
491 if [ ${withEapol} = true ] ; then
492 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
493 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
494 fi
495
496 if [ ${withDhcp} = true ] ; then
497 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
498 fi
499 '''
500 // collect etcd metrics
501 sh '''
502 mkdir -p $WORKSPACE/etcd-metrics
503 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
504 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
505 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
506 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
507 '''
508 // get VOLTHA debug infos
509 script {
Matteo Scandolod4064492020-11-13 10:48:30 -0800510 for (int i = 1; i <= params.volthaStacks.toInteger(); i++) {
511 stack_ns="voltha"+i
512 voltcfg="~/.volt/config-voltha"+i
Matteo Scandolod4064492020-11-13 10:48:30 -0800513 try {
514 sh """
Matteo Scandolod1430a72020-12-04 15:14:44 -0800515 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list -o json > $LOG_FOLDER/${stack_ns}/device-list.json || true
516 python -m json.tool $LOG_FOLDER/${stack_ns}/device-list.json > $LOG_FOLDER/${stack_ns}/voltha-devices-list.json || true
517 rm $LOG_FOLDER/${stack_ns}/device-list.json || true
518 voltctl -c $HOME/.volt/config-${stack_ns} -m 8MB device list > $LOG_FOLDER/${stack_ns}/voltha-devices-list.txt || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800519
Matteo Scandolod4064492020-11-13 10:48:30 -0800520 DEVICE_LIST=
Matteo Scandolod1430a72020-12-04 15:14:44 -0800521 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/${stack_ns}/voltha-device-flows-#.txt" || true
522 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/${stack_ns}/voltha-device-ports-#.txt" || true
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800523
Matteo Scandolod1430a72020-12-04 15:14:44 -0800524 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/${stack_ns}/voltha-logicaldevice-flows-#.txt" || true
525 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/${stack_ns}/voltha-logicaldevice-ports-#.txt" || true
Matteo Scandolod4064492020-11-13 10:48:30 -0800526 """
527 } catch(e) {
528 sh '''
529 echo "Can't get device list from voltclt"
530 '''
531 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800532 }
533 }
534 // get cpu usage by container
535 sh '''
536 if [ ${withMonitoring} = true ] ; then
537 cd $WORKSPACE/voltha-system-tests
538 source ./vst_venv/bin/activate
539 sleep 60 # we have to wait for prometheus to collect all the information
540 python tests/scale/sizing.py -o $WORKSPACE/plots || true
541 fi
542 '''
Matteo Scandolo89311a12020-12-05 14:43:58 -0800543 archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time-*.txt,logs/**/*,RobotLogs/**/*,plots/*,etcd-metrics/*'
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800544 }
545 }
546}
547
548def deploy_voltha_stacks(numberOfStacks) {
549 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
550 stage("Deploy VOLTHA stack " + i) {
551 sh returnStdout: false, script: """
Matteo Scandolo77501cc2020-12-11 09:49:07 -0800552
553 # unset voltha-api port so that the port is forwarded on a new one
554 unset VOLTHA_API_PORT
555
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800556 cd $WORKSPACE/kind-voltha/
557
558 export NAME=voltha${i}
559 export VOLTHA_NS=voltha${i}
560 export ADAPTER_NS=voltha${i}
561 export BBSIM_NS=voltha${i}
562 export BBSIM_BASE_INDEX=${i}
563 export WITH_ETCD=etcd.\$INFRA_NS.svc:2379
564 export WITH_KAFKA=kafka.\$INFRA_NS.svc:9092
565 export WITH_ONOS=onos-onos-classic-hs.\$INFRA_NS.svc:6653
566
567 export EXTRA_HELM_FLAGS+=' '
568
569 # Load the release defaults
570 if [ '${release.trim()}' != 'master' ]; then
571 source $WORKSPACE/kind-voltha/releases/${release}
572 EXTRA_HELM_FLAGS+=" ${extraHelmFlags} "
573 fi
574
575 # BBSim custom image handling
576 if [ '${bbsimImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'bbsim' ]; then
577 IFS=: read -r bbsimRepo bbsimTag <<< '${bbsimImg.trim()}'
578 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=\$bbsimRepo,images.bbsim.tag=\$bbsimTag "
579 fi
580
581 # VOLTHA and ofAgent custom image handling
582 # NOTE to override the rw-core image in a released version you must set the ofAgent image too
583 # TODO split ofAgent and voltha-go
584 if [ '${rwCoreImg.trim()}' != '' ] && [ '${ofAgentImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-go' ]; then
585 IFS=: read -r rwCoreRepo rwCoreTag <<< '${rwCoreImg.trim()}'
586 IFS=: read -r ofAgentRepo ofAgentTag <<< '${ofAgentImg.trim()}'
587 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=\$rwCoreRepo,images.rw_core.tag=\$rwCoreTag,images.ofagent.repository=\$ofAgentRepo,images.ofagent.tag=\$ofAgentTag "
588 fi
589
590 # OpenOLT custom image handling
591 if [ '${openoltAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openolt-adapter' ]; then
592 IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< '${openoltAdapterImg.trim()}'
593 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=\$openoltAdapterRepo,images.adapter_open_olt.tag=\$openoltAdapterTag "
594 fi
595
596 # OpenONU custom image handling
597 if [ '${openonuAdapterImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter' ]; then
598 IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< '${openonuAdapterImg.trim()}'
599 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=\$openonuAdapterRepo,images.adapter_open_onu.tag=\$openonuAdapterTag "
600 fi
601
Andrea Campanella28763082020-11-18 10:55:31 +0100602 # OpenONU Go custom image handling
603 if [ '${openonuAdapterGoImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-openonu-adapter-go' ]; then
604 IFS=: read -r openonuAdapterGoRepo openonuAdapterGoTag <<< '${openonuAdapterGoImg.trim()}'
Andrea Campanellaed026982020-11-20 10:06:42 +0100605 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 +0100606 fi
607
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800608 # ONOS custom image handling
609 if [ '${onosImg.trim()}' != '' ] && [ '\$GERRIT_PROJECT' != 'voltha-onos' ]; then
610 IFS=: read -r onosRepo onosTag <<< '${onosImg.trim()}'
611 EXTRA_HELM_FLAGS+="--set images.onos.repository=\$onosRepo,images.onos.tag=\$onosTag "
612 fi
613
614 # set BBSim parameters
615 EXTRA_HELM_FLAGS+='--set enablePerf=true,pon=${pons},onu=${onus} '
616
617 # disable the securityContext, this is a development cluster
618 EXTRA_HELM_FLAGS+='--set securityContext.enabled=false '
619
620 # No persistent-volume-claims in Atomix
621 EXTRA_HELM_FLAGS+="--set atomix.persistence.enabled=false "
622
623 echo "Installing with the following extra arguments:"
624 echo $EXTRA_HELM_FLAGS
625
626 # if it's newer than voltha-2.4 set the correct BBSIM_CFG
627 if [ '${release.trim()}' != 'voltha-2.4' ]; then
628 export BBSIM_CFG="$WORKSPACE/kind-voltha/configs/bbsim-sadis-${workflow}.yaml"
629 fi
630
631 # Use custom built images
632
633 if [ '\$GERRIT_PROJECT' == 'voltha-go' ]; then
634 EXTRA_HELM_FLAGS+="--set images.rw_core.repository=${dockerRegistry}/voltha/voltha-rw-core,images.rw_core.tag=voltha-scale "
635 fi
636
637 if [ '\$GERRIT_PROJECT' == 'voltha-openolt-adapter' ]; then
638 EXTRA_HELM_FLAGS+="--set images.adapter_open_olt.repository=${dockerRegistry}/voltha/voltha-openolt-adapter,images.adapter_open_olt.tag=voltha-scale "
639 fi
640
641 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter' ]; then
642 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu.repository=${dockerRegistry}/voltha/voltha-openonu-adapter,images.adapter_open_onu.tag=voltha-scale "
643 fi
644
Andrea Campanellaed026982020-11-20 10:06:42 +0100645 if [ '\$GERRIT_PROJECT' == 'voltha-openonu-adapter-go' ]; then
646 EXTRA_HELM_FLAGS+="--set images.adapter_open_onu_go.repository=${dockerRegistry}/voltha/voltha-openonu-adapter-go,images.adapter_open_onu_go.tag=voltha-scale "
647 fi
648
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800649 if [ '\$GERRIT_PROJECT' == 'ofagent-go' ]; then
650 EXTRA_HELM_FLAGS+="--set images.ofagent.repository=${dockerRegistry}/voltha/voltha-ofagent-go,images.ofagent.tag=voltha-scale "
651 fi
652
653 if [ '\$GERRIT_PROJECT' == 'voltha-onos' ]; then
654 EXTRA_HELM_FLAGS+="--set images.onos.repository=${dockerRegistry}/voltha/voltha-onos,images.onos.tag=voltha-scale "
655 fi
656
657 if [ '\$GERRIT_PROJECT' == 'bbsim' ]; then
658 EXTRA_HELM_FLAGS+="--set images.bbsim.repository=${dockerRegistry}/voltha/bbsim,images.bbsim.tag=voltha-scale "
659 fi
660
661 ./voltha up
662 """
663 }
664 }
665}
666
667def test_voltha_stacks(numberOfStacks) {
668 for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
669 stage("Test VOLTHA stack " + i) {
670 timeout(time: 15, unit: 'MINUTES') {
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800671 sh """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800672 export VOLTCONFIG="$HOME/.volt/config-voltha${i}"
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800673 ROBOT_PARAMS="-v stackId:${i} \
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800674 -v olt:${olts} \
675 -v pon:${pons} \
676 -v onu:${onus} \
677 -v workflow:${workflow} \
678 -v withEapol:${withEapol} \
679 -v withDhcp:${withDhcp} \
680 -v withIgmp:${withIgmp} \
681 --noncritical non-critical \
682 -e teardown "
683
684 if [ ${withEapol} = false ] ; then
685 ROBOT_PARAMS+="-e authentication "
686 fi
687
688 if [ ${withDhcp} = false ] ; then
689 ROBOT_PARAMS+="-e dhcp "
690 fi
691
692 if [ ${provisionSubscribers} = false ] ; then
693 # if we're not considering subscribers then we don't care about authentication and dhcp
694 ROBOT_PARAMS+="-e authentication -e provision -e flow-after -e dhcp "
695 fi
696
697 if [ ${withFlows} = false ] ; then
698 ROBOT_PARAMS+="-i setup -i activation "
699 fi
700
701 cd $WORKSPACE/voltha-system-tests
702 source ./vst_venv/bin/activate
Matteo Scandolo5f6c5492020-11-12 17:37:25 -0800703 robot -d $WORKSPACE/RobotLogs/voltha${i} \
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800704 \$ROBOT_PARAMS tests/scale/Voltha_Scale_Tests.robot
Matteo Scandolof7ca6312020-11-16 15:57:15 -0800705
706 # collect results
707 python tests/scale/collect-result.py -r $WORKSPACE/RobotLogs/voltha${i}/output.xml -p $WORKSPACE/plots > $WORKSPACE/execution-time-voltha${i}.txt || true
708 cat $WORKSPACE/execution-time-voltha${i}.txt
Matteo Scandolodc4608c2020-11-12 16:48:16 -0800709 """
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800710 }
711 }
Matteo Scandolo4b006ae2020-11-09 16:14:40 -0800712 }
713}