aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2017-02-06 10:42:00 +0100
committerPeter Mikus <pmikus@cisco.com>2017-02-14 09:28:00 +0000
commit4df00930b5a2cf67f32682f44e0540819b9575af (patch)
treeddecc51120214203d6381208f81bd2f52ad47ae7
parent44dc1d4781470b722c5f7d5adb197ace96b96db3 (diff)
HC Test: Add branch and os parameters to honeycomb scripts
- partial cherrypick of https://gerrit.fd.io/r/4933 - add OS argument to scripts in preparation for Ubuntu16 and Centos7 Change-Id: I14119703be0f73766a731478e09e0126078f84ba Signed-off-by: selias <samelias@cisco.com>
-rwxr-xr-xbootstrap-hc2vpp-integration.sh47
-rwxr-xr-xbootstrap-hc2vpp-verify.sh44
-rwxr-xr-xresources/tools/download_hc_build_pkgs.sh20
-rwxr-xr-xresources/tools/download_hc_pkgs.sh20
4 files changed, 94 insertions, 37 deletions
diff --git a/bootstrap-hc2vpp-integration.sh b/bootstrap-hc2vpp-integration.sh
index d29d08e9dd..e8c0d5e918 100755
--- a/bootstrap-hc2vpp-integration.sh
+++ b/bootstrap-hc2vpp-integration.sh
@@ -29,8 +29,19 @@ VIRL_PKEY=priv_key
VIRL_SERVER_STATUS_FILE="status"
VIRL_SERVER_EXPECTED_STATUS="PRODUCTION"
-VIRL_TOPOLOGY=double-ring-nested.trusty
-VIRL_RELEASE=csit-ubuntu-14.04.4_2016-10-07_1.3
+STREAM=$1
+OS=$2
+
+if [ "${OS}" == "ubuntu1404" ]; then
+ VIRL_TOPOLOGY=double-ring-nested.trusty
+ VIRL_RELEASE=csit-ubuntu-14.04.4_2016-10-07_1.3
+elif [ "${OS}" == "ubuntu1604" ]; then
+ VIRL_TOPOLOGY=double-ring-nested.xenial
+ VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+elif [ "${OS}" == "centos7" ]; then
+ VIRL_TOPOLOGY=double-ring-nested.centos7
+ VIRL_RELEASE=csit-centos-7.3-1611
+fi
SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
@@ -108,21 +119,25 @@ done
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-# Download the latest VPP and HC .deb packages
+# Download VPP and HC packages from the current branch
echo Downloading packages...
-bash ${SCRIPT_DIR}/resources/tools/download_hc_pkgs.sh
+bash ${SCRIPT_DIR}/resources/tools/download_hc_pkgs.sh ${STREAM} ${OS}
-VPP_DEBS=(*.deb)
-echo ${VPP_DEBS[@]}
+if [ "${OS}" == "centos7" ]; then
+ VPP_PKGS=(*.rpm)
+else
+ VPP_PKGS=(*.deb)
+fi
+echo ${VPP_PKGS[@]}
VIRL_DIR_LOC="/tmp"
-VPP_DEBS_FULL=(${VPP_DEBS[@]})
+VPP_PKGS_FULL=(${VPP_PKGS[@]})
-# 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}]}
+# Prepend directory location at remote host to package file list
+for index in "${!VPP_PKGS_FULL[@]}"; do
+ VPP_PKGS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_FULL[${index}]}
done
-echo "Updated file names: " ${VPP_DEBS_FULL[@]}
+echo "Updated file names: " ${VPP_PKGS_FULL[@]}
cat ${VIRL_PKEY}
@@ -133,17 +148,17 @@ for index in "${!VIRL_SERVER[@]}"; do
[[ "${DONE[@]}" =~ "${VIRL_SERVER[${index}]}" ]] && copy=0 || copy=1
if [ "${copy}" -eq "0" ]; then
- echo "deb files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}"
+ echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}"
else
- scp ${SSH_OPTIONS} *.deb \
+ scp ${SSH_OPTIONS} *.deb *.rpm \
${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 "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}"
echo ${result}
exit ${result}
else
- echo "deb files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}"
+ echo "files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}"
fi
DONE+=(${VIRL_SERVER[${index}]})
fi
@@ -159,7 +174,7 @@ function stop_virl_simulation {
VIRL_SID=$(ssh ${SSH_OPTIONS} \
${VIRL_USERNAME}@${VIRL_SERVER} \
- "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_DEBS_FULL[@]}")
+ "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}")
retval=$?
if [ "${retval}" -ne "0" ]; then
echo "VIRL simulation start failed"
diff --git a/bootstrap-hc2vpp-verify.sh b/bootstrap-hc2vpp-verify.sh
index 13a65bdfcb..af218427ee 100755
--- a/bootstrap-hc2vpp-verify.sh
+++ b/bootstrap-hc2vpp-verify.sh
@@ -29,8 +29,18 @@ VIRL_PKEY=priv_key
VIRL_SERVER_STATUS_FILE="status"
VIRL_SERVER_EXPECTED_STATUS="PRODUCTION"
-VIRL_TOPOLOGY=double-ring-nested.trusty
-VIRL_RELEASE=csit-ubuntu-14.04.4_2016-10-07_1.3
+OS=$1
+
+if [ "${OS}" == "ubuntu1404" ]; then
+ VIRL_TOPOLOGY=double-ring-nested.trusty
+ VIRL_RELEASE=csit-ubuntu-14.04.4_2016-10-07_1.3
+elif [ "${OS}" == "ubuntu1604" ]; then
+ VIRL_TOPOLOGY=double-ring-nested.xenial
+ VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+elif [ "${OS}" == "centos7" ]; then
+ VIRL_TOPOLOGY=double-ring-nested.centos7
+ VIRL_RELEASE=csit-centos-7.3-1611
+fi
SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
@@ -108,18 +118,22 @@ done
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-# VPP, VPP plugin and Honeycomb .deb packages should already be in working directory
-VPP_DEBS=(*.deb)
-echo ${VPP_DEBS[@]}
+# VPP, VPP plugin and Honeycomb packages should already be in working directory
+if [ "${OS}" == "centos7" ]; then
+ VPP_PKGS=(*.rpm)
+else
+ VPP_PKGS=(*.deb)
+fi
+echo ${VPP_PKGS[@]}
VIRL_DIR_LOC="/tmp"
-VPP_DEBS_FULL=(${VPP_DEBS[@]})
+VPP_PKGS_FULL=(${VPP_PKGS[@]})
-# 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}]}
+# Prepend directory location at remote host to package file list
+for index in "${!VPP_PKGS_FULL[@]}"; do
+ VPP_PKGS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_FULL[${index}]}
done
-echo "Updated file names: " ${VPP_DEBS_FULL[@]}
+echo "Updated file names: " ${VPP_PKGS_FULL[@]}
cat ${VIRL_PKEY}
@@ -130,17 +144,17 @@ for index in "${!VIRL_SERVER[@]}"; do
[[ "${DONE[@]}" =~ "${VIRL_SERVER[${index}]}" ]] && copy=0 || copy=1
if [ "${copy}" -eq "0" ]; then
- echo "deb files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}"
+ echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}"
else
- scp ${SSH_OPTIONS} *.deb \
+ scp ${SSH_OPTIONS} *.deb *.rpm \
${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 "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}"
echo ${result}
exit ${result}
else
- echo "deb files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}"
+ echo "files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}"
fi
DONE+=(${VIRL_SERVER[${index}]})
fi
@@ -156,7 +170,7 @@ function stop_virl_simulation {
VIRL_SID=$(ssh ${SSH_OPTIONS} \
${VIRL_USERNAME}@${VIRL_SERVER} \
- "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_DEBS_FULL[@]}")
+ "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}")
retval=$?
if [ "${retval}" -ne "0" ]; then
echo "VIRL simulation start failed"
diff --git a/resources/tools/download_hc_build_pkgs.sh b/resources/tools/download_hc_build_pkgs.sh
index 71a2efea24..3847c4ab1c 100755
--- a/resources/tools/download_hc_build_pkgs.sh
+++ b/resources/tools/download_hc_build_pkgs.sh
@@ -17,17 +17,31 @@ set -ex
trap 'rm -f *.deb.md5; exit' EXIT
trap 'rm -f *.deb.md5;rm -f *.deb; exit' ERR
+STREAM=$1
+OS=$2
# Download the latest VPP and VPP plugin .deb packages
URL="https://nexus.fd.io/service/local/artifact/maven/content"
VER="LATEST"
-REPO='fd.io.master.ubuntu.trusty.main'
+REPO="fd.io.${STREAM}.ubuntu.trusty.main"
VPP_GROUP="io.fd.vpp"
NSH_GROUP="io.fd.nsh_sfc"
VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dev vpp-dpdk-dkms vpp-lib vpp-plugins vpp-api-java"
NSH_ARTIFACTS="vpp-nsh-plugin"
-PACKAGE="deb deb.md5"
-CLASS="deb"
+
+if [ "${OS}" == "ubuntu1404" ]; then
+ OS="ubuntu.trusty.main"
+ PACKAGE="deb deb.md5"
+ CLASS="deb"
+elif [ "${OS}" == "ubuntu1604" ]; then
+ OS="ubuntu.xenial.main"
+ PACKAGE="deb deb.md5"
+ CLASS="deb"
+elif [ "${OS}" == "centos7" ]; then
+ OS="centos7"
+ PACKAGE="rpm rpm.md5"
+ CLASS="rpm"
+fi
for ART in ${VPP_ARTIFACTS}; do
for PAC in $PACKAGE; do
diff --git a/resources/tools/download_hc_pkgs.sh b/resources/tools/download_hc_pkgs.sh
index d52e2469e0..b958dc97d9 100755
--- a/resources/tools/download_hc_pkgs.sh
+++ b/resources/tools/download_hc_pkgs.sh
@@ -17,18 +17,32 @@ set -ex
trap 'rm -f *.deb.md5; exit' EXIT
trap 'rm -f *.deb.md5;rm -f *.deb; exit' ERR
+STREAM=$1
+OS=$2
URL="https://nexus.fd.io/service/local/artifact/maven/content"
VER="RELEASE"
-REPO='fd.io.master.ubuntu.trusty.main'
+REPO="fd.io.${STREAM}.${OS}"
GROUP="io.fd.vpp"
HC_GROUP="io.fd.hc2vpp"
NSH_GROUP="io.fd.nsh_sfc"
VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-dpdk-dev vpp-dpdk-dkms vpp-lib vpp-plugins vpp-api-java"
HC_ARTIFACTS="honeycomb"
NSH_ARTIFACTS="vpp-nsh-plugin"
-PACKAGE="deb deb.md5"
-CLASS="deb"
+
+if [ "${OS}" == "ubuntu1404" ]; then
+ OS="ubuntu.trusty.main"
+ PACKAGE="deb deb.md5"
+ CLASS="deb"
+elif [ "${OS}" == "ubuntu1604" ]; then
+ OS="ubuntu.xenial.main"
+ PACKAGE="deb deb.md5"
+ CLASS="deb"
+elif [ "${OS}" == "centos7" ]; then
+ OS="centos7"
+ PACKAGE="rpm rpm.md5"
+ CLASS="rpm"
+fi
for ART in ${VPP_ARTIFACTS}; do
for PAC in $PACKAGE; do