summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2020-04-27 14:29:26 +0200
committerspuiuk <sachin.prabhu@gmail.com>2020-04-27 19:45:17 +0100
commit7a5a46a881d75483199846b479effd61d12dc9c1 (patch)
tree9f13c526b2fa9f711d176d2ec59f565c9779e615
parent34ee6120850779399479442f8608ff3a8a289a23 (diff)
downloadsamba-integration-7a5a46a881d75483199846b479effd61d12dc9c1.tar.gz
samba-integration-7a5a46a881d75483199846b479effd61d12dc9c1.tar.xz
samba-integration-7a5a46a881d75483199846b479effd61d12dc9c1.zip
centos-ci: install vagrant from upstream instead of scl
vagrant in SCL is deprecated and does not install any more. Because there's currently no good choice to work with centos7, we are reverting to installing vagrant from upstream (hashicorp) RPMs. Inspired by https://github.com/heketi/ci-tests/pull/9 Signed-off-by: Michael Adam <obnox@samba.org>
-rwxr-xr-xsamba-integration-centos-ci-tests.sh39
1 files changed, 25 insertions, 14 deletions
diff --git a/samba-integration-centos-ci-tests.sh b/samba-integration-centos-ci-tests.sh
index 92f5ac5..e49a0aa 100755
--- a/samba-integration-centos-ci-tests.sh
+++ b/samba-integration-centos-ci-tests.sh
@@ -67,25 +67,37 @@ fi
# - prefetch vm image
#
-# enable additional sources for yum
-# (SCL repository for Vagrant, epel for ansible)
-yum -y install centos-release-scl epel-release
+# enable additional sources for yum:
+# - epel for ansible
+yum -y install epel-release
# Install additional packages
#
-# note: adding sclo-vagrant1-vagrant explicitly seems to fix
-# issues where libvirt fails to bring up the vm with errors like this:
-# "Call to virDomainCreateWithFlags failed: the CPU is incompatible with host
-# CPU: Host CPU does not provide required features: svm" (or vmx)
-#
yum -y install \
qemu-kvm \
qemu-kvm-tools \
qemu-img \
- sclo-vagrant1-vagrant \
- sclo-vagrant1-vagrant-libvirt \
make \
- ansible
+ ansible \
+ libvirt \
+ libvirt-devel
+
+# "Development Tools" and libvirt-devel are needed to run
+# "vagrant plugin install"
+yum -y group install "Development Tools"
+
+# download the vagrant RPM
+#
+curl -O -# https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.rpm
+
+# yum install fails if the package is already installed and updated to the
+# latest version. The pattern of (install || update) is a trick to prevent
+# installation from failing when we have entered the script for the second time.
+# It may look a bit weird, but is the easiest way I found to make sure
+# we install the package and have it at the desired version.
+yum -y install ./vagrant_2.2.7_x86_64.rpm || yum -y update ./vagrant_2.2.7_x86_64.rpm
+
+vagrant plugin install vagrant-libvirt
# Vagrant needs libvirtd running
systemctl start libvirtd
@@ -99,8 +111,7 @@ virsh capabilities
# in order to get proper version metadata & caching support.
# (The echo is becuase of "set -e" and that an existing box will cause
# vagrant to return non-zero.)
-scl enable sclo-vagrant1 -- \
- vagrant box add "https://vagrantcloud.com/centos/7" --provider "libvirt" \
+vagrant box add "https://vagrantcloud.com/centos/7" --provider "libvirt" \
|| echo "Warning: the vagrant box may already exist OR an error occured"
#
@@ -109,6 +120,6 @@ scl enable sclo-vagrant1 -- \
# run the tests
#
-echo make "${TEST_TARGET}" | scl enable sclo-vagrant1 bash
+make "${TEST_TARGET}"
# END