Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -xe |
| 3 | |
| 4 | cp /etc/skel/.bashrc ~/ |
| 5 | cp /etc/skel/.profile ~/ |
| 6 | cp /etc/skel/.bash_logout ~/ |
| 7 | |
| 8 | # ONOS |
| 9 | git clone https://github.com/opennetworkinglab/onos.git |
Carmelo Cascone | c5569c2 | 2018-04-18 10:09:15 +0900 | [diff] [blame] | 10 | tee -a ~/.bashrc <<EOF |
Carmelo Cascone | b7e618d | 2018-01-12 18:31:33 -0800 | [diff] [blame] | 11 | |
| 12 | # ONOS |
| 13 | export ONOS_ROOT=~/onos |
| 14 | source ~/onos/tools/dev/bash_profile |
Carmelo Cascone | f11513d | 2018-01-16 00:31:14 -0800 | [diff] [blame] | 15 | source ~/onos/tools/dev/p4vm/bm-commands.sh |
Carmelo Cascone | b7e618d | 2018-01-12 18:31:33 -0800 | [diff] [blame] | 16 | EOF |
Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 17 | |
| 18 | # Build and install P4 tools |
Carmelo Cascone | b7e618d | 2018-01-12 18:31:33 -0800 | [diff] [blame] | 19 | bash /vagrant/install-p4-tools.sh |
Carmelo Cascone | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 20 | # We'll delete bmv2 sources later... |
| 21 | cp ~/p4tools/bmv2/tools/veth_setup.sh ~/veth_setup.sh |
| 22 | cp ~/p4tools/bmv2/tools/veth_teardown.sh ~/veth_teardown.sh |
Carmelo Cascone | d661507 | 2017-12-15 00:53:43 -0800 | [diff] [blame] | 23 | |
| 24 | # Mininet |
Carmelo Cascone | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 25 | git clone git://github.com/mininet/mininet |
Carmelo Cascone | 57defd3 | 2018-05-11 14:34:01 -0700 | [diff] [blame] | 26 | sudo ~/mininet/util/install.sh -nv |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 27 | |
Charles Chan | 84431b9 | 2018-08-16 20:30:09 -0700 | [diff] [blame] | 28 | # Trellis - checkout routing repo |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 29 | git clone https://github.com/opennetworkinglab/routing.git |
| 30 | |
Charles Chan | 84431b9 | 2018-08-16 20:30:09 -0700 | [diff] [blame] | 31 | # Trellis - install Quagga |
| 32 | git clone -b onos-1.11 https://gerrit.opencord.org/quagga |
| 33 | cd quagga |
| 34 | ./bootstrap.sh |
| 35 | ./configure --enable-fpm --sbindir=/usr/lib/quagga enable_user=root enable_group=root |
| 36 | make |
| 37 | sudo make install |
| 38 | cd .. |
| 39 | sudo ldconfig |
| 40 | |
| 41 | # Trellis - modify apparmor for the DHCP to run properly |
| 42 | sudo /etc/init.d/apparmor stop |
| 43 | sudo ln -s /etc/apparmor.d/usr.sbin.dhcpd /etc/apparmor.d/disable/ |
| 44 | sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.dhcpd |
| 45 | sudo sed -i '30i /var/lib/dhcp{,3}/dhcpclient* lrw,' /etc/apparmor.d/sbin.dhclient |
| 46 | sudo /etc/init.d/apparmor start |
| 47 | |
Carmelo Cascone | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 48 | # fabric-p4test |
| 49 | git clone https://github.com/opennetworkinglab/fabric-p4test.git |
| 50 | |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 51 | # Set Python path for bmv2 in fabric.p4 |
| 52 | echo 'export PYTHONPATH=$PYTHONPATH:~/onos/tools/dev/mininet/bmv2.py' >> ~/.bashrc |
Carmelo Cascone | 95e5afd | 2018-07-17 14:45:23 +0200 | [diff] [blame] | 53 | |
| 54 | # FIXME: for some reason protobuf python bindings are not properly installed |
| 55 | cd ~/p4tools/protobuf/python |
| 56 | sudo pip install . |