blob: c4c87fb90327aa48b146efb066f5b19b3e7625cf [file] [log] [blame]
Jonathan Hart7b6cfef2015-03-27 10:09:38 -07001#!/bin/bash
2# onos-setup-lxc.sh
3#
4# This script sets up the VM ready to run ONOS and tutorials, including installing an LXC cluster
5# for ONOS to run in.
6
7# -------------- Install ONOS ----------------
8
9USER=mininet
10USER_HOME=/home/${USER}
11
12echo `whoami`
13
14cd ~
15git clone https://gerrit.onosproject.org/onos
16cd onos && git checkout 1.1.0 && cd -
17
18#echo "export ONOS_ROOT=${USER_HOME}/onos" >> ~/.bashrc
19#echo ". ~/onos/tools/dev/bash_profile" >> ~/.bashrc
20
21export ONOS_ROOT=${USER_HOME}/onos
22. ~/onos/tools/dev/bash_profile
23
24echo $ONOS_ROOT
25
26echo $JAVA_HOME
27export JAVA_HOME=""
28cd $ONOS_ROOT && mvn clean install && mvn dependency:go-offline && cd -
29
30cat << EOF >> onos/tools/test/cells/tutorial
31export ONOS_NIC=10.0.3.*
32export OC1="10.0.3.11"
33export OC1="10.0.3.12"
34export OC1="10.0.3.13"
35export OCI="${OC1}"
36export ONOS_FEATURES="webconsole,onos-rest,onos-gui,onos-api,onos-core,onos-cli,onos-openflow"
37export ONOS_USER="sdn"
38EOF
39
40cell tutorial
41
42onos-package
43onos-group install -f
44onos-wait-for-start $OC1
45onos-wait-for-start $OC2
46onos-wait-for-start $OC3
47
48sleep 20
49onos 1 "nodes"