]> git.proxmox.com Git - mirror_ovs.git/blame - Vagrantfile
ofproto-dpif-xlate: Translate timeout policy in ct action
[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 \
bb1a7ca2 11 python-devel python3-devel \
db8dcbaf 12 python-twisted python-zope-interface \
40c7b2fc 13 desktop-file-utils groff graphviz rpmdevtools nc curl \
6a6b35fc 14 wget python-six pyftpdlib checkpolicy selinux-policy-devel \
253e4dc0
DM
15 libcap-ng-devel kernel-devel-`uname -r` ethtool python-tftpy \
16 lftp
b56b2566 17echo "search extra update built-in" >/etc/depmod.d/search_path.conf
7c127f28
TLSC
18SCRIPT
19
20$bootstrap_debian = <<SCRIPT
21aptitude -y update
22aptitude -y upgrade
23aptitude -y install -R \
5a0e4aec
BP
24 build-essential dpkg-dev lintian devscripts fakeroot \
25 debhelper dh-autoreconf uuid-runtime \
26 autoconf automake libtool \
27 python-all python-twisted-core python-twisted-conch \
28 xdg-utils groff graphviz netcat curl \
29 wget python-six ethtool \
30 libcap-ng-dev libssl-dev python-dev openssl \
31 python-pyftpdlib python-flake8 python-tftpy \
253e4dc0
DM
32 linux-headers-`uname -r` \
33 lftp
b56b2566
AZ
34SCRIPT
35
888e071e
TLSC
36$bootstrap_centos = <<SCRIPT
37yum -y update
38yum -y install autoconf automake openssl-devel libtool \
39 python-twisted-core python-zope-interface \
40c7b2fc 40 desktop-file-utils groff graphviz rpmdevtools nc curl \
888e071e 41 wget python-six pyftpdlib checkpolicy selinux-policy-devel \
253e4dc0
DM
42 libcap-ng-devel kernel-devel-`uname -r` ethtool net-tools \
43 lftp
888e071e
TLSC
44SCRIPT
45
b56b2566 46$configure_ovs = <<SCRIPT
7c127f28
TLSC
47cd /vagrant
48./boot.sh
3d982663 49[ -f Makefile ] && ./configure && make distclean
b56b2566
AZ
50mkdir -p ~/build
51cd ~/build
1a523ec4 52/vagrant/configure --with-linux=/lib/modules/`uname -r`/build --enable-silent-rules
b56b2566
AZ
53SCRIPT
54
55$build_ovs = <<SCRIPT
56cd ~/build
57make
58SCRIPT
59
3314f01e
AZ
60$test_kmod = <<SCRIPT
61cd ~/build
960e99dc 62make check-kmod RECHECK=yes
3314f01e
AZ
63SCRIPT
64
b56b2566
AZ
65$install_rpm = <<SCRIPT
66cd ~/build
67PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
68make && make dist
69rpmdev-setuptree
70cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
d06c1ff8 71rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
b56b2566 72rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
3314f01e 73rpm -e openvswitch
53de7528 74rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.fc23.x86_64.rpm
3314f01e
AZ
75systemctl enable openvswitch
76systemctl start openvswitch
77systemctl status openvswitch
b56b2566
AZ
78SCRIPT
79
888e071e
TLSC
80$install_centos_rpm = <<SCRIPT
81cd ~/build
82PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
83make && make dist
84rpmdev-setuptree
85cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
db8dcbaf
LM
86rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
87rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
888e071e
TLSC
88rpm -e openvswitch
89rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.x86_64.rpm
90systemctl enable openvswitch
91systemctl start openvswitch
92systemctl status openvswitch
93SCRIPT
94
7c127f28
TLSC
95$install_deb = <<SCRIPT
96cd ~/build
97PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
98make dist
99cd ~/
100ln -sf ~/build/openvswitch-$PACKAGE_VERSION.tar.gz openvswitch_$PACKAGE_VERSION.orig.tar.gz
101rm -rf ~/openvswitch-$PACKAGE_VERSION
102tar xzf openvswitch_$PACKAGE_VERSION.orig.tar.gz
103cd ~/openvswitch-$PACKAGE_VERSION
104debuild -us -uc
105dpkg -i ../openvswitch-{common,switch}*deb
106systemctl enable openvswitch-switch
107systemctl start openvswitch-switch
108systemctl status openvswitch-switch
109SCRIPT
110
548f9fe7
DDP
111$test_ovs_system_userspace = <<SCRIPT
112cd ~/build
960e99dc 113make check-system-userspace RECHECK=yes
548f9fe7
DDP
114SCRIPT
115
b56b2566 116Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
7c127f28
TLSC
117 config.vm.define "debian-8" do |debian|
118 debian.vm.box = "debian/jessie64"
119 debian.vm.synced_folder ".", "/vagrant", type: "rsync"
120 debian.vm.provision "bootstrap", type: "shell", inline: $bootstrap_debian
121 debian.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
122 debian.vm.provision "build_ovs", type: "shell", inline: $build_ovs
123 debian.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
124 debian.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
125 debian.vm.provision "install_deb", type: "shell", inline: $install_deb
126 end
53de7528 127 config.vm.define "fedora-23" do |fedora|
2fde4546
TR
128 fedora.vm.box = "fedora/23-cloud-base"
129 fedora.vm.synced_folder ".", "/vagrant", type: "rsync"
3314f01e
AZ
130 fedora.vm.provision "bootstrap", type: "shell", inline: $bootstrap_fedora
131 fedora.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
132 fedora.vm.provision "build_ovs", type: "shell", inline: $build_ovs
133 fedora.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
548f9fe7 134 fedora.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
3314f01e
AZ
135 fedora.vm.provision "install_rpm", type: "shell", inline: $install_rpm
136 end
2fde4546
TR
137 config.vm.define "centos-7" do |centos|
138 centos.vm.box = "centos/7"
888e071e
TLSC
139 centos.vm.synced_folder ".", "/vagrant", type: "rsync"
140 centos.vm.provision "bootstrap", type: "shell", inline: $bootstrap_centos
141 centos.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs
142 centos.vm.provision "build_ovs", type: "shell", inline: $build_ovs
143 centos.vm.provision "test_ovs_kmod", type: "shell", inline: $test_kmod
144 centos.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
145 centos.vm.provision "install_rpm", type: "shell", inline: $install_centos_rpm
146 end
b56b2566 147end