]> git.proxmox.com Git - ovs.git/blame - Vagrantfile
netdev-dpdk: Remove use of rte_mempool_ops_get_count.
[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 \
40c7b2fc 15 libcap-ng-devel kernel-devel-`uname -r` ethtool python-tftpy
b56b2566 16echo "search extra update built-in" >/etc/depmod.d/search_path.conf
7c127f28
TLSC
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 \
40c7b2fc 27 xdg-utils groff graphviz netcat curl \
7c127f28
TLSC
28 wget python-six ethtool \
29 libcap-ng-dev libssl-dev python-dev openssl \
40c7b2fc 30 python-pyftpdlib python-flake8 python-tftpy \
7c127f28 31 linux-headers-`uname -r`
b56b2566
AZ
32SCRIPT
33
888e071e
TLSC
34$bootstrap_centos = <<SCRIPT
35yum -y update
36yum -y install autoconf automake openssl-devel libtool \
37 python-twisted-core python-zope-interface \
40c7b2fc 38 desktop-file-utils groff graphviz rpmdevtools nc curl \
888e071e 39 wget python-six pyftpdlib checkpolicy selinux-policy-devel \
2fde4546 40 libcap-ng-devel kernel-devel-`uname -r` ethtool net-tools
888e071e
TLSC
41SCRIPT
42
b56b2566 43$configure_ovs = <<SCRIPT
7c127f28
TLSC
44cd /vagrant
45./boot.sh
3d982663 46[ -f Makefile ] && ./configure && make distclean
b56b2566
AZ
47mkdir -p ~/build
48cd ~/build
1a523ec4 49/vagrant/configure --with-linux=/lib/modules/`uname -r`/build --enable-silent-rules
b56b2566
AZ
50SCRIPT
51
52$build_ovs = <<SCRIPT
53cd ~/build
54make
55SCRIPT
56
3314f01e
AZ
57$test_kmod = <<SCRIPT
58cd ~/build
960e99dc 59make check-kmod RECHECK=yes
3314f01e
AZ
60SCRIPT
61
b56b2566
AZ
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
d06c1ff8 68rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
b56b2566 69rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
3314f01e 70rpm -e openvswitch
53de7528 71rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.fc23.x86_64.rpm
3314f01e
AZ
72systemctl enable openvswitch
73systemctl start openvswitch
74systemctl status openvswitch
b56b2566
AZ
75SCRIPT
76
888e071e
TLSC
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
db8dcbaf
LM
83rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
84rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
888e071e
TLSC
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
7c127f28
TLSC
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
548f9fe7
DDP
108$test_ovs_system_userspace = <<SCRIPT
109cd ~/build
960e99dc 110make check-system-userspace RECHECK=yes
548f9fe7
DDP
111SCRIPT
112
b56b2566 113Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
7c127f28
TLSC
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
53de7528 124 config.vm.define "fedora-23" do |fedora|
2fde4546
TR
125 fedora.vm.box = "fedora/23-cloud-base"
126 fedora.vm.synced_folder ".", "/vagrant", type: "rsync"
3314f01e
AZ
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
548f9fe7 131 fedora.vm.provision "test_ovs_system_userspace", type: "shell", inline: $test_ovs_system_userspace
3314f01e
AZ
132 fedora.vm.provision "install_rpm", type: "shell", inline: $install_rpm
133 end
2fde4546
TR
134 config.vm.define "centos-7" do |centos|
135 centos.vm.box = "centos/7"
888e071e
TLSC
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
b56b2566 144end