Remove obsolete port forwarding for voltha, etcd
Drop forwading for ports 2379 and 55555 and obsolete VolthaEtcdPort
parameter, made possible by [1] and related changes.
All code should (and hopefully does) use the kubernetes ingress:
- voltha-infra.local:443 instead of 127.0.0.1:2379
- voltha.voltha.local:443 instead of 127.0.0.1:55555
The VolthaEtcdPort parameter was used to allow forwarding etcd to a
different port on nodes where port 2379 was already taken. All port
forwarding for etcd has been removed, eliminating the need for having
VolthaEtcdPort.
[1] commit 6a2bc9600ce9bd8df1c3ad949d70db2442e3fcbb
Change-Id: Ib24ea4e16b5cd5c2537f708aee6498922f8cd194
Change voltctl configuration file for k8s ingress
Signed-off-by: Roger Luethi <roger@opennetworking.org>
Change-Id: I4ccdf075e6e2746040b58f2f9be8b4a1545b45c0
diff --git a/jjb/pipeline/voltha/bbsim-tests.groovy b/jjb/pipeline/voltha/bbsim-tests.groovy
index 8228dcb..2941e2c 100644
--- a/jjb/pipeline/voltha/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/bbsim-tests.groovy
@@ -312,8 +312,6 @@
// -----------------------------------------------------------------------
sh(label : 'while-true-port-forward',
script : """
- JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-voltha-api" 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" _TAG="voltha-infra-etcd" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-etcd 2379:2379; done"&
JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-infra-kafka" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-kafka 9092:9092; done"&
bbsimDmiPortFwd=50075
for i in {0..${olts.toInteger() - 1}}; do
diff --git a/jjb/pipeline/voltha/device-management-mock-tests.groovy b/jjb/pipeline/voltha/device-management-mock-tests.groovy
index 8362a08..e837028 100644
--- a/jjb/pipeline/voltha/device-management-mock-tests.groovy
+++ b/jjb/pipeline/voltha/device-management-mock-tests.groovy
@@ -104,7 +104,6 @@
sh """
_TAG=onos-port-forward kubectl port-forward --address 0.0.0.0 -n infra svc/voltha-infra-onos-classic-hs 8101:8101&
_TAG=onos-port-forward kubectl port-forward --address 0.0.0.0 -n infra svc/voltha-infra-onos-classic-hs 8181:8181&
- _TAG=voltha-port-forward kubectl port-forward --address 0.0.0.0 -n voltha svc/voltha-voltha-api 55555:55555&
"""
}
}
diff --git a/jjb/pipeline/voltha/dmi-build-and-test.groovy b/jjb/pipeline/voltha/dmi-build-and-test.groovy
index b91d2a9..501c7f5 100755
--- a/jjb/pipeline/voltha/dmi-build-and-test.groovy
+++ b/jjb/pipeline/voltha/dmi-build-and-test.groovy
@@ -170,8 +170,6 @@
}
}
sh """
- JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-api" 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" _TAG="etcd" 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" _TAG="kafka" 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
"""
diff --git a/jjb/pipeline/voltha/physical-build.groovy b/jjb/pipeline/voltha/physical-build.groovy
index 17d48b3..8745ef5 100755
--- a/jjb/pipeline/voltha/physical-build.groovy
+++ b/jjb/pipeline/voltha/physical-build.groovy
@@ -178,8 +178,6 @@
}
}
sh """
- JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-api" 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" _TAG="etcd" 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" _TAG="kafka" 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
"""
diff --git a/jjb/pipeline/voltha/software-upgrades.groovy b/jjb/pipeline/voltha/software-upgrades.groovy
index e9f6d9e..7ffcaee 100755
--- a/jjb/pipeline/voltha/software-upgrades.groovy
+++ b/jjb/pipeline/voltha/software-upgrades.groovy
@@ -165,7 +165,6 @@
sh('''
JENKINS_NODE_COOKIE="dontKillMe" _TAG=onos-port-forward /bin/bash -c "while true; do kubectl -n infra port-forward --address 0.0.0.0 service/voltha-infra-onos-classic-hs 8101:8101; done 2>&1 " &
JENKINS_NODE_COOKIE="dontKillMe" _TAG=onos-port-forward /bin/bash -c "while true; do kubectl -n infra port-forward --address 0.0.0.0 service/voltha-infra-onos-classic-hs 8181:8181; done 2>&1 " &
- JENKINS_NODE_COOKIE="dontKillMe" _TAG=port-forward-voltha-api /bin/bash -c "while true; do kubectl -n voltha port-forward --address 0.0.0.0 service/voltha-voltha-api 55555:55555; done 2>&1 " &
''')
sh('''
sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 log:set DEBUG org.opencord
diff --git a/jjb/pipeline/voltha/tucson-build-and-test.groovy b/jjb/pipeline/voltha/tucson-build-and-test.groovy
index 81b26ab..5876876 100644
--- a/jjb/pipeline/voltha/tucson-build-and-test.groovy
+++ b/jjb/pipeline/voltha/tucson-build-and-test.groovy
@@ -158,8 +158,6 @@
done
'''
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 2379: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
"""
diff --git a/jjb/pipeline/voltha/voltha-dt-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-dt-physical-functional-tests.groovy
index e29b455..c2937f4 100644
--- a/jjb/pipeline/voltha/voltha-dt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-dt-physical-functional-tests.groovy
@@ -112,8 +112,6 @@
ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
'''
sh """
- JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-api" 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" _TAG="etcd" 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" _TAG="kafka" 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
"""
diff --git a/jjb/pipeline/voltha/voltha-scale-lwc-test.groovy b/jjb/pipeline/voltha/voltha-scale-lwc-test.groovy
index 84308ac..e51abd3 100644
--- a/jjb/pipeline/voltha/voltha-scale-lwc-test.groovy
+++ b/jjb/pipeline/voltha/voltha-scale-lwc-test.groovy
@@ -171,7 +171,6 @@
make vst_venv
daemonize -E JENKINS_NODE_COOKIE="dontKillMe" /usr/local/bin/kubectl port-forward -n infra svc/lwc 8182:8181 --address 0.0.0.0
- daemonize -E JENKINS_NODE_COOKIE="dontKillMe" /usr/local/bin/kubectl port-forward -n voltha1 svc/voltha1-voltha-api 55555 --address 0.0.0.0
source ./vst_venv/bin/activate
robot -d $WORKSPACE/RobotLogs \
diff --git a/jjb/pipeline/voltha/voltha-scale-multi-stack.groovy b/jjb/pipeline/voltha/voltha-scale-multi-stack.groovy
index ece67a8..8ede30d 100644
--- a/jjb/pipeline/voltha/voltha-scale-multi-stack.groovy
+++ b/jjb/pipeline/voltha/voltha-scale-multi-stack.groovy
@@ -156,9 +156,6 @@
script {
sh returnStdout: false, script: """
- # forward ETCD port
- JENKINS_NODE_COOKIE="dontKillMe" _TAG=etcd-port-forward /bin/bash -c "while true; do kubectl -n infra port-forward --address 0.0.0.0 service/etcd 9999:2379; done 2>&1 " &
-
# forward ONOS ports
JENKINS_NODE_COOKIE="dontKillMe" _TAG=onos-port-forward /bin/bash -c "while true; do kubectl -n infra port-forward --address 0.0.0.0 service/voltha-infra-onos-classic-hs 8101:8101; done 2>&1 " &
JENKINS_NODE_COOKIE="dontKillMe" _TAG=onos-port-forward /bin/bash -c "while true; do kubectl -n infra port-forward --address 0.0.0.0 service/voltha-infra-onos-classic-hs 8181:8181; done 2>&1 " &
@@ -329,10 +326,6 @@
voltcfg="~/.volt/config-voltha"+i
try {
sh """
-
- # _TAG=voltha-port-forward kubectl port-forward --address 0.0.0.0 -n voltha${i} svc/voltha${i}-voltha-api 55555:55555& > /dev/null 2>&1
- _TAG="voltha-port-forward" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n voltha${i} svc/voltha${i}-voltha-api 55555:55555 > /dev/null 2>&1; done"&
-
voltctl -m 32MB device list -o json > $LOG_FOLDER/${stack_ns}/device-list.json || true
python -m json.tool $LOG_FOLDER/${stack_ns}/device-list.json > $LOG_FOLDER/${stack_ns}/voltha-devices-list.json || true
rm $LOG_FOLDER/${stack_ns}/device-list.json || true
@@ -410,9 +403,6 @@
export VOLTCONFIG=$HOME/.volt/config
- # _TAG=voltha-port-forward kubectl port-forward --address 0.0.0.0 -n voltha${i} svc/voltha${i}-voltha-api 55555:55555& > /dev/null 2>&1
- _TAG="voltha-port-forward" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n voltha${i} svc/voltha${i}-voltha-api 55555:55555 > /dev/null 2>&1; done"&
-
# wait a bit to make sure the port-forwarding has started
sleep 5
diff --git a/jjb/voltha-test/voltha-nightly-jobs.yaml b/jjb/voltha-test/voltha-nightly-jobs.yaml
index 21a702a..f521994 100644
--- a/jjb/voltha-test/voltha-nightly-jobs.yaml
+++ b/jjb/voltha-test/voltha-nightly-jobs.yaml
@@ -147,11 +147,6 @@
default: '{reinstall-olt}'
description: "Re-install olt software bringing up CORD"
- - string:
- name: VolthaEtcdPort
- default: '{VolthaEtcdPort}'
- description: 'Localhost port that is forwarded to VOLTHA etcd'
-
- bool:
name: inBandManagement
default: '{in-band-management}'
@@ -227,7 +222,6 @@
<<: *voltha-pipe-job-boiler-plate
# default values
pipeline-script: 'voltha/physical-build.groovy'
- VolthaEtcdPort: 2379
num-of-openonu: 1
num-of-onos: 1
num-of-atomix: 0
@@ -278,7 +272,6 @@
<<: *voltha-pipe-job-boiler-plate
# default values
pipeline-script: 'voltha/physical-build.groovy'
- VolthaEtcdPort: 2379
num-of-openonu: 1
num-of-onos: 3
num-of-atomix: 3
@@ -334,7 +327,6 @@
<<: *voltha-pipe-job-boiler-plate
# default values
pipeline-script: 'voltha/playground/physical-build.groovy'
- VolthaEtcdPort: 2379
num-of-openonu: 1
num-of-onos: 3
num-of-atomix: 3
@@ -990,7 +982,6 @@
pipeline-script: 'voltha/dmi-build-and-test.groovy'
installVolthaInfra: true
installVolthaStack: true
- VolthaEtcdPort: 2379
num-of-openonu: 1
num-of-onos: 3
num-of-atomix: 3
@@ -1173,11 +1164,6 @@
default: '{restart-olt}'
description: "Re-install olt software bringing up CORD"
- - string:
- name: VolthaEtcdPort
- default: '{VolthaEtcdPort}'
- description: 'Localhost port that is forwarded to VOLTHA etcd'
-
- bool:
name: inBandManagement
default: '{in-band-management}'
diff --git a/jjb/voltha-test/voltha.yaml b/jjb/voltha-test/voltha.yaml
index 0b01f31..baf7326 100644
--- a/jjb/voltha-test/voltha.yaml
+++ b/jjb/voltha-test/voltha.yaml
@@ -326,7 +326,6 @@
num-of-onos: '3'
num-of-atomix: '3'
pipeline-script: 'voltha/physical-build.groovy'
- VolthaEtcdPort: 9999
waitTimerForOltUp: 360
time: '1'
@@ -359,7 +358,6 @@
num-of-onos: '3'
num-of-atomix: '3'
pipeline-script: 'voltha/physical-build.groovy'
- VolthaEtcdPort: 9999
waitTimerForOltUp: 360
profile: '1T8GEM'
time: '5'
@@ -391,7 +389,6 @@
work-flow: 'TT'
profile: 'TP'
time: '10'
- VolthaEtcdPort: 9999
num-of-onos: '3'
num-of-atomix: '3'
@@ -424,7 +421,6 @@
work-flow: 'TT'
profile: 'TP'
time: '10'
- VolthaEtcdPort: 9999
num-of-onos: '3'
num-of-atomix: '3'
@@ -459,7 +455,6 @@
work-flow: 'TT'
profile: 'TP'
time: '10'
- VolthaEtcdPort: 9999
num-of-onos: '3'
num-of-atomix: '3'
@@ -476,7 +471,6 @@
work-flow: 'TT'
profile: 'TP'
time: '10'
- VolthaEtcdPort: 9999
num-of-onos: '3'
num-of-atomix: '3'
@@ -527,7 +521,6 @@
work-flow: 'TT'
profile: 'TP'
time: '10'
- VolthaEtcdPort: 9999
num-of-onos: '3'
num-of-atomix: '3'
@@ -565,7 +558,6 @@
num-of-onos: '3'
num-of-atomix: '3'
pipeline-script: 'voltha/voltha-2.11/physical-build.groovy'
- VolthaEtcdPort: 9999
openoltAdapterChart: '/home/community/adtran-23.1-voltha-2.11/voltha-adapter-adtran-olt'
oltAdapterReleaseName: 'adtran-olt'
waitTimerForOltUp: 420
@@ -587,7 +579,6 @@
num-of-onos: '3'
num-of-atomix: '3'
pipeline-script: 'voltha/voltha-2.12/physical-build.groovy'
- VolthaEtcdPort: 9999
openoltAdapterChart: '/home/community/adtran-23.1-voltha-2.12/voltha-adapter-adtran-olt'
oltAdapterReleaseName: 'adtran-olt'
waitTimerForOltUp: 420
@@ -649,7 +640,6 @@
OltDevMgr: 'adtran-olt-device-manager'
num-of-onos: '3'
num-of-atomix: '3'
- VolthaEtcdPort: 9999
waitTimerForOltUp: 420
time: '16'
@@ -676,7 +666,6 @@
OltDevMgr: 'adtran-olt-device-manager'
num-of-onos: '3'
num-of-atomix: '3'
- VolthaEtcdPort: 9999
waitTimerForOltUp: 420
time: '16'
@@ -701,7 +690,6 @@
OltDevMgr: 'adtran-olt-device-manager'
num-of-onos: '3'
num-of-atomix: '3'
- VolthaEtcdPort: 9999
waitTimerForOltUp: 420
time: '16'
diff --git a/vars/waitForAdapters.groovy b/vars/waitForAdapters.groovy
index 5c9c5ce..4604bca 100644
--- a/vars/waitForAdapters.groovy
+++ b/vars/waitForAdapters.groovy
@@ -179,11 +179,6 @@
println("** ${iam}: Wait for adapters to be registered")
// guarantee that at least the specified number of adapters are registered with VOLTHA before proceeding
- sh(label : 'waitForAdapters: Initiate port forwarding',
- script : """
- _TAG="voltha-voltha-api" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${cfg.volthaNamespace} svc/${cfg.stackName}-voltha-api 55555:55555; done" &
- """)
-
sh(label : 'waitForAdapters: loop until adapter list',
script : """
# set +x