blob: a46672ec900410e9d08637e5a52089566ebccf6c [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'
Andrea Campanella0a219562018-07-04 14:51:35 +02008 config.ssh.forward_agent = true
9 config.ssh.forward_x11 = true
hwchiu26396862017-12-27 22:10:34 +080010
11 config.vm.provision "shell", privileged: false, inline: <<-SHELL
12 set -e -x -u
13 sudo apt-get update
14 sudo apt-get install -y gawk texinfo python-pip build-essential iptables automake autoconf libtool mininet isc-dhcp-server
Andrea Campanella0a219562018-07-04 14:51:35 +020015 sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install wireshark
hwchiu26396862017-12-27 22:10:34 +080016 sudo pip install -U pip
17 sudo pip install ipaddress
18 git clone -b onos-1.11 https://gerrit.opencord.org/quagga
19 cd quagga
20 ./bootstrap.sh
21 ./configure --enable-fpm --sbindir=/usr/lib/quagga enable_user=root enable_group=root
22 make
23 sudo make install
24 cd ..
25
26 sudo /etc/init.d/apparmor stop
27 sudo ln -s /etc/apparmor.d/usr.sbin.dhcpd /etc/apparmor.d/disable/
28 sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.dhcpd
29 sudo sed -i '30i /var/lib/dhcp{,3}/dhcpclient* lrw,' /etc/apparmor.d/sbin.dhclient
30 sudo /etc/init.d/apparmor start
31
32 git clone https://gerrit.onosproject.org/routing
33
34 sudo ldconfig
35 SHELL
36
37 config.vm.provider :virtualbox do |v|
38 v.customize ["modifyvm", :id, "--cpus", 2]
39 # enable this when you want to have more memory
40 # v.customize ["modifyvm", :id, "--memory", 4096]
41 v.customize ['modifyvm', :id, '--nicpromisc1', 'allow-all']
42 end
43end