Fix of centos bootstrap and dut_setup.sh 92/5092/18
authorJan Gelety <jgelety@cisco.com>
Mon, 20 Feb 2017 18:25:30 +0000 (19:25 +0100)
committerJan Gelety <jgelety@cisco.com>
Tue, 21 Feb 2017 15:18:24 +0000 (16:18 +0100)
Change-Id: I9fc3a74bf6356bdccee16c977df86567e91b4acf
Signed-off-by: Jan Gelety <jgelety@cisco.com>
DPDK_STABLE_VER
VPP_REPO_URL_CENTOS
VPP_STABLE_VER_CENTOS [new file with mode: 0644]
VPP_STABLE_VER_UBUNTU [moved from VPP_STABLE_VER with 100% similarity]
bootstrap-centos.sh
bootstrap-ubuntu.sh
bootstrap-verify-perf.sh
bootstrap-vpp-verify-semiweekly.sh
bootstrap-vpp-verify-weekly.sh
resources/libraries/bash/dut_setup.sh
resources/tools/virl/bin/start-testcase

index 4d15335..63a0487 100644 (file)
@@ -1 +1 @@
-16.11-vpp1_amd64
+16.11-vpp5
index dde24ca..bc11e8d 100644 (file)
@@ -1 +1 @@
-https://nexus.fd.io/content/repositories/fd.io.yum/
+https://nexus.fd.io/content/repositories/fd.io.master.centos7/io/fd/vpp/
diff --git a/VPP_STABLE_VER_CENTOS b/VPP_STABLE_VER_CENTOS
new file mode 100644 (file)
index 0000000..e803432
--- /dev/null
@@ -0,0 +1 @@
+17.04-rc0~235_g6f96649~b1858.x86_64
similarity index 100%
rename from VPP_STABLE_VER
rename to VPP_STABLE_VER_UBUNTU
index 6f8fba0..0e5e664 100755 (executable)
@@ -17,8 +17,7 @@ set -x
 cat /etc/hostname
 cat /etc/hosts
 
-sudo apt-get -y update
-sudo apt-get -y install libpython2.7-dev python-virtualenv
+sudo yum install -y python-devel python-virtualenv
 
 VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30")
 
@@ -28,7 +27,7 @@ VIRL_SERVER_STATUS_FILE="status"
 VIRL_SERVER_EXPECTED_STATUS="PRODUCTION"
 
 VIRL_TOPOLOGY=double-ring-nested.centos7
-VIRL_RELEASE=csit-centos-7.3-1611
+VIRL_RELEASE=csit-centos-7.3-1611_2017-02-14_1.3
 
 SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
 
@@ -46,7 +45,7 @@ LOG_PATH="${SCRIPT_DIR}/tmp"
 # Use tmp dir for tarballs
 export TMPDIR="${SCRIPT_DIR}/tmp"
 
-SHARED_MEMORY_PATH="/run/shm"
+SHARED_MEMORY_PATH="/dev/shm"
 
 function ssh_do() {
     echo
@@ -125,23 +124,21 @@ done
 echo "Selected VIRL servers: ${VIRL_SERVER[@]}"
 
 # Temporarily download VPP packages from nexus.fd.io
+DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER).x86_64
+VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_CENTOS)
+VPP_CLASSIFIER=""
 if [ "${#}" -ne "0" ]; then
     arr=(${@})
     echo ${arr[0]}
     # DPDK is not part of the vpp build
-    DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)
-    wget -q "${VPP_REPO_URL}/vpp-dpdk-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
+    wget -q "${VPP_REPO_URL}/vpp-dpdk-devel/${DPDK_STABLE_VER}/vpp-dpdk-devel-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
 else
     rm -f *.rpm
-    DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)
-    VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER)
-    VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_CENTOS)
-    VPP_CLASSIFIER="-rpm"
+    VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_CENTOS)
     wget -q "${VPP_REPO_URL}/vpp/${VPP_STABLE_VER}/vpp-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dbg/${VPP_STABLE_VER}/vpp-dbg-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dev/${VPP_STABLE_VER}/vpp-dev-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dpdk-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
