]> git.proxmox.com Git - mirror_ovs.git/blame - Vagrantfile
vagrant: make sure to bootstrap before configure_ovs.
[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"
6
7$bootstrap_fedora = <<SCRIPT
8yum -y update
9yum -y install autoconf automake openssl-devel libtool \
10 python-twisted-core python-zope-interface PyQt4 \
11 desktop-file-utils groff graphviz rpmdevtools
12echo "search extra update built-in" >/etc/depmod.d/search_path.conf
ecf68fa4
MS
13cd /vagrant
14./boot.sh
b56b2566
AZ
15SCRIPT
16
17$configure_ovs = <<SCRIPT
18mkdir -p ~/build
19cd ~/build
20/vagrant/configure --with-linux=/lib/modules/`uname -r`/build
21SCRIPT
22
23$build_ovs = <<SCRIPT
24cd ~/build
25make
26SCRIPT
27
28$install_rpm = <<SCRIPT
29cd ~/build
30PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
31make && make dist
32rpmdev-setuptree
33cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
34rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
35sudo rpm -e openvswitch
36sudo rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.fc20.x86_64.rpm
37sudo systemctl enable openvswitch
38sudo systemctl start openvswitch
39sudo systemctl status openvswitch
40SCRIPT
41
42Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
ecf68fa4
MS
43 config.vm.box = "chef/fedora-20"
44 config.vm.provision "bootstrap", type: "shell", inline: $bootstrap_fedora
b56b2566
AZ
45 config.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs, privileged: false
46 config.vm.provision "build_ovs", type: "shell", inline: $build_ovs, privileged: false
47 config.vm.provision "install_rpm", type: "shell", inline: $install_rpm, privileged: false
48end