Adding support for custom charts and log collections from multiple pods to the voltha-scale-measurements job
Change-Id: Iaefcf83e00c129a3df7944c9fb9bd9c3eab4371c
diff --git a/jjb/pipeline/voltha-scale-measurements.groovy b/jjb/pipeline/voltha-scale-measurements.groovy
index eabac77..d4abd46 100644
--- a/jjb/pipeline/voltha-scale-measurements.groovy
+++ b/jjb/pipeline/voltha-scale-measurements.groovy
@@ -63,16 +63,17 @@
IFS=: read -r volthaRepo volthaTag <<< ${volthaImg}
IFS=: read -r ofAgentRepo ofAgentTag <<< ${ofAgentImg}
- helm install -n voltha onf/voltha -f /home/cord/voltha-scale/voltha-values.yaml --set images.voltha.repository=${volthaRepo},images.voltha.tag=${volthaTag},images.ofagent.repository=${ofAgentRepo},images.ofagent.tag=${ofAgentTag} ${extraHelmFlags}
+ helm install -n voltha ${volthaChart} -f /home/cord/voltha-scale/voltha-values.yaml --set images.voltha.repository=${volthaRepo},images.voltha.tag=${volthaTag},images.ofagent.repository=${ofAgentRepo},images.ofagent.tag=${ofAgentTag} ${extraHelmFlags}
IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< ${openoltAdapterImg}
- helm install -n openolt onf/voltha-adapter-openolt -f /home/cord/voltha-scale/voltha-values.yaml --set images.adapter_open_olt.repository=${openoltAdapterRepo},images.adapter_open_olt.tag=${openoltAdapterTag} ${extraHelmFlags}
+ helm install -n openolt ${openoltAdapterChart} -f /home/cord/voltha-scale/voltha-values.yaml --set images.adapter_open_olt.repository=${openoltAdapterRepo},images.adapter_open_olt.tag=${openoltAdapterTag} ${extraHelmFlags}
IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< ${openonuAdapterImg}
- helm install -n openonu onf/voltha-adapter-openonu -f /home/cord/voltha-scale/voltha-values.yaml --set images.adapter_open_onu.repository=${openonuAdapterRepo},images.adapter_open_onu.tag=${openonuAdapterTag} ${extraHelmFlags}
+ helm install -n openonu ${openonuAdapterChart} -f /home/cord/voltha-scale/voltha-values.yaml --set images.adapter_open_onu.repository=${openonuAdapterRepo},images.adapter_open_onu.tag=${openonuAdapterTag} ${extraHelmFlags}
IFS=: read -r bbsimRepo bbsimTag <<< ${bbsimImg}
- helm install -n bbsim onf/bbsim --set pon=${ponPorts},onu=${onuPerPon},auth=${bbsimAuth},dhcp=${bbsimDhcp},delay=${BBSIMdelay},images.bbsim.repository=${bbsimRepo},images.bbsim.tag=${bbsimTag} ${extraHelmFlags}
+ helm install -n bbsim ${bbsimChart} --set pon=${ponPorts},onu=${onuPerPon},auth=${bbsimAuth},dhcp=${bbsimDhcp},delay=${BBSIMdelay},images.bbsim.repository=${bbsimRepo},images.bbsim.tag=${bbsimTag} ${extraHelmFlags}
+
helm install -n radius onf/freeradius ${extraHelmFlags}
bash /home/cord/voltha-scale/wait_for_pods.sh
@@ -216,9 +217,12 @@
python -m json.tool device-list.json > voltha-devices-list.json
sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost ports > onos-ports-list.txt
curl -s -X GET -G http://127.0.0.1:31301/api/v1/query --data-urlencode 'query=avg(rate(container_cpu_usage_seconds_total[10m])*100) by (pod_name)' | jq . > cpu-usage.json
- kubectl logs $(kubectl get pods --all-namespaces | grep "adapter-open-olt" | awk '{ print $2 }') > open-olt-logs.txt
- kubectl logs $(kubectl get pods --all-namespaces | grep "adapter-open-onu" | awk '{ print $2 }') > open-onu-logs.txt
- kubectl logs $(kubectl get pods --all-namespaces | grep "voltha-rw" | awk '{ print $2 }') > voltha-rw-core-logs.txt
+ kubectl log deployment/adapter-open-olt > open-olt-logs.txt
+ kubectl log deployment/adapter-open-onu > open-onu-logs.txt
+ kubectl log deployment/voltha-rw-core > voltha-rw-core-logs.txt
+ kubectl log deployment/voltha-ofagent > voltha-ofagent-logs.txt
+ kubectl log deployment/bbsim > bbsim-logs.txt
+
rm -rf BBSM-12345123451234512345-00000000000001-v1.json device-list.json onus.txt ports.txt temp.txt
'''
plot([
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index f5b69f4..71e20b6 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -252,6 +252,11 @@
description: 'Custom image selection for BBSIM (repo:tag)'
- string:
+ name: bbsimChart
+ default: onf/bbsim
+ description: 'BBSim chart name (or location on file system)'
+
+ - string:
name: volthaImg
default: 'voltha/voltha-rw-core:master'
description: 'Custom image selection for VOLTHA (repo:tag)'
@@ -262,16 +267,31 @@
description: 'Custom image selection for OfAgent (repo:tag)'
- string:
+ name: volthaChart
+ default: onf/voltha
+ description: 'VOLTHA chart name (or location on file system)'
+
+ - string:
name: openoltAdapterImg
default: voltha/voltha-openolt-adapter:master
description: 'Custom image selection for Openolt Adapter (repo:tag)'
- string:
+ name: openoltAdapterChart
+ default: onf/voltha-adapter-openolt
+ description: 'OpenOLT chart name (or location on file system)'
+
+ - string:
name: openonuAdapterImg
default: voltha/voltha-openonu-adapter:master
description: 'Custom image selection for Openonu Adapter (repo:tag)'
- string:
+ name: openonuAdapterChart
+ default: onf/voltha-adapter-openonu
+ description: 'OpenONU chart name (or location on file system)'
+
+ - string:
name: onosImg
default: voltha/voltha-onos:4.0.1
description: 'Custom image selection for Openonu Adapter (repo:tag)'
@@ -384,6 +404,11 @@
description: 'Custom image selection for BBSIM (repo:tag)'
- string:
+ name: bbsimChart
+ default: onf/bbsim
+ description: 'BBSim chart name (or location on file system)'
+
+ - string:
name: volthaImg
default: voltha/voltha-rw-core:master
description: 'Custom image selection for VOLTHA (repo:tag)'
@@ -394,16 +419,31 @@
description: 'Custom image selection for OfAgent (repo:tag)'
- string:
+ name: volthaChart
+ default: onf/voltha
+ description: 'VOLTHA chart name (or location on file system)'
+
+ - string:
name: openoltAdapterImg
default: voltha/voltha-openolt-adapter:master
description: 'Custom image selection for Openolt Adapter (repo:tag)'
- string:
+ name: openoltAdapterChart
+ default: onf/voltha-adapter-openolt
+ description: 'OpenOLT chart name (or location on file system)'
+
+ - string:
name: openonuAdapterImg
default: voltha/voltha-openonu-adapter:master
description: 'Custom image selection for Openonu Adapter (repo:tag)'
- string:
+ name: openonuAdapterChart
+ default: onf/voltha-adapter-openonu
+ description: 'OpenONU chart name (or location on file system)'
+
+ - string:
name: onosImg
default: voltha/voltha-onos:4.0.1
description: 'Custom image selection for Openonu Adapter (repo:tag)'