+    wget -q "${VPP_REPO_URL}/vpp-debuginfo/${VPP_STABLE_VER}/vpp-debuginfo-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
+    wget -q "${VPP_REPO_URL}/vpp-devel/${VPP_STABLE_VER}/vpp-devel-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
+    wget -q "${VPP_REPO_URL}/vpp-dpdk-devel/${DPDK_STABLE_VER}/vpp-dpdk-devel-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
     wget -q "${VPP_REPO_URL}/vpp-lib/${VPP_STABLE_VER}/vpp-lib-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
     wget -q "${VPP_REPO_URL}/vpp-plugins/${VPP_STABLE_VER}/vpp-plugins-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit
 fi
index 7eeb681..b860231 100755 (executable)
@@ -29,7 +29,7 @@ VIRL_SERVER_STATUS_FILE="status"
 VIRL_SERVER_EXPECTED_STATUS="PRODUCTION"
 
 VIRL_TOPOLOGY=double-ring-nested.xenial
-VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+VIRL_RELEASE=csit-ubuntu-16.04.1_2017-02-20_1.7
 
 SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
 
@@ -126,8 +126,8 @@ done
 echo "Selected VIRL servers: ${VIRL_SERVER[@]}"
 
 # Temporarily download VPP and DPDK packages from nexus.fd.io
-DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)
-VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL)
+DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)_amd64
+VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_UBUNTU)
 VPP_CLASSIFIER="-deb"
 if [ "${#}" -ne "0" ]; then
     arr=(${@})
@@ -137,7 +137,7 @@ if [ "${#}" -ne "0" ]; then
     wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
 else
     rm -f *.deb
-    VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER)
+    VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_UBUNTU)
     wget -q "${VPP_REPO_URL}/vpp/${VPP_STABLE_VER}/vpp-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
     wget -q "${VPP_REPO_URL}/vpp-dbg/${VPP_STABLE_VER}/vpp-dbg-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
     wget -q "${VPP_REPO_URL}/vpp-dev/${VPP_STABLE_VER}/vpp-dev-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
index e08a923..f7fcb41 100755 (executable)
@@ -45,9 +45,9 @@ then
         # Take vpp package and get the vpp version
         VPP_STABLE_VER="$( expr match $(ls *.deb | head -n 1) 'vpp-\(.*\)-deb.deb' )"
     else
-        DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)
-        VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL)
-        VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER)
+        DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)_amd64
+        VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_UBUNTU)
+        VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_UBUNTU)
         VPP_CLASSIFIER="-deb"
         # Download vpp build from nexus and set VPP_DEBS variable
         wget -q "${VPP_REPO_URL}/vpp/${VPP_STABLE_VER}/vpp-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
@@ -71,8 +71,8 @@ then
     # Take vpp package and get the vpp version
     VPP_STABLE_VER="$( expr match $1 'vpp-\(.*\)-deb.deb' )"
     # DPDK is not part of the vpp build
-    DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)
-    VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL)
+    DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)_amd64
+    VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_UBUNTU)
     VPP_CLASSIFIER="-deb"
     wget -q "${VPP_REPO_URL}/vpp-dpdk-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
     wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
index 6fa5055..b0402e0 100644 (file)
@@ -21,10 +21,6 @@ RETURN_STATUS=0
 cat /etc/hostname
 cat /etc/hosts
 
-export DEBIAN_FRONTEND=noninteractive
-sudo apt-get -y update
-sudo apt-get -y install libpython2.7-dev python-virtualenv
-
 PYBOT_ARGS="--noncritical MULTI_THREAD"
 
 ARCHIVE_ARTIFACTS=(log.html output.xml report.html)
@@ -34,8 +30,12 @@ export PYTHONPATH=${SCRIPT_DIR}
 
 if [ -f "/etc/redhat-release" ]; then
     DISTRO="CENTOS"
+    sudo yum install -y python-devel python-virtualenv
 else
     DISTRO="UBUNTU"
