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