X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fsfc%2FFull_Deploy%2Fsetup-docker-image.sh;fp=csit%2Fsuites%2Fsfc%2FFull_Deploy%2Fsetup-docker-image.sh;h=eef3644551fca0b266c7f11116e560d1da271eeb;hb=071f0d00a025744a35379653762d439b807367e3;hp=b30e443140f015c5084d9bf4758ec64a841908f2;hpb=08e1de3549b36c61366ec909477ac4d1a57f2f37;p=integration%2Ftest.git diff --git a/csit/suites/sfc/Full_Deploy/setup-docker-image.sh b/csit/suites/sfc/Full_Deploy/setup-docker-image.sh index b30e443140..eef3644551 100755 --- a/csit/suites/sfc/Full_Deploy/setup-docker-image.sh +++ b/csit/suites/sfc/Full_Deploy/setup-docker-image.sh @@ -4,21 +4,19 @@ set -o xtrace set -o nounset #Do not allow for unset variables #set -e #Exit script if a command fails -# bootstrap_centos WORK_DIR=`pwd` -if sudo yum install -y "kernel-devel-uname-r == $(uname -r)"; then - echo "Kernel-devel installed correctly" -else - echo "Warning: Errors issued when installing kernel-devel" -fi -APT="sudo yum install -y git kernel-debug-devel kernel-headers python-devel vim autoconf automake libtool systemd-units rpm-build openssl openssl-devel groff graphviz selinux-policy-devel python python-twisted-core python-zope-interface python-twisted-web PyQt4 python-six desktop-file-utils procps-ng wget" -if $APT; then - echo "Pacakges installed correctly" -else - echo "Installation of packages failed" - exit 1 -fi +# bootstrap_centos +EL_VERSION=$(grep -oP '\d+\.\d+.\d+' /etc/centos-release) +K_VERSION=$(uname -r) +APT="sudo yum update -y centos-release" +$APT || (echo "Failed to update centos release info" && exit 1) + +APT="sudo yum install -y --enablerepo=C${EL_VERSION}-base --enablerepo=C${EL_VERSION}-updates kernel-devel-${K_VERSION} kernel-debug-devel-${K_VERSION} kernel-headers-${K_VERSION}" +$APT || (echo "Failed to install kernel devel packages" && exit 1) + +APT="sudo yum install -y git python-devel vim autoconf automake libtool systemd-units rpm-build openssl openssl-devel groff graphviz selinux-policy-devel python python-twisted-core python-zope-interface python-twisted-web PyQt4 python-six desktop-file-utils procps-ng wget" +$APT || (echo "Failed to install ovs requirement packages" && exit 1) cd $WORK_DIR [ -e configure-ovs.sh ] || \ @@ -43,7 +41,7 @@ git am ../ovs_nsh_patches/v2.6.1/*.patch #compile ovs ./boot.sh -./configure --with-linux=/lib/modules/`uname -r`/build --prefix=/usr/local +./configure --with-linux=/lib/modules/${K_VERSION}/build --prefix=/usr/local make rpm-fedora RPMBUILD_OPT="--without check --without libcapng" make DESTDIR=$WORK_DIR/ovs_install/openvswitch_2.6.1 install