+    export DEBIAN_FRONTEND=noninteractive
+    sudo apt-get -y update
+    sudo apt-get -y install libpython2.7-dev python-virtualenv
 fi
 
 # 1st step: Download and prepare VPP packages
@@ -47,29 +47,29 @@ if [ "${#}" -ne "0" ]; then
 else
     case "$DISTRO" in
         CENTOS )
-            rm -f *.rpm
+            PACKAGE=rpm
             ;;
         UBUNTU )
-            rm -f *.deb
+            PACKAGE=deb
     esac
     # Download the latest VPP build install packages
+    rm -f *.${PACKAGE}
     echo Downloading VPP packages...
     bash ${SCRIPT_DIR}/resources/tools/download_install_vpp_pkgs.sh --skip-install
 fi
 
 # Take vpp package and get the vpp version
+VPP_PKGS=(*.$PACKAGE)
 case "$DISTRO" in
         CENTOS )
-            VPP_PKGS=(*.rpm)
             VPP_VER="$( expr match $(ls *.rpm | head -n 1) 'vpp-\(.*\).rpm' )"
-            echo ${VPP_PKGS[@]}
             ;;
         UBUNTU )
-            VPP_PKGS=(*.deb)
             VPP_VER="$( expr match $(ls *.deb | head -n 1) 'vpp-\(.*\)-deb.deb' )"
-            echo ${VPP_PKGS[@]}
 esac
 
+echo ${VPP_PKGS[@]}
+
 set +x
 echo "****************************************************************************************************************************************"
 echo "1st step: Download VPP packages                                                                                                 FINISHED"
@@ -112,7 +112,7 @@ case "$DISTRO" in
             ;;
         UBUNTU )
             VIRL_TOPOLOGY=double-ring-nested.xenial
-            VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+            VIRL_RELEASE=csit-ubuntu-16.04.1_2017-02-20_1.7
 esac
 
 SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
@@ -202,7 +202,7 @@ echo "Updated file names: " ${VPP_PKGS_VIRL[@]}
 
 cat ${VIRL_PKEY}
 # Copy the files to VIRL host
-scp ${SSH_OPTIONS} *.deb \
+scp ${SSH_OPTIONS} *.${PACKAGE} \
     ${VIRL_USERNAME}@${VIRL_SERVER}:${VIRL_DIR_LOC}/
 
 result=$?
index d9749d5..c04db57 100644 (file)
@@ -17,10 +17,6 @@ set -x
 cat /etc/hostname
 cat /etc/hosts
 
-export DEBIAN_FRONTEND=noninteractive
-sudo apt-get -y update
-sudo apt-get -y install libpython2.7-dev python-virtualenv
-
 VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30")
 VIRL_SERVER=""
 
@@ -29,8 +25,19 @@ VIRL_PKEY=priv_key
 VIRL_SERVER_STATUS_FILE="status"
 VIRL_SERVER_EXPECTED_STATUS="PRODUCTION"
 
-VIRL_TOPOLOGY=double-ring-nested.xenial
-VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+if [ -f "/etc/redhat-release" ]; then
+    DISTRO="CENTOS"
+    sudo yum install -y python-devel python-virtualenv
+    VIRL_TOPOLOGY=double-ring-nested.centos7
+    VIRL_RELEASE=csit-centos-7.3-1611_2017-02-14_1.3
+else
+    DISTRO="UBUNTU"
+    export DEBIAN_FRONTEND=noninteractive
+    sudo apt-get -y update
+    sudo apt-get -y install libpython2.7-dev python-virtualenv
+    VIRL_TOPOLOGY=double-ring-nested.xenial
+    VIRL_RELEASE=csit-ubuntu-16.04.1_2017-02-20_1.7
+fi
 
 SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
 
