dpif-netlink: add GENEVE creation support
[cascardo/ovs.git] / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5 VAGRANTFILE_API_VERSION = "2"
6 Vagrant.require_version ">=1.7.0"
7
8 $bootstrap_fedora = <<SCRIPT
9 dnf -y update
10 dnf -y install autoconf automake openssl-devel libtool \
11                python-twisted-core python-zope-interface PyQt4 \
12                desktop-file-utils groff graphviz rpmdevtools \
13                wget python-six pyftpdlib checkpolicy selinux-policy-devel \
14                libcap-ng-devel kernel-devel-`uname -r`
15 echo "search extra update built-in" >/etc/depmod.d/search_path.conf
16 cd /vagrant
17 ./boot.sh
18 SCRIPT
19
20 $configure_ovs = <<SCRIPT
21 mkdir -p ~/build
22 cd ~/build
23 /vagrant/configure --with-linux=/lib/modules/`uname -r`/build --enable-silent-rules
24 SCRIPT
25
26 $build_ovs = <<SCRIPT
27 cd ~/build
28 make
29 SCRIPT
30
31 $test_kmod = <<SCRIPT
32 cd ~/build
33 make check-kmod
34 SCRIPT
35
36 $install_rpm = <<SCRIPT
37 cd ~/build
38 PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
39 make && make dist
40 rpmdev-setuptree
41 cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
42 rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
43 rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
44 rpm -e openvswitch
45 rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.fc23.x86_64.rpm
46 systemctl enable openvswitch
47 systemctl start openvswitch
48 systemctl status openvswitch
49 SCRIPT
50
51 $test_ovs_system_userspace = <<SCRIPT
52 cd ~/build
53 make check-system-userspace
54 SCRIPT
55
56 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
57   config.vm.define "fedora-23" do |fedora|
58        fedora.vm.box = "bento/fedora-23"
59        fedora.vm.provision "bootstrap", type: "shell", inline: $bootstrap_fedora
60        fedora.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
61        fedora.vm.provision "build_ovs", type: "shell", inline: $build_ovs
62        fedora.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
63        fedora.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
64        fedora.vm.provision "install_rpm", type: "shell", inline: $install_rpm
65   end
66 end