blob: df32a75e774048ae522745639f935ad036bc73d7 [file] [log] [blame]
hwchiu26396862017-12-27 22:10:34 +08001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4Vagrant.configure("2") do |config|
Charles Chan0e1038d2018-08-04 23:10:27 -07005 config.vm.box = "bento/ubuntu-18.04"
6 config.vm.box_version = "201807.12.0"
7 config.vm.hostname = 'trellis-dev'
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
Charles Chan0e1038d2018-08-04 23:10:27 -070014 sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install gawk texinfo python-pip build-essential iptables automake autoconf libtool mininet isc-dhcp-server wireshark
hwchiu26396862017-12-27 22:10:34 +080015 sudo pip install -U pip
16 sudo pip install ipaddress
17 git clone -b onos-1.11 https://gerrit.opencord.org/quagga
18 cd quagga
19 ./bootstrap.sh
20 ./configure --enable-fpm --sbindir=/usr/lib/quagga enable_user=root enable_group=root
21 make
22 sudo make install
23 cd ..
24
25 sudo /etc/init.d/apparmor stop
26 sudo ln -s /etc/apparmor.d/usr.sbin.dhcpd /etc/apparmor.d/disable/
27 sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.dhcpd
28 sudo sed -i '30i /var/lib/dhcp{,3}/dhcpclient* lrw,' /etc/apparmor.d/sbin.dhclient
29 sudo /etc/init.d/apparmor start
30
31 git clone https://gerrit.onosproject.org/routing
32
33 sudo ldconfig
Andrea Campanella6adf0022018-06-19 16:24:17 +020034
Charles Chan0e1038d2018-08-04 23:10:27 -070035 sudo ovs-vsctl set Open_vSwitch . other_config:vlan-limit=2
Andrea Campanella6adf0022018-06-19 16:24:17 +020036 SHELL
hwchiu26396862017-12-27 22:10:34 +080037
38 config.vm.provider :virtualbox do |v|
39 v.customize ["modifyvm", :id, "--cpus", 2]
40 # enable this when you want to have more memory
41 # v.customize ["modifyvm", :id, "--memory", 4096]
42 v.customize ['modifyvm', :id, '--nicpromisc1', 'allow-all']
43 end
44end