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