blob: 5cc2a467a026bced7e5da03ec2cf0ef9c3a9c9e9 [file] [log] [blame]
alshabibbca6bf22014-11-15 16:38:45 -08001#!/bin/bash
2# vm-setup.sh
3#
4# This script installs ONOS dependencies and installs a desktop environment on a Miniet VM.
5
6
7USER=tutorial1
8USER_HOME=/home/${USER}
9
alshabibbca6bf22014-11-15 16:38:45 -080010export ONOS_USER=$USER
11
12export ONOS_ROOT=~/onos-next
13source $ONOS_ROOT/tools/dev/bash_profile
alshabib343d1602014-11-18 14:49:52 -080014sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
15sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
alshabibfbbb90a2014-11-18 14:52:54 -080016java -version
17javac -version
alshabib36510ef2014-11-18 15:11:15 -080018echo $JAVA_HOME
alshabiba984a3a2014-11-18 15:14:42 -080019export JAVA_HOME=""
alshabib36510ef2014-11-18 15:11:15 -080020cd $ONOS_ROOT && mvn clean install && cd -
alshabibbca6bf22014-11-15 16:38:45 -080021
22sed -i -e s/sdn/$USER/ onos-next/tools/package/debian/onos.conf
23
24cat << EOF >> onos-next/tools/test/cells/tutorial
25export ONOS_NIC=127.0.0.*
26export OC1="127.0.0.1"
27export OCI="${OC1}"
alshabib384af732014-11-20 14:31:20 -080028export ONOS_FEATURES="webconsole,onos-rest,onos-api,onos-core-trivial,onos-cli,onos-openflow"
alshabibbca6bf22014-11-15 16:38:45 -080029EOF
30
alshabib343d1602014-11-18 14:49:52 -080031cell tutorial
32
alshabibbca6bf22014-11-15 16:38:45 -080033onos-package
alshabibff061ee2014-11-17 15:57:10 -080034onos-install -f $OC1
alshabibbca6bf22014-11-15 16:38:45 -080035
alshabibcf82ac72014-12-01 09:42:32 -080036sudo echo 'export ONOS_OPT="clean debug"' > /opt/onos/options
alshabib63899492014-12-01 14:53:10 -080037
alshabibefbdd932014-12-01 17:05:00 -080038sudo su -c 'echo GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" >> /etc/default/grub'
39sudo su -c update-grub