]> git.proxmox.com Git - mirror_ovs.git/commitdiff
vagrant: add CentOS 7.2 support
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Tue, 27 Sep 2016 19:13:11 +0000 (16:13 -0300)
committerBen Pfaff <blp@ovn.org>
Wed, 12 Oct 2016 19:33:39 +0000 (12:33 -0700)
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Vagrantfile

index fb17ec5ede2855e442e517247c612a0fec6fe320..1fe60ecf479121112bc9da0e63e4ddf0bbd5915c 100644 (file)
@@ -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