Signed-off-by: Thadeu Lima de Souza Cascardo <casca...@redhat.com> --- Vagrantfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
diff --git a/Vagrantfile b/Vagrantfile index 91f943d..f83d3fc 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 @@ -65,6 +74,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` @@ -106,4 +130,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 -- 2.7.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev