summaryrefslogtreecommitdiff
path: root/Vagrantfile
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>2016-09-27 16:13:11 -0300
committerBen Pfaff <blp@ovn.org>2016-10-12 12:33:39 -0700
commit888e071e7d95d8ba2b21874af94213424957feda (patch)
treec34a55d61a9490980ce654feca47c4b338ece164 /Vagrantfile
parent561205007e17f699dd552c451f138c7a9c9c01dc (diff)
downloadopenvswitch-888e071e7d95d8ba2b21874af94213424957feda.tar.gz
vagrant: add CentOS 7.2 support
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'Vagrantfile')
-rw-r--r--Vagrantfile34
1 files changed, 34 insertions, 0 deletions
diff --git a/Vagrantfile b/Vagrantfile
index fb17ec5ed..1fe60ecf4 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -30,6 +30,15 @@ aptitude -y install -R \
linux-headers-`uname -r`
SCRIPT
+$bootstrap_centos = <<SCRIPT
+yum -y update
+yum -y install autoconf automake openssl-devel libtool \
+ python-twisted-core python-zope-interface \
+ desktop-file-utils groff graphviz rpmdevtools nc \
+ wget python-six pyftpdlib checkpolicy selinux-policy-devel \
+ libcap-ng-devel kernel-devel-`uname -r` ethtool
+SCRIPT
+
$configure_ovs = <<SCRIPT
cd /vagrant
./boot.sh
@@ -64,6 +73,21 @@ systemctl start openvswitch
systemctl status openvswitch
SCRIPT
+$install_centos_rpm = <<SCRIPT
+cd ~/build
+PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
+make && make dist
+rpmdev-setuptree
+cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
+rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-rhel6.spec
+rpmbuild --bb --without check /vagrant/rhel/openvswitch.spec
+rpm -e openvswitch
+rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.x86_64.rpm
+systemctl enable openvswitch
+systemctl start openvswitch
+systemctl status openvswitch
+SCRIPT
+
$install_deb = <<SCRIPT
cd ~/build
PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
@@ -105,4 +129,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
fedora.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
fedora.vm.provision "install_rpm", type: "shell", inline: $install_rpm
end
+ config.vm.define "centos-7.2" do |centos|
+ centos.vm.box = "bento/centos-7.2"
+ centos.vm.synced_folder ".", "/vagrant", type: "rsync"
+ centos.vm.provision "bootstrap", type: "shell", inline: $bootstrap_centos
+ centos.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
+ centos.vm.provision "build_ovs", type: "shell", inline: $build_ovs
+ centos.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
+ centos.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
+ centos.vm.provision "install_rpm", type: "shell", inline: $install_centos_rpm
+ end
end