2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00
Files
openvswitch/Vagrantfile
Mark D. Gray d64c5e8608 Vagrantfile: Update to Fedora 22 base box
Fedora 20 base box is no longer available at chef/fedora20.

Signed-off-by: Mark D. Gray <mark.d.gray@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2015-11-29 18:27:31 -08:00

66 lines
2.0 KiB
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">=1.7.0"
$bootstrap_fedora = <<SCRIPT
dnf -y update
dnf -y install autoconf automake openssl-devel libtool \
python-twisted-core python-zope-interface PyQt4 \
desktop-file-utils groff graphviz rpmdevtools \
libcap-ng-devel kernel-devel-`uname -r`
echo "search extra update built-in" >/etc/depmod.d/search_path.conf
cd /vagrant
./boot.sh
SCRIPT
$configure_ovs = <<SCRIPT
mkdir -p ~/build
cd ~/build
/vagrant/configure --with-linux=/lib/modules/`uname -r`/build
SCRIPT
$build_ovs = <<SCRIPT
cd ~/build
make
SCRIPT
$test_kmod = <<SCRIPT
cd ~/build
make check-kmod
SCRIPT
$install_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-fedora.spec
rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
rpm -e openvswitch
rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.fc22.x86_64.rpm
systemctl enable openvswitch
systemctl start openvswitch
systemctl status openvswitch
SCRIPT
$test_ovs_system_userspace = <<SCRIPT
cd ~/build
make check-system-userspace
SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "fedora-22" do |fedora|
fedora.vm.box = "bento/fedora-22"
fedora.vm.provision "bootstrap", type: "shell", inline: $bootstrap_fedora
fedora.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
fedora.vm.provision "build_ovs", type: "shell", inline: $build_ovs
fedora.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
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
end