Update the way to start Stratum in linerate job
- Always pull the latest Stratum image before the test
- Start the Stratum container directly (was using a script)
Change-Id: I4b7d6f9ed11eff0d8d29432960e6d8b1a64f2a36
diff --git a/jjb/pipeline/fabric-tna-hardware.groovy b/jjb/pipeline/fabric-tna-hardware.groovy
index 4f12a49..3bdce24 100644
--- a/jjb/pipeline/fabric-tna-hardware.groovy
+++ b/jjb/pipeline/fabric-tna-hardware.groovy
@@ -12,6 +12,7 @@
SWITCH_SSH = "${SWITCH_USER}@${params.SWITCH_IP}"
CHASSIS_CONFIG = "/home/jenkins/chassis_config.pb.txt"
TREX_DIR = "/srv/trex-core-2.85-scapy-2.4.5/scripts"
+ PLATFORM = "x86-64-accton-wedge100bf-32qs-r0"
}
stages {
@@ -24,8 +25,18 @@
. ./.env
ssh ${SWITCH_SSH} "docker ps | grep stratum | cut -d' ' -f1 | xargs docker stop; pkill stratum_bf" || true
scp ./ptf/tests/linerate/chassis_config.pb.txt ${SWITCH_SSH}:/home/jenkins/
- ssh ${SWITCH_SSH} "DOCKER_IMAGE_TAGGED=$STRATUM_DOCKER_IMG SDE_VERSION=$SDE_VERSION CHASSIS_CONFIG=${CHASSIS_CONFIG} \
- ./start-stratum-container.sh -external_stratum_urls=0.0.0.0:${STRATUM_PORT}"
+ ssh ${SWITCH_SSH} "docker pull ${STRATUM_DOCKER_IMG}"
+ ssh ${SWITCH_SSH} "docker run -itd --rm --privileged --name stratum_bfrt \
+ -v /dev:/dev -v /sys:/sys \
+ -v /lib/modules/4.14.49-OpenNetworkLinux:/lib/modules/4.14.49-OpenNetworkLinux \
+ --env PLATFORM=${PLATFORM} \
+ --network host \
+ -v ${CHASSIS_CONFIG}:/etc/stratum/${PLATFORM}/chassis_config.pb.txt \
+ -v /var/log:/var/log/stratum \
+ ${STRATUM_DOCKER_IMG} \
+ --enable_onlp=false \
+ -bf_switchd_background=false \
+ -external_stratum_urls=0.0.0.0:${STRATUM_PORT}"
'''
sh "until nc -z ${params.SWITCH_IP} ${STRATUM_PORT}; do sleep 1; done"
}