Merge "Only printing BBSim ServicesConfig in BBSim debug info"
diff --git a/jjb/pipeline/voltha/master/physical-build.groovy b/jjb/pipeline/voltha/master/physical-build.groovy
index 079ba91..f5a7d74 100644
--- a/jjb/pipeline/voltha/master/physical-build.groovy
+++ b/jjb/pipeline/voltha/master/physical-build.groovy
@@ -155,7 +155,7 @@
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}')
+ etcd_container=\$(kubectl get pods -n ${infraNamespace} -l app.kubernetes.io/name=etcd --no-headers | awk 'NR==1{print \$1}')
if [[ "${workFlow}" == "TT" ]]; then
if [[ "${params.enableMultiUni}" == "true" ]]; then
kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-multi-uni-HSIA.json \$etcd_container:/tmp/hsia.json
@@ -185,7 +185,7 @@
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}')
+ etcd_container=\$(kubectl get pods -n ${infraNamespace} -l app.kubernetes.io/name=etcd --no-headers | 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'
"""
}
@@ -198,7 +198,7 @@
steps {
sh """
export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
- etcd_container=\$(kubectl get pods -n ${infraNamespace} | grep etcd | awk 'NR==1{print \$1}')
+ etcd_container=\$(kubectl get pods -n ${infraNamespace} -l app.kubernetes.io/name=etcd --no-headers | 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'
diff --git a/jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy b/jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy
index 040c065..fd27e86 100644
--- a/jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy
@@ -101,7 +101,7 @@
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
cd $WORKSPACE
if [ "${params.branch}" == "voltha-2.8" ]; then
- VOLTCTL_VERSION=1.6.10
+ VOLTCTL_VERSION=1.6.11
else
VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
fi
diff --git a/jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy
index de2d6f7..21feddd 100644
--- a/jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy
@@ -89,7 +89,7 @@
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
cd $WORKSPACE
if [ "${params.branch}" == "voltha-2.8" ]; then
- VOLTCTL_VERSION=1.6.10
+ VOLTCTL_VERSION=1.6.11
else
VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
fi
diff --git a/jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy b/jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy
index 8a29330..5918e4d 100644
--- a/jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy
+++ b/jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy
@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+library identifier: 'cord-jenkins-libraries@master',
+ retriever: modernSCM([
+ $class: 'GitSCMSource',
+ remote: 'https://gerrit.opencord.org/ci-management.git'
+])
+
node {
// Need this so that deployment_config has global scope when it's read later
deployment_config = null
@@ -96,7 +102,7 @@
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
cd $WORKSPACE
if [ "${params.branch}" == "voltha-2.8" ]; then
- VC_VERSION=1.6.10
+ VC_VERSION=1.6.11
else
VC_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
fi
diff --git a/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy b/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
index 8c2f72e..d5f1c9d 100644
--- a/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
+++ b/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
@@ -22,14 +22,6 @@
remote: 'https://gerrit.opencord.org/ci-management.git'
])
-def ofAgentConnections(numOfOnos, releaseName, namespace) {
- def params = " "
- numOfOnos.times {
- params += "--set voltha.services.controller[${it}].address=${releaseName}-onos-classic-${it}.${releaseName}-onos-classic-hs.${namespace}.svc:6653 "
- }
- return params
-}
-
pipeline {
/* no label, executor is determined by JJB */
@@ -45,7 +37,6 @@
SSHPASS="karaf"
PATH="$PATH:$WORKSPACE/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
- APPS_TO_LOG="etcd kafka onos-onos-classic adapter-open-onu adapter-open-olt rw-core ofagent bbsim radius bbsim-sadis-server"
LOG_FOLDER="$WORKSPACE/logs"
}
@@ -53,10 +44,6 @@
stage ('Cleanup') {
steps {
timeout(time: 11, unit: 'MINUTES') {
- sh """
- # 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 || true
- """
script {
def namespaces = ["infra"]
// FIXME we may have leftovers from more VOLTHA stacks (eg: run1 had 10 stacks, run2 had 2 stacks)
@@ -65,14 +52,24 @@
}
helmTeardown(namespaces)
}
- sh returnStdout: false, script: """
+ sh returnStdout: false, script: '''
helm repo add onf https://charts.opencord.org
- helm repo add cord https://charts.opencord.org
helm repo update
- # remove all port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
- """
+ # remove all persistent volume claims
+ kubectl delete pvc --all-namespaces --all
+ PVCS=\$(kubectl get pvc --all-namespaces --no-headers | wc -l)
+ while [[ \$PVCS != 0 ]]; do
+ sleep 5
+ PVCS=\$(kubectl get pvc --all-namespaces --no-headers | wc -l)
+ done
+
+ # 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 || true
+
+ cd $WORKSPACE
+ rm -rf $WORKSPACE/*
+ '''
}
}
}
@@ -98,32 +95,55 @@
'''
}
}
+ stage('Start logging') {
+ steps {
+ script {
+ startComponentsLogs([
+ appsToLog: [
+ 'app.kubernetes.io/name=etcd',
+ 'app.kubernetes.io/name=kafka',
+ 'app=onos-classic',
+ 'app=adapter-open-onu',
+ 'app=adapter-open-olt',
+ 'app=rw-core',
+ 'app=ofagent',
+ 'app=bbsim',
+ 'app=radius',
+ 'app=bbsim-sadis-server',
+ 'app=onos-config-loader',
+ ]
+ ])
+ }
+ }
+ }
stage('Deploy VOLTHA infrastructure') {
steps {
- sh returnStdout: false, script: '''
+ timeout(time: 5, unit: 'MINUTES') {
+ script {
+ def localCharts = false
+ if (volthaHelmChartsChange != "" || release != "master") {
+ localCharts = true
+ }
- kubectl create configmap -n infra kube-config "--from-file=kube_config=\$KUBECONFIG" || true
+ def infraHelmFlags =
+ "--set global.log_level=${logLevel} " +
+ "--set radius.enabled=${withEapol} " +
+ "--set onos-classic.onosSshPort=30115 " +
+ "--set onos-classic.onosApiPort=30120 " +
+ params.extraHelmFlags
- export EXTRA_HELM_FLAGS+=' '
-
- # No persistent-volume-claims in Atomix
- EXTRA_HELM_FLAGS+="--set onos-classic.atomix.persistence.enabled=false "
- # disable the securityContext, this is a development cluster
- EXTRA_HELM_FLAGS+='--set securityContext.enabled=false '
-
- echo \$EXTRA_HELM_FLAGS
-
- helm upgrade --install -n infra voltha-infra onf/voltha-infra \
- -f $WORKSPACE/voltha-helm-charts/examples/${workflow}-values.yaml \
- -f /home/jenkins/voltha-scale/voltha-values.yaml \
- --set onos-classic.replicas=${onosReplicas},onos-classic.atomix.replicas=${atomixReplicas} \
- --set radius.enabled=${withEapol} \
- --set global.log_level=${logLevel} \
- --set onos-classic.onosSshPort=30115 \
- --set onos-classic.onosApiPort=30120 \
- --set kafka.replicaCount=3,kafka.zookeeper.replicaCount=3 \
- --set etcd.statefulset.replicaCount=3 \$EXTRA_HELM_FLAGS
- '''
+ volthaInfraDeploy([
+ workflow: workflow,
+ infraNamespace: "infra",
+ extraHelmFlags: infraHelmFlags,
+ localCharts: localCharts,
+ onosReplica: onosReplicas,
+ atomixReplica: atomixReplicas,
+ kafkaReplica: kafkaReplicas,
+ etcdReplica: etcdReplicas,
+ ])
+ }
+ }
}
}
stage('Deploy Voltha') {
@@ -131,23 +151,6 @@
deploy_voltha_stacks(params.volthaStacks)
}
}
- stage('Start logging') {
- //FIXME this collects the logs all in one file for all the 10 stacks
- steps {
- sh returnStdout: false, script: '''
- # start logging with kail
-
- mkdir -p $LOG_FOLDER
-
- list=($APPS_TO_LOG)
- for app in "${list[@]}"
- do
- echo "Starting logs for: ${app}"
- _TAG=kail-$app kail -l app=$app --since 1h > $LOG_FOLDER/$app.log&
- done
- '''
- }
- }
stage('Configuration') {
steps {
script {
@@ -210,31 +213,9 @@
}
post {
always {
+ stopComponentsLogs([compress: true])
// collect result, done in the "post" step so it's executed even in the
// event of a timeout in the tests
- sh '''
-
- # stop the kail processes
- list=($APPS_TO_LOG)
- for app in "${list[@]}"
- do
- echo "Stopping logs for: ${app}"
- _TAG="kail-$app"
- P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
- if [ -n "$P_IDS" ]; then
- echo $P_IDS
- for P_ID in $P_IDS; do
- kill -9 $P_ID
- done
- fi
- done
- '''
- // compressing the logs to save space on Jenkins
- sh '''
- cd $LOG_FOLDER
- tar -czf logs.tar.gz *.log
- rm *.log
- '''
plot([
csvFileName: 'scale-test.csv',
csvSeries: [
@@ -273,7 +254,7 @@
kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-imagesId.txt || true
# copy the ONOS logs directly from the container to avoid the color codes
- printf '%s\n' $(kubectl get pods -n infra -l app=onos-classic -o=jsonpath="{.items[*]['metadata.name']}") | xargs --no-run-if-empty -I# bash -c "kubectl cp #:${karafHome}/data/log/karaf.log $LOG_FOLDER/#.log" || true
+ printf '%s\n' $(kubectl get pods -n infra -l app=onos-classic -o=jsonpath="{.items[*]['metadata.name']}") | xargs --no-run-if-empty -I# bash -c "kubectl cp -n infra #:${karafHome}/data/log/karaf.log $LOG_FOLDER/#.log" || true
'''
// dump all the BBSim(s) ONU information
@@ -304,6 +285,9 @@
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
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
+ sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 netcfg > $LOG_FOLDER/onos-netcfg.txt || true
+ sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 cfg get > $LOG_FOLDER/onos-cfg.txt || true
+
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
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
@@ -354,7 +338,7 @@
voltctl -m 8MB device list > $LOG_FOLDER/${stack_ns}/voltha-devices-list.txt || true
DEVICE_LIST=
- printf '%s\n' \$(voltctl -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl-m 8MB device flows # > $LOG_FOLDER/${stack_ns}/voltha-device-flows-#.txt" || true
+ printf '%s\n' \$(voltctl -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl -m 8MB device flows # > $LOG_FOLDER/${stack_ns}/voltha-device-flows-#.txt" || true
printf '%s\n' \$(voltctl -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl -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
printf '%s\n' \$(voltctl -m 8MB logicaldevice list -q) | xargs --no-run-if-empty -I# bash -c "voltctl -m 8MB logicaldevice flows # > $LOG_FOLDER/${stack_ns}/voltha-logicaldevice-flows-#.txt" || true
@@ -380,37 +364,39 @@
python tests/scale/sizing.py -o $WORKSPACE/plots || true
fi
'''
- archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time-*.txt,logs/**/*.txt,logs/**/*.tar.gz,RobotLogs/**/*,plots/*,etcd-metrics/*'
+ archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time-*.txt,logs/**/*.txt,logs/**/*.tar.gz,logs/**/*.tgz,RobotLogs/**/*,plots/*,etcd-metrics/*'
}
}
}
def deploy_voltha_stacks(numberOfStacks) {
for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
- stage("Deploy VOLTHA stack " + i) {
- // ${logLevel}
- def extraHelmFlags = "${extraHelmFlags} --set global.log_level=${logLevel},enablePerf=true,onu=${onus},pon=${pons} "
- extraHelmFlags += " --set securityContext.enabled=false,atomix.persistence.enabled=false "
+ timeout(time: 5, unit: 'MINUTES') {
+ stage("Deploy VOLTHA stack " + i) {
- // FIXME having to set all of these values is annoying, is there a better solution?
- def volthaHelmFlags = extraHelmFlags +
- ofAgentConnections(onosReplicas.toInteger(), "voltha-infra", "infra")
+ def localCharts = false
+ if (volthaHelmChartsChange != "" || release != "master") {
+ localCharts = true
+ }
- def localCharts = false
- if (volthaHelmChartsChange != "") {
- localCharts = true
+ def volthaHelmFlags =
+ "--set global.log_level=${logLevel} " +
+ "--set enablePerf=true,onu=${onus},pon=${pons} " +
+ "--set securityContext.enabled=false " +
+ params.extraHelmFlags
+
+ volthaStackDeploy([
+ bbsimReplica: olts.toInteger(),
+ infraNamespace: "infra",
+ volthaNamespace: "voltha${i}",
+ stackName: "voltha${i}",
+ stackId: i,
+ workflow: workflow,
+ extraHelmFlags: volthaHelmFlags,
+ localCharts: localCharts,
+ onosReplica: onosReplicas,
+ ])
}
-
- volthaStackDeploy([
- bbsimReplica: olts.toInteger(),
- infraNamespace: "infra",
- volthaNamespace: "voltha${i}",
- stackName: "voltha${i}",
- stackId: i,
- workflow: workflow,
- extraHelmFlags: volthaHelmFlags,
- localCharts: localCharts
- ])
}
}
}
diff --git a/jjb/pipeline/voltha/master/voltha-scale-test.groovy b/jjb/pipeline/voltha/master/voltha-scale-test.groovy
index 8248f36..92844c8 100644
--- a/jjb/pipeline/voltha/master/voltha-scale-test.groovy
+++ b/jjb/pipeline/voltha/master/voltha-scale-test.groovy
@@ -230,7 +230,8 @@
def extraHelmFlags = returned_flags
// The added space before params.extraHelmFlags is required due to the .trim() above
def infraHelmFlags =
- " --set global.log_level=${logLevel} " +
+ "--set global.log_level=${logLevel} " +
+ "--set radius.enabled=${withEapol} " +
"--set onos-classic.onosSshPort=30115 " +
"--set onos-classic.onosApiPort=30120 " +
extraHelmFlags + " " + params.extraHelmFlags
@@ -265,6 +266,7 @@
workflow: workflow,
extraHelmFlags: stackHelmFlags,
localCharts: localCharts,
+ onosReplica: onosReplicas,
])
sh """
set +x
diff --git a/jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy b/jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy
index 566f714..d738ba3 100644
--- a/jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy
@@ -101,7 +101,7 @@
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
cd $WORKSPACE
if [ "${params.branch}" == "voltha-2.8" ]; then
- VOLTCTL_VERSION=1.6.10
+ VOLTCTL_VERSION=1.6.11
else
VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
fi
@@ -143,11 +143,15 @@
}
steps {
sh """
+ device_teardown=True
+ if [ ${params.enableMultiUni} = true ]; then
+ device_teardown=False
+ fi
mkdir -p $ROBOT_LOGS_DIR
if ( ${powerSwitch} ); then
- export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -i PowerSwitch -i sanityTT -i sanityTT-MCAST -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
+ export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -i PowerSwitch -i sanityTT -i sanityTT-MCAST -e bbsim -e notready -d $ROBOT_LOGS_DIR -v teardown_device:\${device_teardown} -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
else
- export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -e PowerSwitch -i sanityTT -i sanityTT-MCAST -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
+ export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -e PowerSwitch -i sanityTT -i sanityTT-MCAST -e bbsim -e notready -d $ROBOT_LOGS_DIR -v teardown_device:\${device_teardown} -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
fi
make -C $WORKSPACE/voltha-system-tests voltha-tt-test || true
"""
@@ -200,6 +204,7 @@
}
post {
always {
+ getPodsInfo("$WORKSPACE/pods")
sh returnStdout: false, script: '''
set +e
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy
index 1e5263d..8ecbc33 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy
@@ -76,7 +76,7 @@
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
cd $WORKSPACE
if [ "${params.branch}" == "voltha-2.8" ]; then
- VOLTCTL_VERSION=1.6.10
+ VOLTCTL_VERSION=1.6.11
else
VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
fi
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy
index de2d6f7..21feddd 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy
@@ -89,7 +89,7 @@
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
cd $WORKSPACE
if [ "${params.branch}" == "voltha-2.8" ]; then
- VOLTCTL_VERSION=1.6.10
+ VOLTCTL_VERSION=1.6.11
else
VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
fi
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy
index 8a29330..5918e4d 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy
@@ -12,6 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+library identifier: 'cord-jenkins-libraries@master',
+ retriever: modernSCM([
+ $class: 'GitSCMSource',
+ remote: 'https://gerrit.opencord.org/ci-management.git'
+])
+
node {
// Need this so that deployment_config has global scope when it's read later
deployment_config = null
@@ -96,7 +102,7 @@
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
cd $WORKSPACE
if [ "${params.branch}" == "voltha-2.8" ]; then
- VC_VERSION=1.6.10
+ VC_VERSION=1.6.11
else
VC_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
fi
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-scale-multi-stack.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-scale-multi-stack.groovy
index 8c2f72e..d5f1c9d 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-scale-multi-stack.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-scale-multi-stack.groovy
@@ -22,14 +22,6 @@
remote: 'https://gerrit.opencord.org/ci-management.git'
])
-def ofAgentConnections(numOfOnos, releaseName, namespace) {
- def params = " "
- numOfOnos.times {
- params += "--set voltha.services.controller[${it}].address=${releaseName}-onos-classic-${it}.${releaseName}-onos-classic-hs.${namespace}.svc:6653 "
- }
- return params
-}
-
pipeline {
/* no label, executor is determined by JJB */
@@ -45,7 +37,6 @@
SSHPASS="karaf"
PATH="$PATH:$WORKSPACE/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
- APPS_TO_LOG="etcd kafka onos-onos-classic adapter-open-onu adapter-open-olt rw-core ofagent bbsim radius bbsim-sadis-server"
LOG_FOLDER="$WORKSPACE/logs"
}
@@ -53,10 +44,6 @@
stage ('Cleanup') {
steps {
timeout(time: 11, unit: 'MINUTES') {
- sh """
- # 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 || true
- """
script {
def namespaces = ["infra"]
// FIXME we may have leftovers from more VOLTHA stacks (eg: run1 had 10 stacks, run2 had 2 stacks)
@@ -65,14 +52,24 @@
}
helmTeardown(namespaces)
}
- sh returnStdout: false, script: """
+ sh returnStdout: false, script: '''
helm repo add onf https://charts.opencord.org
- helm repo add cord https://charts.opencord.org
helm repo update
- # remove all port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9 || true
- """
+ # remove all persistent volume claims
+ kubectl delete pvc --all-namespaces --all
+ PVCS=\$(kubectl get pvc --all-namespaces --no-headers | wc -l)
+ while [[ \$PVCS != 0 ]]; do
+ sleep 5
+ PVCS=\$(kubectl get pvc --all-namespaces --no-headers | wc -l)
+ done
+
+ # 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 || true
+
+ cd $WORKSPACE
+ rm -rf $WORKSPACE/*
+ '''
}
}
}
@@ -98,32 +95,55 @@
'''
}
}
+ stage('Start logging') {
+ steps {
+ script {
+ startComponentsLogs([
+ appsToLog: [
+ 'app.kubernetes.io/name=etcd',
+ 'app.kubernetes.io/name=kafka',
+ 'app=onos-classic',
+ 'app=adapter-open-onu',
+ 'app=adapter-open-olt',
+ 'app=rw-core',
+ 'app=ofagent',
+ 'app=bbsim',
+ 'app=radius',
+ 'app=bbsim-sadis-server',
+ 'app=onos-config-loader',
+ ]
+ ])
+ }
+ }
+ }
stage('Deploy VOLTHA infrastructure') {
steps {
- sh returnStdout: false, script: '''
+ timeout(time: 5, unit: 'MINUTES') {
+ script {
+ def localCharts = false
+ if (volthaHelmChartsChange != "" || release != "master") {
+ localCharts = true
+ }
- kubectl create configmap -n infra kube-config "--from-file=kube_config=\$KUBECONFIG" || true
+ def infraHelmFlags =
+ "--set global.log_level=${logLevel} " +
+ "--set radius.enabled=${withEapol} " +
+ "--set onos-classic.onosSshPort=30115 " +
+ "--set onos-classic.onosApiPort=30120 " +
+ params.extraHelmFlags
- export EXTRA_HELM_FLAGS+=' '
-
- # No persistent-volume-claims in Atomix
- EXTRA_HELM_FLAGS+="--set onos-classic.atomix.persistence.enabled=false "
- # disable the securityContext, this is a development cluster
- EXTRA_HELM_FLAGS+='--set securityContext.enabled=false '
-
- echo \$EXTRA_HELM_FLAGS
-
- helm upgrade --install -n infra voltha-infra onf/voltha-infra \
- -f $WORKSPACE/voltha-helm-charts/examples/${workflow}-values.yaml \
- -f /home/jenkins/voltha-scale/voltha-values.yaml \
- --set onos-classic.replicas=${onosReplicas},onos-classic.atomix.replicas=${atomixReplicas} \
- --set radius.enabled=${withEapol} \
- --set global.log_level=${logLevel} \
- --set onos-classic.onosSshPort=30115 \
- --set onos-classic.onosApiPort=30120 \
- --set kafka.replicaCount=3,kafka.zookeeper.replicaCount=3 \
- --set etcd.statefulset.replicaCount=3 \$EXTRA_HELM_FLAGS
- '''
+ volthaInfraDeploy([
+ workflow: workflow,
+ infraNamespace: "infra",
+ extraHelmFlags: infraHelmFlags,
+ localCharts: localCharts,
+ onosReplica: onosReplicas,
+ atomixReplica: atomixReplicas,
+ kafkaReplica: kafkaReplicas,
+ etcdReplica: etcdReplicas,
+ ])
+ }
+ }
}
}
stage('Deploy Voltha') {
@@ -131,23 +151,6 @@
deploy_voltha_stacks(params.volthaStacks)
}
}
- stage('Start logging') {
- //FIXME this collects the logs all in one file for all the 10 stacks
- steps {
- sh returnStdout: false, script: '''
- # start logging with kail
-
- mkdir -p $LOG_FOLDER
-
- list=($APPS_TO_LOG)
- for app in "${list[@]}"
- do
- echo "Starting logs for: ${app}"
- _TAG=kail-$app kail -l app=$app --since 1h > $LOG_FOLDER/$app.log&
- done
- '''
- }
- }
stage('Configuration') {
steps {
script {
@@ -210,31 +213,9 @@
}
post {
always {
+ stopComponentsLogs([compress: true])
// collect result, done in the "post" step so it's executed even in the
// event of a timeout in the tests
- sh '''
-
- # stop the kail processes
- list=($APPS_TO_LOG)
- for app in "${list[@]}"
- do
- echo "Stopping logs for: ${app}"
- _TAG="kail-$app"
- P_IDS="$(ps e -ww -A | grep "_TAG=$_TAG" | grep -v grep | awk '{print $1}')"
- if [ -n "$P_IDS" ]; then
- echo $P_IDS
- for P_ID in $P_IDS; do
- kill -9 $P_ID
- done
- fi
- done
- '''
- // compressing the logs to save space on Jenkins
- sh '''
- cd $LOG_FOLDER
- tar -czf logs.tar.gz *.log
- rm *.log
- '''
plot([
csvFileName: 'scale-test.csv',
csvSeries: [
@@ -273,7 +254,7 @@
kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $LOG_FOLDER/pod-imagesId.txt || true
# copy the ONOS logs directly from the container to avoid the color codes
- printf '%s\n' $(kubectl get pods -n infra -l app=onos-classic -o=jsonpath="{.items[*]['metadata.name']}") | xargs --no-run-if-empty -I# bash -c "kubectl cp #:${karafHome}/data/log/karaf.log $LOG_FOLDER/#.log" || true
+ printf '%s\n' $(kubectl get pods -n infra -l app=onos-classic -o=jsonpath="{.items[*]['metadata.name']}") | xargs --no-run-if-empty -I# bash -c "kubectl cp -n infra #:${karafHome}/data/log/karaf.log $LOG_FOLDER/#.log" || true
'''
// dump all the BBSim(s) ONU information
@@ -304,6 +285,9 @@
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
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
+ sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 netcfg > $LOG_FOLDER/onos-netcfg.txt || true
+ sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 cfg get > $LOG_FOLDER/onos-cfg.txt || true
+
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
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
@@ -354,7 +338,7 @@
voltctl -m 8MB device list > $LOG_FOLDER/${stack_ns}/voltha-devices-list.txt || true
DEVICE_LIST=
- printf '%s\n' \$(voltctl -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl-m 8MB device flows # > $LOG_FOLDER/${stack_ns}/voltha-device-flows-#.txt" || true
+ printf '%s\n' \$(voltctl -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl -m 8MB device flows # > $LOG_FOLDER/${stack_ns}/voltha-device-flows-#.txt" || true
printf '%s\n' \$(voltctl -m 8MB device list | grep olt | awk '{print \$1}') | xargs --no-run-if-empty -I# bash -c "voltctl -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
printf '%s\n' \$(voltctl -m 8MB logicaldevice list -q) | xargs --no-run-if-empty -I# bash -c "voltctl -m 8MB logicaldevice flows # > $LOG_FOLDER/${stack_ns}/voltha-logicaldevice-flows-#.txt" || true
@@ -380,37 +364,39 @@
python tests/scale/sizing.py -o $WORKSPACE/plots || true
fi
'''
- archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time-*.txt,logs/**/*.txt,logs/**/*.tar.gz,RobotLogs/**/*,plots/*,etcd-metrics/*'
+ archiveArtifacts artifacts: 'kind-voltha/install-*.log,execution-time-*.txt,logs/**/*.txt,logs/**/*.tar.gz,logs/**/*.tgz,RobotLogs/**/*,plots/*,etcd-metrics/*'
}
}
}
def deploy_voltha_stacks(numberOfStacks) {
for (int i = 1; i <= numberOfStacks.toInteger(); i++) {
- stage("Deploy VOLTHA stack " + i) {
- // ${logLevel}
- def extraHelmFlags = "${extraHelmFlags} --set global.log_level=${logLevel},enablePerf=true,onu=${onus},pon=${pons} "
- extraHelmFlags += " --set securityContext.enabled=false,atomix.persistence.enabled=false "
+ timeout(time: 5, unit: 'MINUTES') {
+ stage("Deploy VOLTHA stack " + i) {
- // FIXME having to set all of these values is annoying, is there a better solution?
- def volthaHelmFlags = extraHelmFlags +
- ofAgentConnections(onosReplicas.toInteger(), "voltha-infra", "infra")
+ def localCharts = false
+ if (volthaHelmChartsChange != "" || release != "master") {
+ localCharts = true
+ }
- def localCharts = false
- if (volthaHelmChartsChange != "") {
- localCharts = true
+ def volthaHelmFlags =
+ "--set global.log_level=${logLevel} " +
+ "--set enablePerf=true,onu=${onus},pon=${pons} " +
+ "--set securityContext.enabled=false " +
+ params.extraHelmFlags
+
+ volthaStackDeploy([
+ bbsimReplica: olts.toInteger(),
+ infraNamespace: "infra",
+ volthaNamespace: "voltha${i}",
+ stackName: "voltha${i}",
+ stackId: i,
+ workflow: workflow,
+ extraHelmFlags: volthaHelmFlags,
+ localCharts: localCharts,
+ onosReplica: onosReplicas,
+ ])
}
-
- volthaStackDeploy([
- bbsimReplica: olts.toInteger(),
- infraNamespace: "infra",
- volthaNamespace: "voltha${i}",
- stackName: "voltha${i}",
- stackId: i,
- workflow: workflow,
- extraHelmFlags: volthaHelmFlags,
- localCharts: localCharts
- ])
}
}
}
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-scale-test.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-scale-test.groovy
index 82fbf27..195da4a 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-scale-test.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-scale-test.groovy
@@ -230,7 +230,8 @@
def extraHelmFlags = returned_flags
// The added space before params.extraHelmFlags is required due to the .trim() above
def infraHelmFlags =
- " --set global.log_level=${logLevel} " +
+ "--set global.log_level=${logLevel} " +
+ "--set radius.enabled=${withEapol} " +
"--set onos-classic.onosSshPort=30115 " +
"--set onos-classic.onosApiPort=30120 " +
extraHelmFlags + " " + params.extraHelmFlags
@@ -249,6 +250,7 @@
atomixReplica: atomixReplicas,
kafkaReplica: kafkaReplicas,
etcdReplica: etcdReplicas,
+ onosReplica: onosReplicas,
])
stackHelmFlags = " --set onu=${onus},pon=${pons} --set global.log_level=${logLevel.toLowerCase()} "
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy
index 566f714..7ed2c37 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy
@@ -101,7 +101,7 @@
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
cd $WORKSPACE
if [ "${params.branch}" == "voltha-2.8" ]; then
- VOLTCTL_VERSION=1.6.10
+ VOLTCTL_VERSION=1.6.11
else
VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
fi
@@ -200,6 +200,7 @@
}
post {
always {
+ getPodsInfo("$WORKSPACE/pods")
sh returnStdout: false, script: '''
set +e
diff --git a/jjb/verify/onos-classic-helm-utils.yaml b/jjb/verify/onos-classic-helm-utils.yaml
new file mode 100644
index 0000000..6fdeaa1
--- /dev/null
+++ b/jjb/verify/onos-classic-helm-utils.yaml
@@ -0,0 +1,30 @@
+---
+# verification jobs for 'onos-classic-helm-utils' repo
+
+- project:
+ name: onos-classic-helm-utils
+ project: '{name}'
+
+ jobs:
+ - 'verify-onos-classic-helm-utils-jobs':
+ branch-regexp: '{all-branches-regexp}'
+ - 'publish-onos-classic-helm-utils-jobs'
+
+- job-group:
+ name: 'verify-onos-classic-helm-utils-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject':
+ dependency-jobs: 'verify_onos-classic-helm-utils_licensed'
+ - 'make-unit-test':
+ build-timeout: 30
+ unit-test-targets: 'docker-build'
+ junit-allow-empty-results: true
+
+- job-group:
+ name: 'publish-onos-classic-helm-utils-jobs'
+ jobs:
+ - 'docker-publish':
+ build-timeout: 30
+ docker-repo: 'opencord'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index b3ccb65..35e3848 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -47,7 +47,7 @@
withEapol: false
withDhcp: false
withIgmp: false
- extraHelmFlags: " -f /home/jenkins/voltha-scale/voltha-values.yaml --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn "
+ # extraHelmFlags: " -f /home/jenkins/voltha-scale/voltha-values.yaml --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn "
- 'voltha-scale-measurements':
name: 'voltha-scale-measurements-master-2-16-32-att-subscribers-ssd'
@@ -192,7 +192,6 @@
withEapol: true
withDhcp: true
withIgmp: false
- extraHelmFlags: '--set defaults.rw_core.timeout=30s '
release: voltha-2.8
bbsimImg: ''
rwCoreImg: ''
@@ -217,7 +216,6 @@
withEapol: false
withDhcp: false
withIgmp: false
- extraHelmFlags: '--set defaults.rw_core.timeout=30s '
release: voltha-2.8
bbsimImg: ''
rwCoreImg: ''
@@ -242,7 +240,6 @@
withEapol: false
withDhcp: true
withIgmp: true
- extraHelmFlags: '--set defaults.rw_core.timeout=30s '
release: voltha-2.8
bbsimImg: ''
rwCoreImg: ''
@@ -279,6 +276,7 @@
openonuAdapterImg: ''
openonuAdapterGoImg: ''
onosImg: ''
+ extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml "
- 'voltha-scale-measurements':
name: 'voltha-scale-measurements-2.8-10-stacks-2-16-32-dt-subscribers'
@@ -306,6 +304,7 @@
openonuAdapterImg: ''
openonuAdapterGoImg: ''
onosImg: ''
+ extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml "
- 'voltha-scale-measurements':
name: 'voltha-scale-measurements-2.8-10-stacks-2-16-32-tt-subscribers'
@@ -333,6 +332,7 @@
openonuAdapterImg: ''
openonuAdapterGoImg: ''
onosImg: ''
+ extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml "
# per patchset job
- 'voltha-scale-measurements':
@@ -383,7 +383,6 @@
- 'voltha-scale-measurements-dev':
name: 'voltha-scale-measurements-master-dev'
build-node: 'voltha-scale'
- extraHelmFlags: '--set defaults.rw_core.timeout=30s '
# list of parameters for the VOLTHA Jobs,
diff --git a/jjb/voltha-test/voltha.yaml b/jjb/voltha-test/voltha.yaml
index 3aae296..7c728e2 100644
--- a/jjb/voltha-test/voltha.yaml
+++ b/jjb/voltha-test/voltha.yaml
@@ -564,30 +564,29 @@
power-switch: True
pipeline-script: 'voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy'
- # Berlin pod with gpon olt/onu - master 1T8GEM tech profile and openonu go and timer based job
+ # Berlin pod with olt/onu - master versions timer based job , two OLTs
- 'build_voltha_pod_release_timer':
build-node: 'dt-berlin-community-pod'
- config-pod: 'dt-berlin-pod-openonugo'
- 'disable-job': true
- name-extension: '_DT_openonugo'
+ config-pod: 'dt-berlin-pod-multi-olt'
+ name-extension: '_DT'
work-flow: 'DT'
- configurePod: true
+ release: '2.8'
+ branch: 'voltha-2.8'
profile: '1T8GEM'
num-of-onos: '3'
num-of-atomix: '3'
- # Update this value accordingly once the job is enabled
- time: ''
+ pipeline-script: 'voltha/voltha-2.8/physical-build.groovy'
+ time: '6'
- # Berlin POD test job - master versions, uses 1T8GEM tech profile and openonu go on voltha branch
+ # 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-openonugo'
- 'disable-job': true
- name-extension: '_DT_openonugo'
+ config-pod: 'dt-berlin-pod-multi-olt'
+ release: '2.8'
+ branch: 'voltha-2.8'
+ name-extension: '_DT'
work-flow: 'DT'
- release: 'master'
- branch: 'master'
test-repo: 'voltha-system-tests'
profile: '1T8GEM'
power-switch: True
- pipeline-script: 'voltha/master/voltha-dt-physical-functional-tests.groovy'
+ pipeline-script: 'voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy'
diff --git a/vars/createKubernetesCluster.groovy b/vars/createKubernetesCluster.groovy
index 5ef69f9..8a55cc7 100644
--- a/vars/createKubernetesCluster.groovy
+++ b/vars/createKubernetesCluster.groovy
@@ -60,7 +60,7 @@
HOSTARCH="amd64"
fi
if [ "${cfg.branch}" == "voltha-2.8" ]; then
- VC_VERSION="1.6.10"
+ VC_VERSION="1.6.11"
else
VC_VERSION="\$(curl --fail -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')"
fi
diff --git a/vars/stopComponentsLogs.groovy b/vars/stopComponentsLogs.groovy
index 24d2ad7..6729c37 100644
--- a/vars/stopComponentsLogs.groovy
+++ b/vars/stopComponentsLogs.groovy
@@ -25,8 +25,10 @@
"""
if (cfg.compress) {
sh """
+ pushd ${cfg.logsDir}
tar czf ${cfg.logsDir}/combined.tgz *
rm *.log
+ popd
"""
}
diff --git a/vars/volthaStackDeploy.groovy b/vars/volthaStackDeploy.groovy
index 41d269b..ae8533c 100644
--- a/vars/volthaStackDeploy.groovy
+++ b/vars/volthaStackDeploy.groovy
@@ -10,6 +10,7 @@
workflow: "att",
extraHelmFlags: "",
localCharts: false,
+ onosReplica: 1,
]
if (!config) {
@@ -38,6 +39,7 @@
helm upgrade --install --create-namespace -n ${cfg.volthaNamespace} ${cfg.stackName} ${volthaStackChart} \
--set global.stack_name=${cfg.stackName} \
--set global.voltha_infra_name=voltha-infra \
+ --set voltha.onos_classic.replicas=${cfg.onosReplica} \
--set global.voltha_infra_namespace=${cfg.infraNamespace} \
${cfg.extraHelmFlags}
"""
@@ -83,8 +85,10 @@
"""
// also make sure that the ONOS config is loaded
+ // NOTE that this is only required for VOLTHA-2.8
println "Wait for ONOS Config loader to complete"
+ // NOTE that this is only required for VOLTHA-2.8,
sh """
set +x
config=\$(kubectl get jobs.batch -n ${cfg.infraNamespace} --no-headers | grep "0/" | wc -l)
@@ -93,4 +97,14 @@
config=\$(kubectl get jobs.batch -n ${cfg.infraNamespace} --no-headers | grep "0/" | wc -l)
done
"""
+ // NOTE that this is only required for VOLTHA-2.9 onwards, to wait until the pod completed,
+ //meaning ONOS fully deployed
+ sh """
+ set +x
+ config=\$(kubectl get pods -l app=onos-config-loader -n ${cfg.infraNamespace} --no-headers --field-selector=status.phase=Running | grep "0/" | wc -l)
+ while [[ \$config != 0 ]]; do
+ sleep 5
+ config=\$(kubectl get pods -l app=onos-config-loader -n ${cfg.infraNamespace} --no-headers --field-selector=status.phase=Running | grep "0/" | wc -l)
+ done
+ """
}