@@ -109,42 +116,57 @@ done
 # Temporarily download VPP and DPDK packages from nexus.fd.io
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
-DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)
-VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL)
-VPP_CLASSIFIER="-deb"
+case "$DISTRO" in
+        CENTOS )
+            VPP_ARTIFACTS="vpp vpp-debuginfo vpp-devel vpp-lib vpp-plugins"
+            DPDK_ARTIFACTS="vpp-dpdk-devel"
+            PACKAGE="rpm"
+            VPP_CLASSIFIER=""
+            DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER).x86_64
+            VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_CENTOS)
+            VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_CENTOS)
+            ;;
+        UBUNTU )
+            VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-lib vpp-plugins"
+            DPDK_ARTIFACTS="vpp-dpdk-dev vpp-dpdk-dkms"
+            PACKAGE="deb"
+            VPP_CLASSIFIER="-deb"
+            DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)_amd64
+            VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_UBUNTU)
+            VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_UBUNTU)
+esac
 
 if [ "${#}" -ne "0" ]; then
     arr=(${@})
     echo ${arr[0]}
     # DPDK is not part of the vpp build
-    wget -q "${VPP_REPO_URL}/vpp-dpdk-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+    for ARTIFACT in ${DPDK_ARTIFACTS}; do
+        wget -q "${VPP_REPO_URL}/${ARTIFACT}/${DPDK_STABLE_VER}/${ARTIFACT}-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.${PACKAGE}" || exit
+    done
 else
-    rm -f *.deb
-    VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER)
-    wget -q "${VPP_REPO_URL}/vpp/${VPP_STABLE_VER}/vpp-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dbg/${VPP_STABLE_VER}/vpp-dbg-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dev/${VPP_STABLE_VER}/vpp-dev-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dpdk-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
-    wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
-    wget -q "${VPP_REPO_URL}/vpp-lib/${VPP_STABLE_VER}/vpp-lib-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
-    wget -q "${VPP_REPO_URL}/vpp-plugins/${VPP_STABLE_VER}/vpp-plugins-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+    rm -f *.${PACKAGE}
+    for ARTIFACT in ${DPDK_ARTIFACTS}; do
+        wget -q "${VPP_REPO_URL}/${ARTIFACT}/${DPDK_STABLE_VER}/${ARTIFACT}-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.${PACKAGE}" || exit
+    done
+    for ARTIFACT in ${VPP_ARTIFACTS}; do
+        wget -q "${VPP_REPO_URL}/${ARTIFACT}/${VPP_STABLE_VER}/${ARTIFACT}-${VPP_STABLE_VER}${VPP_CLASSIFIER}.${PACKAGE}" || exit
+    done
 fi
 
-VPP_DEBS=(*.deb)
-echo ${VPP_DEBS[@]}
+VPP_PKGS=(*.$PACKAGE)
+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}]}
+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[@]}
 
 # Copy the files to VIRL host
-scp ${SSH_OPTIONS} *.deb \
+scp ${SSH_OPTIONS} *.${PACKAGE} \
     ${VIRL_USERNAME}@${VIRL_SERVER}:${VIRL_DIR_LOC}/
 
 result=$?
@@ -164,7 +186,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"
@@ -214,7 +236,7 @@ do
         -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \
         --suite "tests.func" \
         --include vm_envAND3_node_single_link_topo \
-        --include vm_envAND3_node_double_link_topo \
+        --include vm_envAND3_nodePACAKGE_double_link_topo \
         --exclude PERFTEST \
         --noncritical EXPECTED_FAILING \
         --output log_test_set${test_set} \
