hwchiu | 2639686 | 2017-12-27 22:10:34 +0800 | [diff] [blame] | 1 | # -*- mode: ruby -*- |
| 2 | # vi: set ft=ruby : |
| 3 | |
| 4 | Vagrant.configure("2") do |config| |
Charles Chan | 0e1038d | 2018-08-04 23:10:27 -0700 | [diff] [blame^] | 5 | config.vm.box = "bento/ubuntu-18.04" |
| 6 | config.vm.box_version = "201807.12.0" |
| 7 | config.vm.hostname = 'trellis-dev' |
Andrea Campanella | 0a21956 | 2018-07-04 14:51:35 +0200 | [diff] [blame] | 8 | config.ssh.forward_agent = true |
| 9 | config.ssh.forward_x11 = true |
hwchiu | 2639686 | 2017-12-27 22:10:34 +0800 | [diff] [blame] | 10 | |
| 11 | config.vm.provision "shell", privileged: false, inline: <<-SHELL |
| 12 | set -e -x -u |
| 13 | sudo apt-get update |
Charles Chan | 0e1038d | 2018-08-04 23:10:27 -0700 | [diff] [blame^] | 14 | sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install gawk texinfo python-pip build-essential iptables automake autoconf libtool mininet isc-dhcp-server wireshark |
hwchiu | 2639686 | 2017-12-27 22:10:34 +0800 | [diff] [blame] | 15 | 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 Campanella | 6adf002 | 2018-06-19 16:24:17 +0200 | [diff] [blame] | 34 | |
Charles Chan | 0e1038d | 2018-08-04 23:10:27 -0700 | [diff] [blame^] | 35 | sudo ovs-vsctl set Open_vSwitch . other_config:vlan-limit=2 |
Andrea Campanella | 6adf002 | 2018-06-19 16:24:17 +0200 | [diff] [blame] | 36 | SHELL |
hwchiu | 2639686 | 2017-12-27 22:10:34 +0800 | [diff] [blame] | 37 | |
| 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 |
| 44 | end |