blob: a3af30b3183a59950752d200da3cabd11a853932 [file] [log] [blame]
Carmelo Casconed6615072017-12-15 00:53:43 -08001#!/bin/bash
2set -xe
3
4cp /etc/skel/.bashrc ~/
5cp /etc/skel/.profile ~/
6cp /etc/skel/.bash_logout ~/
7
8# ONOS
9git clone https://github.com/opennetworkinglab/onos.git
Carmelo Casconec5569c22018-04-18 10:09:15 +090010tee -a ~/.bashrc <<EOF
Carmelo Casconeb7e618d2018-01-12 18:31:33 -080011
12# ONOS
13export ONOS_ROOT=~/onos
14source ~/onos/tools/dev/bash_profile
Carmelo Casconef11513d2018-01-16 00:31:14 -080015source ~/onos/tools/dev/p4vm/bm-commands.sh
Carmelo Casconeb7e618d2018-01-12 18:31:33 -080016EOF
Carmelo Casconed6615072017-12-15 00:53:43 -080017
18# Build and install P4 tools
Carmelo Casconeb7e618d2018-01-12 18:31:33 -080019bash /vagrant/install-p4-tools.sh
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020020# We'll delete bmv2 sources later...
21cp ~/p4tools/bmv2/tools/veth_setup.sh ~/veth_setup.sh
22cp ~/p4tools/bmv2/tools/veth_teardown.sh ~/veth_teardown.sh
Carmelo Casconed6615072017-12-15 00:53:43 -080023
24# Mininet
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020025git clone git://github.com/mininet/mininet
Carmelo Cascone57defd32018-05-11 14:34:01 -070026sudo ~/mininet/util/install.sh -nv
Andrea Campanella4f9085e2018-05-29 12:04:16 +020027
Charles Chan84431b92018-08-16 20:30:09 -070028# Trellis - checkout routing repo
Andrea Campanella4f9085e2018-05-29 12:04:16 +020029git clone https://github.com/opennetworkinglab/routing.git
30
Charles Chan84431b92018-08-16 20:30:09 -070031# Trellis - install Quagga
32git clone -b onos-1.11 https://gerrit.opencord.org/quagga
33cd quagga
34./bootstrap.sh
35./configure --enable-fpm --sbindir=/usr/lib/quagga enable_user=root enable_group=root
36make
37sudo make install
38cd ..
39sudo ldconfig
40
41# Trellis - modify apparmor for the DHCP to run properly
42sudo /etc/init.d/apparmor stop
43sudo ln -s /etc/apparmor.d/usr.sbin.dhcpd /etc/apparmor.d/disable/
44sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.dhcpd
45sudo sed -i '30i /var/lib/dhcp{,3}/dhcpclient* lrw,' /etc/apparmor.d/sbin.dhclient
46sudo /etc/init.d/apparmor start
47
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020048# fabric-p4test
49git clone https://github.com/opennetworkinglab/fabric-p4test.git
50
Andrea Campanella4f9085e2018-05-29 12:04:16 +020051# Set Python path for bmv2 in fabric.p4
52echo 'export PYTHONPATH=$PYTHONPATH:~/onos/tools/dev/mininet/bmv2.py' >> ~/.bashrc
Carmelo Cascone95e5afd2018-07-17 14:45:23 +020053
54# FIXME: for some reason protobuf python bindings are not properly installed
55cd ~/p4tools/protobuf/python
56sudo pip install .