index fa88978..952b82b 100644 (file)
@@ -23,7 +23,11 @@ function cmd {
 echo
 echo "[Command_desc] Starting ${0}"
 
-cmd 'dpkg -l vpp\*'
+if [ -f "/etc/redhat-release" ]; then
+    cmd 'rpm -qai vpp*'
+else
+    cmd 'dpkg -l vpp\*'
+fi
 
 cmd 'ps aux | grep vpp'
 
@@ -44,10 +48,14 @@ cmd 'sudo dmidecode | grep UUID'
 
 cmd 'lspci -Dnn'
 
-cmd 'tail -n 100 /var/log/syslog'
+if [ -f "/etc/redhat-release" ]; then
+    cmd 'tail -n 100 /var/log/messages'
+else
+    cmd 'tail -n 100 /var/log/syslog'
+fi
 
 echo "[Command_desc] Adding dpdk-input trace"
 cmd 'sudo vpp_api_test <<< "exec trace add dpdk-input 100"'
 
 echo "[Command_desc] Adding vhost-user-input trace"
-cmd 'sudo vpp_api_test <<< "exec trace add vhost-user-input 100"'
+cmd 'sudo vpp_api_test <<< "exec trace add vhost-user-input 100"'
\ No newline at end of file
index 99a4b0b..151fce8 100755 (executable)
@@ -54,9 +54,9 @@ def main():
     #
     parser = argparse.ArgumentParser()
     parser.add_argument("topology", help="the base topology to be started")
-    parser.add_argument("packages", help="Path to the VPP .deb(s) that " +
-                        "is/are to be installed", nargs='+')
-    parser.add_argument("-c", "--copy", help="Copy the .deb packages, " +
+    parser.add_argument("packages", help="Path to the VPP .deb(s) or .rpm(s) " +
+                        "that is/are to be installed", nargs='+')
+    parser.add_argument("-c", "--copy", help="Copy the VPP packages, " +
                         "leaving the originals in place. Default is to " +
                         "move them.", action='store_true')
     parser.add_argument("-k", "--keep", help="Keep (do not delete) the " +
@@ -91,8 +91,8 @@ def main():
     parser.add_argument("-spu", "--ssh-pubkey", help="SSH public keyfile",
                         default="/home/jenkins-in/.ssh/id_rsa_virl.pub")
     parser.add_argument("-r", "--release", help="VM disk image/release " +
-                        "(ex. \"csit-ubuntu-14.04.4_2016-05-25_1.0\")",
-                        default="csit-ubuntu-14.04.4_2016-05-25_1.0")
+                        "(ex. \"csit-ubuntu-16.04.1_2016-12-19_1.6\")",
+                        default="csit-ubuntu-16.04.1_2016-12-19_1.6")
     parser.add_argument("--topology-directory", help="Topology directory",
                         default="/home/jenkins-in/testcase-infra/topologies")
 
@@ -140,9 +140,9 @@ def main():
         open(topology_virl_filename, 'r') as old_file:
         for line in old_file:
             line = line.replace("  - VIRL-USER-SSH-PUBLIC-KEY", "  - "+pub_key)
-            line = line.replace("$$NFS_SERVER_SCRATCH$$", \
+            line = line.replace("$$NFS_SERVER_SCRATCH$$",
                 args.nfs_server_ip+":"+args.nfs_scratch_directory)
-            line = line.replace("$$NFS_SERVER_COMMON$$", \
+            line = line.replace("$$NFS_SERVER_COMMON$$",
                 args.nfs_server_ip+":"+args.nfs_common_directory)
             line = line.replace("$$VM_IMAGE$$", "server-"+args.release)
             new_file.write(line)
@@ -343,8 +343,21 @@ def main():
                 client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
                 client.connect(ipaddr, username=args.ssh_user,
                                key_filename=args.ssh_privkey)
+                if 'centos' in args.topology:
+                    if args.verbosity >= 1:
+                        print "DEBUG: Installing RPM packages"
+                    vpp_install_command = 'sudo rpm -ivh /scratch/vpp/*.rpm'
+                elif 'trusty' in args.topology or 'xenial' in args.topology:
+                    if args.verbosity >= 1:
+                        print "DEBUG: Installing DEB packages"
+                    vpp_install_command = 'sudo dpkg -i --force-all ' \
+                                          '/scratch/vpp/*.deb'
+                else:
+                    print "ERROR: Unsupported OS requested: {}"\
+                        .format(args.topology)
+                    vpp_install_command = ''
                 stdin, stdout, stderr = \
-                    client.exec_command('sudo dpkg -i --force-all /scratch/vpp/*deb')
+                    client.exec_command(vpp_install_command)
                 c_stdout = stdout.read()
                 c_stderr = stderr.read()
                 if args.verbosity >= 2:

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.