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