onos/tools/dev/p4vm/user-bootstrap.sh
Andrea Campanella 4f9085e2d7 Adding an STC scenario for fabric.p4
Change-Id: I3457ab67c2c97eab73623500ba3f6a75b9ed33a3
2018-06-04 10:24:55 +00:00

30 lines
673 B
Bash
Executable File

#!/bin/bash
set -xe
cp /etc/skel/.bashrc ~/
cp /etc/skel/.profile ~/
cp /etc/skel/.bash_logout ~/
# ONOS
git clone https://github.com/opennetworkinglab/onos.git
tee -a ~/.bashrc <<EOF
# ONOS
export ONOS_ROOT=~/onos
source ~/onos/tools/dev/bash_profile
source ~/onos/tools/dev/p4vm/bm-commands.sh
EOF
# Build and install P4 tools
bash /vagrant/install-p4-tools.sh
# Mininet
git clone git://github.com/mininet/mininet ~/mininet
sudo ~/mininet/util/install.sh -nv
# Trellis routing repo
git clone https://github.com/opennetworkinglab/routing.git
# Set Python path for bmv2 in fabric.p4
echo 'export PYTHONPATH=$PYTHONPATH:~/onos/tools/dev/mininet/bmv2.py' >> ~/.bashrc