[VOL-3780] using keywords in physical build
Change-Id: I6fbe3797f57920b5d8ebb2419c8c2ba6de9d0901
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 8b02a88..3cc9064 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -139,23 +139,11 @@
ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
"""
// collect pod details
- get_pods_info("$WORKSPACE/${name}")
+ getPodsInfo("$WORKSPACE/${name}")
helmTeardown(['infra', 'voltha'])
}
}
-def get_pods_info(dest) {
- // collect pod details, this is here in case of failure
- sh """
- mkdir -p ${dest}
- kubectl get pods --all-namespaces -o wide | tee ${dest}/pods.txt || true
- kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee ${dest}/pod-images.txt || true
- kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee ${dest}/pod-imagesId.txt || true
- kubectl describe pods --all-namespaces -l app.kubernetes.io/part-of=voltha > ${dest}/pods-describe.txt
- helm ls --all-namespaces | tee ${dest}/helm-charts.txt
- """
-}
-
pipeline {
/* no label, executor is determined by JJB */
@@ -226,14 +214,14 @@
post {
aborted {
- get_pods_info("$WORKSPACE/failed")
+ getPodsInfo("$WORKSPACE/failed")
sh """
kubectl logs -n voltha -l app.kubernetes.io/part-of=voltha > $WORKSPACE/failed/voltha.log
"""
archiveArtifacts artifacts: '**/*.log,**/*.txt'
}
failure {
- get_pods_info("$WORKSPACE/failed")
+ getPodsInfo("$WORKSPACE/failed")
sh """
kubectl logs -n voltha -l app.kubernetes.io/part-of=voltha > $WORKSPACE/failed/voltha.logs
"""
diff --git a/jjb/pipeline/voltha/master/physical-build.groovy b/jjb/pipeline/voltha/master/physical-build.groovy
new file mode 100644
index 0000000..573efa7
--- /dev/null
+++ b/jjb/pipeline/voltha/master/physical-build.groovy
@@ -0,0 +1,305 @@
+// Copyright 2017-present Open Networking Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// used to deploy VOLTHA and configure ONOS physical PODs
+
+// NOTE we are importing the library even if it's global so that it's
+// easier to change the keywords during a replay
+library identifier: 'cord-jenkins-libraries@master',
+ retriever: modernSCM([
+ $class: 'GitSCMSource',
+ remote: 'https://gerrit.opencord.org/ci-management.git'
+])
+
+def infraNamespace = "infra"
+def volthaNamespace = "voltha"
+
+pipeline {
+
+ /* no label, executor is determined by JJB */
+ agent {
+ label "${params.buildNode}"
+ }
+ options {
+ timeout(time: 35, unit: 'MINUTES')
+ }
+ environment {
+ PATH="$PATH:$WORKSPACE/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
+ KUBECONFIG="$HOME/.kube/kind-config-${clusterName}"
+ }
+
+ stages{
+ stage('Download Code') {
+ getVolthaCode([
+ branch: "${branch}",
+ volthaHelmChartsChange: "${volthaHelmChartsChange}",
+ ])
+ }
+ stage ("Parse deployment configuration file") {
+ sh returnStdout: true, script: "rm -rf ${configBaseDir}"
+ sh returnStdout: true, script: "git clone -b master ${cordRepoUrl}/${configBaseDir}"
+ if ( params.workFlow == "DT" ) {
+ deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
+ }
+ else if ( params.workFlow == "TT" )
+ {
+ deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-TT.yaml"
+ }
+ else
+ {
+ deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
+ }
+ }
+ stage('Clean up') {
+ timeout(15) {
+ script {
+ helmTeardown(["default", infraNamespace, volthaNamespace])
+ }
+ timeout(1) {
+ sh returnStdout: false, script: '''
+ # remove orphaned port-forward from different namespaces
+ ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
+ '''
+ }
+ }
+ }
+ stage('Install Voltha') {
+ timeout(20) {
+
+ // if we're downloading a voltha-helm-charts patch, then install from a local copy of the charts
+ def localCharts = false
+ if (volthaHelmChartsChange != "") {
+ localCharts = true
+ }
+
+ def extraHelmFlags = "-f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/voltha/${configFileName}.yml "
+
+ // NOTE temporary workaround expose ONOS node ports (pod-config needs to be updated to contain these values)
+ extraHelmFlags = extraHelmFlags + "--set onos-classic.onosSshPort=30115 " +
+ "--set onos-classic.onosApiPort=30120 " +
+ "--set onos-classic.onosOfPort=31653 " +
+ "--set onos-classic.individualOpenFlowNodePorts=true "
+
+ volthaDeploy([
+ workflow: workFlow.toLowerCase(),
+ extraHelmFlags: extraHelmFlags,
+ localCharts: localCharts,
+ kubeconfig: "$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf",
+ onosReplica: params.NumOfOnos,
+ atomixReplica: params.NumOfAtomix,
+ // NOTE does this needs to be configured?
+ kafkaReplica: 3,
+ etcdReplica: 3,
+ ])
+ sh """
+ JENKINS_NODE_COOKIE="dontKillMe" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${volthaNamespace} svc/voltha-voltha-api 55555:55555; done"&
+ JENKINS_NODE_COOKIE="dontKillMe" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-etcd ${params.VolthaEtcdPort}:2379; done"
+ JENKINS_NODE_COOKIE="dontKillMe" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-kafka 9092:9092; done"
+ ps aux | grep port-forward
+ """
+ getPodsInfo("$WORKSPACE")
+ }
+ }
+ if ( params.configurePod && params.profile != "Default" ) {
+ stage('Push Tech-Profile') {
+ for(int i=0; i < deployment_config.olts.size(); i++) {
+ def tech_prof_directory = "XGS-PON"
+ // If no debian package is specified we default to GPON for the ADTRAN OLT.
+ if (!deployment_config.olts[i].containsKey("oltDebVersion") || deployment_config.olts[i].oltDebVersion.contains("asgvolt64")){
+ tech_prof_directory = "GPON"
+ }
+ timeout(1) {
+ sh returnStatus: true, script: """
+ export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+ etcd_container=\$(kubectl get pods -n ${infraNamespace} | grep etcd | awk 'NR==1{print \$1}')
+ if [[ "${workFlow}" == "TT" ]]; then
+ kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-HSIA.json \$etcd_container:/tmp/hsia.json
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/hsia.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/64'
+ kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-VoIP.json \$etcd_container:/tmp/voip.json
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/voip.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/65'
+ kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-MCAST.json \$etcd_container:/tmp/mcast.json
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/mcast.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/66'
+ else
+ kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-${profile}.json \$etcd_container:/tmp/flexpod.json
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/flexpod.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/64'
+ fi
+ """
+ }
+ timeout(1) {
+ sh returnStatus: true, script: """
+ export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+ etcd_container=\$(kubectl get pods -n ${infraNamespace} | grep etcd | awk 'NR==1{print \$1}')
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/technology_profiles/${tech_prof_directory}/64'
+ """
+ }
+ }
+ }
+ }
+ stage('Push MIB templates') {
+ sh """
+ export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+ etcd_container=\$(kubectl get pods -n ${infraNamespace} | grep etcd | awk 'NR==1{print \$1}')
+ kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/MIB_Alpha.json \$etcd_container:/tmp/MIB_Alpha.json
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/MIB_Alpha.json | ETCDCTL_API=3 etcdctl put service/voltha/omci_mibs/go_templates/BRCM/BVM4K00BRA0915-0083/5023_020O02414'
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/MIB_Alpha.json | ETCDCTL_API=3 etcdctl put service/voltha/omci_mibs/templates/BRCM/BVM4K00BRA0915-0083/5023_020O02414'
+ kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/MIB_Scom.json \$etcd_container:/tmp/MIB_Scom.json
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/MIB_Scom.json | ETCDCTL_API=3 etcdctl put service/voltha/omci_mibs/go_templates/SCOM/Glasfaser-Modem/090140.1.0.304'
+ kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/MIB_Scom.json | ETCDCTL_API=3 etcdctl put service/voltha/omci_mibs/templates/SCOM/Glasfaser-Modem/090140.1.0.304'
+ """
+ }
+ stage('Push Sadis-config') {
+ timeout(1) {
+ sh returnStatus: true, script: """
+ if [[ "${workFlow}" == "DT" ]]; then
+ curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/voltha-system-tests/tests/data/${configFileName}-sadis-DT.json
+ elif [[ "${workFlow}" == "TT" ]]; then
+ curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/voltha-system-tests/tests/data/${configFileName}-sadis-TT.json
+ else
+ # this is the ATT case, rename the file in *-sadis-ATT.json so that we can avoid special cases and just load the file
+ curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/voltha-system-tests/tests/data/${configFileName}-sadis.json
+ fi
+ """
+ }
+ }
+ if ( deployment_config.fabric_switches.size() > 0 ) {
+ stage('Switch Configurations in ONOS') {
+ timeout(1) {
+ def netcfg = "$WORKSPACE/${configBaseDir}/${configToscaDir}/voltha/${configFileName}-onos-netcfg-switch.json"
+ if (params.inBandManagement){
+ netcfg = "$WORKSPACE/${configBaseDir}/${configToscaDir}/voltha/${configFileName}-onos-netcfg-switch-inband.json"
+ }
+ sh """
+ curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @${netcfg}
+ curl -sSL --user karaf:karaf -X POST http://${deployment_config.nodes[0].ip}:30120/onos/v1/applications/org.onosproject.segmentrouting/active
+ """
+ }
+ timeout(1) {
+ waitUntil {
+ sr_active_out = sh returnStatus: true, script: """
+ sshpass -p karaf ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@${deployment_config.nodes[0].ip} "log:set TRACE org.opencord.dhcpl2relay"
+ sshpass -p karaf ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@${deployment_config.nodes[0].ip} "log:set TRACE org.opencord.aaa"
+ sshpass -p karaf ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@${deployment_config.nodes[0].ip} "log:set TRACE org.opencord.olt"
+ sshpass -p karaf ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@${deployment_config.nodes[0].ip} "log:set DEBUG org.onosproject.net.flowobjective.impl.FlowObjectiveManager"
+ sshpass -p karaf ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@${deployment_config.nodes[0].ip} "log:set DEBUG org.onosproject.net.flowobjective.impl.InOrderFlowObjectiveManager"
+ curl -sSL --user karaf:karaf -X GET http://${deployment_config.nodes[0].ip}:30120/onos/v1/applications/org.onosproject.segmentrouting | jq '.state' | grep ACTIVE
+ sshpass -p karaf ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@${deployment_config.nodes[0].ip} "cfg set org.onosproject.provider.lldp.impl.LldpLinkProvider enabled false"
+ sshpass -p karaf ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@${deployment_config.nodes[0].ip} "cfg set org.onosproject.net.flow.impl.FlowRuleManager purgeOnDisconnection false"
+ sshpass -p karaf ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@${deployment_config.nodes[0].ip} "cfg set org.onosproject.net.meter.impl.MeterManager purgeOnDisconnection false"
+ """
+ return sr_active_out == 0
+ }
+ }
+ timeout(5) {
+ for(int i=0; i < deployment_config.hosts.src.size(); i++) {
+ for(int j=0; j < deployment_config.olts.size(); j++) {
+ def aggPort = -1
+ if(deployment_config.olts[j].serial == deployment_config.hosts.src[i].olt){
+ aggPort = deployment_config.olts[j].aggPort
+ if(aggPort == -1){
+ throw new Exception("Upstream port for the olt is not configured, field aggPort is empty")
+ }
+ sh """
+ sleep 30 # NOTE why are we sleeping?
+ curl -X POST --user karaf:karaf --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"deviceId": "${deployment_config.fabric_switches[0].device_id}", "vlanId": "${deployment_config.hosts.src[i].s_tag}", "endpoints": [${deployment_config.fabric_switches[0].bngPort},${aggPort}]}' 'http://${deployment_config.nodes[0].ip}:30120/onos/segmentrouting/xconnect'
+ """
+ }
+ }
+ }
+ }
+ }
+ }
+ if ( params.reinstallOlt ) {
+ stage('Reinstall OLT software') {
+ for(int i=0; i < deployment_config.olts.size(); i++) {
+ // NOTE what is oltDebVersion23? is that for VOLTHA-2.3? do we still need this differentiation?
+ sh returnStdout: true, script: """
+ if [[ "${branch}" != "master" ]] && [[ "${params.inBandManagement}" == "true" ]]; then
+ ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'kill -9 `pgrep -f "[b]ash /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog"` || true'
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion23}"
+ fi
+ if [[ "${branch}" != "master" ]] && [[ "${params.inBandManagement}" == "false" ]]; then
+ ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion23}"
+ fi
+ if [[ "${branch}" == "master" ]] && [[ "${params.inBandManagement}" == "true" ]]; then
+ ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'kill -9 `pgrep -f "[b]ash /opt/openolt/openolt_dev_mgmt_daemon_process_watchdog"` || true'
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion}"
+ fi
+ if [[ "${branch}" == "master" ]] && [[ "${params.inBandManagement}" == "false" ]]; then
+ ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} "dpkg --install ${deployment_config.olts[i].oltDebVersion}"
+ fi
+ sleep 10
+ """
+ timeout(5) {
+ waitUntil {
+ olt_sw_present = sh returnStdout: true, script: """
+ if [ "${deployment_config.olts[i].oltDebVersion}" == *"asfvolt16"* ]; then
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'dpkg --list | grep asfvolt16 | wc -l'
+ else
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'dpkg --list | grep asgvolt64 | wc -l'
+ fi
+ if (${deployment_config.olts[i].fortygig}); then
+ if [[ "${params.inBandManagement}" == "true" ]]; then
+ ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'mkdir -p /opt/openolt/'
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'cp /root/watchdog-script/* /opt/openolt/'
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'cp /root/bal_cli_appl/example_user_appl /broadcom'
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'cp in-band-startup-script/* /etc/init.d/'
+ fi
+ fi
+ """
+ return olt_sw_present.toInteger() > 0
+ }
+ }
+ }
+ }
+ stage('Restart OLT processes') {
+ for(int i=0; i < deployment_config.olts.size(); i++) {
+ int waitTimerForOltUp = 360
+ if ( params.inBandManagement ) {
+ waitTimerForOltUp = 540
+ }
+ timeout(15) {
+ sh returnStdout: true, script: """
+ ssh-keyscan -H ${deployment_config.olts[i].sship} >> ~/.ssh/known_hosts
+ sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'rm -f /var/log/openolt.log; rm -f /var/log/dev_mgmt_daemon.log; rm -f /var/log/openolt_process_watchdog.log; reboot' || true
+ sleep ${waitTimerForOltUp}
+ """
+ }
+ timeout(15) {
+ waitUntil {
+ devprocess = sh returnStdout: true, script: "sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'ps -ef | grep dev_mgmt_daemon | wc -l'"
+ return devprocess.toInteger() > 0
+ }
+ }
+ timeout(15) {
+ waitUntil {
+ openoltprocess = sh returnStdout: true, script: "sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].sship} 'ps -ef | grep openolt | wc -l'"
+ return openoltprocess.toInteger() > 0
+ }
+ }
+ }
+ }
+ }
+ }
+
+ post {
+ always {
+ archiveArtifacts artifacts: '*.txt'
+ }
+ }
+}
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index 0777d6d..8ee694c 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -612,7 +612,7 @@
- string:
name: volthaHelmChartsChange
default: '{volthaHelmChartsChange}'
- description: 'Download a change for gerrit in the kind-voltha repo, example value: "refs/changes/32/19132/1"'
+ description: 'Download a change for gerrit in the voltha-helm-charts repo, example value: "refs/changes/32/19132/1"'
- bool:
name: inMemoryEtcdStorage
diff --git a/jjb/voltha-test/voltha-nightly-jobs.yaml b/jjb/voltha-test/voltha-nightly-jobs.yaml
index 1f1f102..3e1f0f8 100644
--- a/jjb/voltha-test/voltha-nightly-jobs.yaml
+++ b/jjb/voltha-test/voltha-nightly-jobs.yaml
@@ -72,6 +72,7 @@
default: '{work-flow}'
description: 'Installs and uses the specified work flow on the POD'
+ # openonu-go only supports a single replica, remove after 2.8
- string:
name: NumOfOpenOnu
default: '{num-of-openonu}'
@@ -112,6 +113,7 @@
default: '{reinstall-olt}'
description: "Re-install olt software bringing up CORD"
+ # withKind is not used in the master branch pipeline, remove after 2.8
- bool:
name: withKind
default: '{with-kind}'
@@ -133,15 +135,23 @@
description: 'Download a change for gerrit in the voltha-system-tests repo, example value: "refs/changes/79/18779/13"'
- string:
+ name: volthaHelmChartsChange
+ default: '{volthaHelmChartsChange}'
+ description: 'Download a change for gerrit in the voltha-helm-charts repo, example value: "refs/changes/32/19132/1"'
+
+ # kind-voltha is not used in the master branch pipeline, remove after 2.8
+ - string:
name: kindVolthaChange
default: '{kindVolthaChange}'
description: 'Download a change for gerrit in the kind-voltha repo, example value: "refs/changes/32/19132/1"'
+ # NOTE is this needed/used?
- string:
name: cordTesterChange
default: '{cordTesterChange}'
description: 'Download a change for gerrit in the kind-voltha repo, example value: "refs/changes/32/19132/1"'
+ # NOTE is this needed/used?
- string:
name: openoltAdapterChart
default: '{openoltAdapterChart}'
@@ -166,34 +176,41 @@
id: build_voltha_pod_release_timer
disabled: '{disable-job}'
description: |
- Manual Build on POD {config-pod}, using {Jenkinsfile} in {gerrit-server-url}/voltha-system-tests' <br /><br />
+ Manual Build on POD {config-pod}, using pipeline/{pipeline-script} in {gerrit-server-url}/ci-management' <br /><br />
Created from job-template {id} from ci-management/jjb/voltha-test/voltha-nightly-jobs.yaml <br />
Created by QA (Suchitra Vemuri - suchitra@opennetworking.org ) <br />
Copyright (c) 2018 Open Networking Foundation (ONF)
<<: *voltha-pipe-job-boiler-plate
- VolthaEtcdPort: '2379'
+ # default values
+ pipeline-script: 'voltha/master/physical-build.groovy'
+ VolthaEtcdPort: 2379
+ num-of-openonu: 1
+ num-of-onos: 3
+ num-of-atomix: 3
+ test-repo: 'voltha-system-tests'
+ release: 'master'
+ name-extension: ''
+ branch: 'master'
+ configurePod: true
+ volthaHelmChartsChange: ''
+ profile: 'Default'
<<: *voltha-build-job-parameters
concurrent: true
-
- pipeline-scm:
- script-path: '{Jenkinsfile}'
- scm:
- - git:
- url: '{gerrit-server-url}/voltha-system-tests'
- branches:
- - '{branch}'
+ project-type: pipeline
+ dsl: !include-raw-escape: ../pipeline/{pipeline-script}
triggers:
- timed: |
TZ=America/Los_Angeles
H {time} * * *
+# this job template is defined to support VOLTHA-2.7 builds, remove after 2.8
- job-template:
name: 'build_{config-pod}_{profile}{name-extension}_voltha_{release}'
- id: build_voltha_pod_release_dependent
+ id: build_voltha_pod_release_legacy
disabled: '{disable-job}'
description: |
Automatic Build on POD {config-pod}, using {Jenkinsfile} in {gerrit-server-url}/voltha-system-tests' <br /><br />
@@ -204,6 +221,9 @@
<<: *voltha-pipe-job-boiler-plate
VolthaEtcdPort: '2379'
+ release: '2.7'
+ branch: 'voltha-2.7'
+ volthaHelmChartsChange: '' # this is not supported in the VOLTHA-2.7 build, but the parameters are shared, ideally we should split them
<<: *voltha-build-job-parameters
@@ -216,10 +236,6 @@
url: '{gerrit-server-url}/voltha-system-tests'
branches:
- '{branch}'
- triggers:
- - reverse:
- jobs: '{trigger-after}'
- result: 'success'
# VOLTHA Test Job
# This job is automatically triggered after a build job has successfully completed
@@ -342,8 +358,8 @@
result: 'success'
-# VOLTHA Test Job
-# This job is automatically triggered after a build job has successfully completed
+# VOLTHA Soak Test Job
+# This job is triggered by a timer defined in the job
- job-template:
name: 'build_{config-pod}_{profile}_voltha{name-extension}_{release}_test'
id: build_voltha_pod_soak_test
diff --git a/jjb/cord-test/voltha.yaml b/jjb/voltha-test/voltha.yaml
similarity index 60%
rename from jjb/cord-test/voltha.yaml
rename to jjb/voltha-test/voltha.yaml
index 0781fa3..bd4239d 100644
--- a/jjb/cord-test/voltha.yaml
+++ b/jjb/voltha-test/voltha.yaml
@@ -70,14 +70,6 @@
- 'build_voltha_pod_release_timer':
build-node: 'qa-testvm-pod'
config-pod: 'flex-ocp-cord'
- release: 'master'
- branch: 'master'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
profile: 'Default'
time: '4'
@@ -92,35 +84,7 @@
profile: 'Default'
# flex OCP pod with olt/onu - Released versions Default tech profile and timer based job
- - 'build_voltha_pod_release_timer':
- build-node: 'qa-testvm-pod'
- config-pod: 'flex-ocp-cord'
- release: '2.6'
- branch: 'voltha-2.6'
- disable-job: true
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- profile: '1T4GEM'
- time: '1'
-
- # flex pod1 test job - released versions: uses tech profile on voltha branch
- - 'build_voltha_pod_test':
- build-node: 'qa-testvm-pod'
- config-pod: 'flex-ocp-cord'
- release: '2.6'
- branch: 'voltha-2.6'
- disable-job: true
- power-switch: True
- test-repo: 'voltha-system-tests'
- profile: '1T4GEM'
-
-
- # flex OCP pod with olt/onu - Released versions Default tech profile and timer based job
- - 'build_voltha_pod_release_timer':
+ - 'build_voltha_pod_release_legacy':
build-node: 'qa-testvm-pod'
config-pod: 'flex-ocp-cord'
release: '2.7'
@@ -145,40 +109,7 @@
profile: '1T4GEM'
# flex OCP pod with olt/onu - Released versions Default tech profile and timer based job
- - 'build_voltha_pod_release_timer':
- build-node: 'qa-testvm-pod'
- config-pod: 'flex-ocp-cord'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- name-extension: '_TT'
- work-flow: 'TT'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- profile: 'TP'
- time: '22'
-
- # flex pod1 test job - released versions: uses tech profile on voltha branch
- - 'build_voltha_pod_test':
- build-node: 'qa-testvm-pod'
- config-pod: 'flex-ocp-cord'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- name-extension: '_TT'
- work-flow: 'TT'
- power-switch: True
- pipeline-script: 'voltha-tt-physical-functional-tests.groovy'
- test-repo: 'voltha-system-tests'
- profile: 'TP'
-
-
- # flex OCP pod with olt/onu - Released versions Default tech profile and timer based job
- - 'build_voltha_pod_release_timer':
+ - 'build_voltha_pod_release_legacy':
build-node: 'qa-testvm-pod'
config-pod: 'flex-ocp-cord'
release: '2.7'
@@ -213,14 +144,8 @@
config-pod: 'flex-ocp-cord'
release: 'master'
branch: 'master'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
name-extension: '_TT'
work-flow: 'TT'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
profile: 'TP'
time: '9'
@@ -233,85 +158,18 @@
name-extension: '_TT'
work-flow: 'TT'
power-switch: True
+ # TODO do we need different test pipelines for different tests?
pipeline-script: 'voltha-tt-physical-functional-tests.groovy'
test-repo: 'voltha-system-tests'
profile: 'TP'
- # Flex pod with xgs-pon olt/onu - master 1T4GEM tech profile and openonu go and timer based job
- - 'build_voltha_pod_release_timer':
- build-node: 'qa-testvm-pod'
- config-pod: 'flex-ocp-cord-openonupy'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- num-of-onos: '3'
- num-of-atomix: '3'
- name-extension: '_openonupy'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- profile: '1T4GEM'
- time: '18'
-
- # Flex POD test job - master versions, uses 1T4GEM tech profile and openonu go on voltha branch
- - 'build_voltha_pod_test':
- build-node: 'qa-testvm-pod'
- config-pod: 'flex-ocp-cord-openonupy'
- disable-job: true
- name-extension: '_openonupy'
- release: '2.6'
- branch: 'voltha-2.6'
- test-repo: 'voltha-system-tests'
- profile: '1T4GEM'
- power-switch: True
-
- # Flex pod with xgs-pon olt/onu - master TT workflow openonu go and timer based job
- - 'build_voltha_pod_release_timer':
- build-node: 'qa-testvm-pod'
- config-pod: 'flex-ocp-cord-openonupy'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- num-of-onos: '3'
- num-of-atomix: '3'
- name-extension: '_TT_openonupy'
- work-flow: 'TT'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- profile: 'TP'
- time: '14'
-
- # Flex POD test job - master versions, TT workflow and openonu go on voltha branch
-
- - 'build_voltha_pod_test':
- build-node: 'qa-testvm-pod'
- config-pod: 'flex-ocp-cord-openonupy'
- disable-job: true
- name-extension: '_TT_openonupy'
- release: '2.6'
- branch: 'voltha-2.6'
- test-repo: 'voltha-system-tests'
- work-flow: 'TT'
- pipeline-script: 'voltha-tt-physical-functional-tests.groovy'
- profile: 'TP'
- power-switch: True
-
# Menlo pod with olt/onu - 1T4GEM tech profile and timer based job
- 'build_voltha_pod_release_timer':
build-node: 'menlo-demo-pod'
config-pod: 'onf-demo-pod'
- release: 'master'
- branch: 'master'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
profile: '1T4GEM'
in-band-management: true
- VolthaEtcdPort: '9999'
+ VolthaEtcdPort: 9999
time: '1'
# Menlo pod test job - master test job uses tech profile on voltha branch
@@ -328,18 +186,10 @@
- 'build_voltha_pod_release_timer':
build-node: 'menlo-demo-pod'
config-pod: 'onf-demo-pod'
- release: 'master'
- branch: 'master'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
name-extension: '_DT'
work-flow: 'DT'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
profile: '1T8GEM'
- VolthaEtcdPort: '9999'
+ VolthaEtcdPort: 9999
in-band-management: true
time: '4'
@@ -356,44 +206,8 @@
pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
power-switch: True
-
- # Menlo pod with olt/onu - voltha-2.5 branch, Default tech profile and timer based job
- - 'build_voltha_pod_release_timer':
- build-node: 'menlo-demo-pod'
- config-pod: 'onf-demo-pod'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- name-extension: '_DT'
- work-flow: 'DT'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- profile: '1T8GEM'
- VolthaEtcdPort: '9999'
- in-band-management: true
- time: '7'
-
- # Menlo pod test job - uses tech profile on voltha branch
- - 'build_voltha_pod_test':
- build-node: 'menlo-demo-pod'
- config-pod: 'onf-demo-pod'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- name-extension: '_DT'
- work-flow: 'DT'
- test-repo: 'voltha-system-tests'
- profile: '1T8GEM'
- pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
- power-switch: True
-
-
# Menlo pod with olt/onu - released branch, Default tech profile and timer based job
- - 'build_voltha_pod_release_timer':
+ - 'build_voltha_pod_release_legacy':
build-node: 'menlo-demo-pod'
config-pod: 'onf-demo-pod'
release: '2.7'
@@ -438,6 +252,7 @@
num-of-onos: '3'
num-of-atomix: '3'
in-band-management: true
+
- 'build_pod_test':
build-node: 'menlo-demo-pod'
config-pod: 'onf-demo-pod'
@@ -470,7 +285,6 @@
test-repo: 'voltha-system-tests'
Jenkinsfile: 'Jenkinsfile-voltha-test'
-
# Menlo pod with olt/onu - Default tech profile and timer based job
# ONF Menlo Soak POD build job - voltha-master branch
# FIXME once the soak-pod is back use 'build_voltha_pod_release_timer'
@@ -554,21 +368,12 @@
build-node: 'dt-berlin-community-pod'
config-pod: 'dt-berlin-pod-multi-olt'
disable-job: true
- release: 'master'
- branch: 'master'
name-extension: '_DT'
work-flow: 'DT'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
profile: '1T8GEM'
# Update this value accordingly once the job is enabled
time: ''
-
# Berlin POD test job - master versions: uses tech profile on voltha branch
- 'build_voltha_pod_test':
build-node: 'dt-berlin-community-pod'
@@ -583,43 +388,8 @@
power-switch: True
pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
- # Berlin pod with olt/onu - voltha-2.6 timer based job , two OLTs
- - 'build_voltha_pod_release_timer':
- build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod-multi-olt'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- name-extension: '_DT'
- work-flow: 'DT'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- disable-job: true
- profile: '1T8GEM'
- # Update this value accordingly once the job is enabled
- time: ''
-
-
- # Berlin POD test job - voltha-2.6 versions: two OLTs
- - 'build_voltha_pod_test':
- build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod-multi-olt'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- name-extension: '_DT'
- work-flow: 'DT'
- test-repo: 'voltha-system-tests'
- profile: '1T8GEM'
- power-switch: True
- pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
-
# Berlin pod with olt/onu - voltha-2.7 timer based job , two OLTs
- - 'build_voltha_pod_release_timer':
+ - 'build_voltha_pod_release_legacy':
build-node: 'dt-berlin-community-pod'
config-pod: 'dt-berlin-pod-multi-olt'
release: '2.7'
@@ -635,7 +405,6 @@
profile: '1T8GEM'
time: '18'
-
# Berlin POD test job - voltha-2.7 versions: two OLTs
- 'build_voltha_pod_test':
build-node: 'dt-berlin-community-pod'
@@ -649,39 +418,8 @@
power-switch: True
pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
- # Berlin pod with olt/onu - voltha-2.6 Default tech profile and timer based job
- - 'build_voltha_pod_release_timer':
- build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- disable-job: true
- profile: 'Default'
- # Update this value accordingly once the job is enabled
- time: ''
-
-
- # Berlin POD test job - master versions: uses tech profile on voltha branch
- - 'build_voltha_pod_test':
- build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- test-repo: 'voltha-system-tests'
- profile: 'Default'
- power-switch: True
-
-
# Berlin pod with olt/onu - voltha-2.7 Default tech profile and timer based job
- - 'build_voltha_pod_release_timer':
+ - 'build_voltha_pod_release_legacy':
build-node: 'dt-berlin-community-pod'
config-pod: 'dt-berlin-pod'
release: '2.7'
@@ -697,7 +435,6 @@
# Update this value accordingly once the job is enabled
time: ''
-
# Berlin POD test job - released versions: uses tech profile on voltha branch
- 'build_voltha_pod_test':
build-node: 'dt-berlin-community-pod'
@@ -712,20 +449,11 @@
- 'build_voltha_pod_release_timer':
build-node: 'dt-berlin-community-pod'
config-pod: 'dt-berlin-pod-gpon'
- release: 'master'
- branch: 'master'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
name-extension: '_DT'
work-flow: 'DT'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
profile: '1T8GEM'
time: '1'
-
# Berlin POD test job - master versions: uses 1T8GEM tech profile on voltha branch
- 'build_voltha_pod_test':
build-node: 'dt-berlin-community-pod'
@@ -739,77 +467,8 @@
power-switch: True
pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
- # Berlin pod with adtran gpon olt/onu - master 1T8GEM tech profile and timer based job
- - 'build_voltha_pod_release_timer':
- build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod-gpon-adtran'
- release: '2.6'
- branch: 'voltha-2.6'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- name-extension: '_DT'
- work-flow: 'DT'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- profile: '1T8GEM'
- reinstall-olt: false
- openoltAdapterChart: '/home/community/adtran-2021-01-29/voltha-adapter-adtran-olt'
- time: '7'
-
- # Berlin POD adtran test job - master versions: uses 1T8GEM tech profile on voltha branch
- - 'build_voltha_pod_test':
- build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod-gpon-adtran'
- name-extension: '_DT'
- work-flow: 'DT'
- release: '2.6'
- branch: 'voltha-2.6'
- test-repo: 'voltha-system-tests'
- profile: '1T8GEM'
- power-switch: True
- oltAdapterAppLabel: 'adapter-adtran-olt'
- pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
-
-
-
- # Berlin pod with gpon olt/onu - voltha-2.6 1T8GEM tech profile and timer based job
- - 'build_voltha_pod_release_timer':
- build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod-gpon'
- disable-job: true
- release: '2.6'
- branch: 'voltha-2.6'
- num-of-openonu: '1'
- num-of-onos: '3'
- num-of-atomix: '3'
- name-extension: '_DT'
- work-flow: 'DT'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- configurePod: true
- profile: '1T8GEM'
- time: '13'
-
-
- # Berlin POD test job - voltha-2.6 versions: uses 1T8GEM tech profile on voltha branch
- - 'build_voltha_pod_test':
- build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod-gpon'
- disable-job: true
- name-extension: '_DT'
- work-flow: 'DT'
- release: '2.6'
- branch: 'voltha-2.6'
- test-repo: 'voltha-system-tests'
- profile: '1T8GEM'
- power-switch: True
- pipeline-script: 'voltha-dt-physical-functional-tests.groovy'
-
-
# Berlin pod with gpon olt/onu - released 1T8GEM tech profile and timer based job
- - 'build_voltha_pod_release_timer':
+ - 'build_voltha_pod_release_legacy':
build-node: 'dt-berlin-community-pod'
config-pod: 'dt-berlin-pod-gpon'
release: '2.7'
@@ -825,7 +484,6 @@
profile: '1T8GEM'
time: '13'
-
# Berlin POD test job - released versions: uses 1T8GEM tech profile on voltha branch
- 'build_voltha_pod_test':
build-node: 'dt-berlin-community-pod'
@@ -844,20 +502,13 @@
build-node: 'dt-berlin-community-pod'
config-pod: 'dt-berlin-pod-openonugo'
'disable-job': true
- release: 'master'
- branch: 'master'
- num-of-onos: '3'
- num-of-atomix: '3'
name-extension: '_DT_openonugo'
work-flow: 'DT'
- test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
configurePod: true
profile: '1T8GEM'
# Update this value accordingly once the job is enabled
time: ''
-
# Berlin POD test job - master versions, uses 1T8GEM tech profile and openonu go on voltha branch
- 'build_voltha_pod_test':
build-node: 'dt-berlin-community-pod'
diff --git a/vars/getPodsInfo.groovy b/vars/getPodsInfo.groovy
new file mode 100644
index 0000000..28fc81d
--- /dev/null
+++ b/vars/getPodsInfo.groovy
@@ -0,0 +1,13 @@
+// This keyword will get all the kubernetes pods info needed for debugging
+// the only parameter required is the destination folder to store the collected information
+def call(String dest) {
+ sh """
+ mkdir -p ${dest}
+ kubectl get pods --all-namespaces -o wide | tee ${dest}/pods.txt || true
+ kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee ${dest}/pod-images.txt || true
+ kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee ${dest}/pod-imagesId.txt || true
+ kubectl describe pods --all-namespaces -l app.kubernetes.io/part-of=voltha > ${dest}/voltha-pods-describe.txt
+ kubectl describe pods --all-namespaces -l app=onos-classic > ${dest}/onos-pods-describe.txt
+ helm ls --all-namespaces | tee ${dest}/helm-charts.txt
+ """
+}
diff --git a/vars/volthaDeploy.groovy b/vars/volthaDeploy.groovy
index 29d090e..5b0adc3 100644
--- a/vars/volthaDeploy.groovy
+++ b/vars/volthaDeploy.groovy
@@ -17,6 +17,7 @@
extraHelmFlags: "",
localCharts: false, // wether to use locally cloned charts or upstream one (for local we assume they are stored in $WORKSPACE/voltha-helm-charts)
dockerRegistry: "", // use a different docker registry for all images, eg: "mirror.registry.opennetworking.org"
+ kubeconfig: null, // location of the kubernetes config file, if null we assume it's stored in the $KUBECONFIG environment variable
]
if (!config) {
diff --git a/vars/volthaInfraDeploy.groovy b/vars/volthaInfraDeploy.groovy
index 4f828fd..d92861e 100644
--- a/vars/volthaInfraDeploy.groovy
+++ b/vars/volthaInfraDeploy.groovy
@@ -20,6 +20,7 @@
workflow: "att",
extraHelmFlags: "",
localCharts: false,
+ kubeconfig: null, // location of the kubernetes config file, if null we assume it's stored in the $KUBECONFIG environment variable
]
if (!config) {
@@ -42,11 +43,16 @@
println "Deploying VOLTHA Infra with the following parameters: ${cfg}."
+ def kubeconfig = cfg.kubeconfig
+ if (kubeconfig == null) {
+ kubeconfig = env.KUBECONFIG
+ }
+
sh """
kubectl create namespace ${cfg.infraNamespace} || true
- kubectl create configmap -n ${cfg.infraNamespace} kube-config "--from-file=kube_config=$KUBECONFIG" || true
+ kubectl create configmap -n ${cfg.infraNamespace} kube-config "--from-file=kube_config=${kubeconfig}" || true
"""
- // TODO support multiple replicas
+
sh """
helm upgrade --install --create-namespace -n ${cfg.infraNamespace} voltha-infra ${volthaInfraChart} \
--set onos-classic.replicas=${cfg.onosReplica},onos-classic.atomix.replicas=${cfg.atomixReplica} \