aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap-vpp-honeycomb.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap-vpp-honeycomb.sh')
-rwxr-xr-xbootstrap-vpp-honeycomb.sh46
1 files changed, 39 insertions, 7 deletions
diff --git a/bootstrap-vpp-honeycomb.sh b/bootstrap-vpp-honeycomb.sh
index df5a5f97ab..ec7be15f2b 100755
--- a/bootstrap-vpp-honeycomb.sh
+++ b/bootstrap-vpp-honeycomb.sh
@@ -106,17 +106,49 @@ do
fi
done
+# Download the latest VPP and HC .deb packages
+echo Downloading packages...
+bash ${SCRIPT_DIR}/resources/tools/download_hc_pkgs.sh
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+VPP_DEBS=(*.deb)
+echo ${VPP_DEBS[@]}
+VIRL_DIR_LOC="/tmp"
+VPP_DEBS_FULL=(${VPP_DEBS[@]})
+
+# Prepend directory location at remote host to deb file list
+for index in "${!VPP_DEBS_FULL[@]}"; do
+ VPP_DEBS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_DEBS_FULL[${index}]}
+done
+
+echo "Updated file names: " ${VPP_DEBS_FULL[@]}
+
cat ${VIRL_PKEY}
-# Copy start-honeycomb-testcase to VIRL
-START_FILE="resources/tools/virl/bin/start-honeycomb-testcase"
-DST_DIR_1="/home/jenkins-in/testcase-infra/bin/"
-DST_DIR_2="/home/jenkins-in/bin/"
+# Copy the files to VIRL hosts
+DONE=""
+for index in "${!VIRL_SERVER[@]}"; do
+ # Do not copy files in case they have already been copied to the VIRL host
+ [[ "${DONE[@]}" =~ "${VIRL_SERVER[${index}]}" ]] && copy=0 || copy=1
-scp ${SSH_OPTIONS} ${START_FILE} ${VIRL_USERNAME}@${VIRL_SERVER}:${DST_DIR_1}
-scp ${SSH_OPTIONS} ${START_FILE} ${VIRL_USERNAME}@${VIRL_SERVER}:${DST_DIR_2}
+ if [ "${copy}" -eq "0" ]; then
+ echo "deb files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}"
+ else
+ scp ${SSH_OPTIONS} *.deb \
+ ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/
+
+ result=$?
+ if [ "${result}" -ne "0" ]; then
+ echo "Failed to copy deb files to VIRL host ${VIRL_SERVER[${index}]}"
+ echo ${result}
+ exit ${result}
+ else
+ echo "deb files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}"
+ fi
+ DONE+=(${VIRL_SERVER[${index}]})
+ fi
+done
# Start a simulation on VIRL server
echo "Starting simulation on VIRL server"
@@ -128,7 +160,7 @@ function stop_virl_simulation {
VIRL_SID=$(ssh ${SSH_OPTIONS} \
${VIRL_USERNAME}@${VIRL_SERVER} \
- "start-honeycomb-testcase ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE}")
+ "start-testcase ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE}")
retval=$?
if [ "$?" -ne "0" ]; then
echo "VIRL simulation start failed"