blob: c58907d92a098c743147304072e6cb5c64fcef77 [file] [log] [blame]
hwchiu26396862017-12-27 22:10:34 +08001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4Vagrant.configure("2") do |config|
5 config.vm.box = "ubuntu/xenial64"
6 config.vm.box_version = "20171221.0.0"
7 config.vm.hostname = 'trellis-example'
8
9 config.vm.provision "shell", privileged: false, inline: <<-SHELL
10 set -e -x -u
11 sudo apt-get update
12 sudo apt-get install -y gawk texinfo python-pip build-essential iptables automake autoconf libtool mininet isc-dhcp-server
13 sudo pip install -U pip
14 sudo pip install ipaddress
15 git clone -b onos-1.11 https://gerrit.opencord.org/quagga
16 cd quagga
17 ./bootstrap.sh
18 ./configure --enable-fpm --sbindir=/usr/lib/quagga enable_user=root enable_group=root
19 make
20 sudo make install
21 cd ..
22
23 sudo /etc/init.d/apparmor stop
24 sudo ln -s /etc/apparmor.d/usr.sbin.dhcpd /etc/apparmor.d/disable/
25 sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.dhcpd
26 sudo sed -i '30i /var/lib/dhcp{,3}/dhcpclient* lrw,' /etc/apparmor.d/sbin.dhclient
27 sudo /etc/init.d/apparmor start
28
29 git clone https://gerrit.onosproject.org/routing
30
31 sudo ldconfig
32 SHELL
33
34 config.vm.provider :virtualbox do |v|
35 v.customize ["modifyvm", :id, "--cpus", 2]
36 # enable this when you want to have more memory
37 # v.customize ["modifyvm", :id, "--memory", 4096]
38 v.customize ['modifyvm', :id, '--nicpromisc1', 'allow-all']
39 end
40end