| #!/bin/bash |
| # vm-setup.sh |
| # |
| # This script installs ONOS dependencies and installs a desktop environment on a Miniet VM. |
| |
| |
| USER=tutorial1 |
| USER_HOME=/home/${USER} |
| |
| export ONOS_USER=$USER |
| |
| export ONOS_ROOT=~/onos-next |
| source $ONOS_ROOT/tools/dev/bash_profile |
| sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java |
| sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac |
| java -version |
| javac -version |
| echo $JAVA_HOME |
| export JAVA_HOME="" |
| cd $ONOS_ROOT && mvn clean install && cd - |
| |
| sed -i -e s/sdn/$USER/ onos-next/tools/package/debian/onos.conf |
| |
| cat << EOF >> onos-next/tools/test/cells/tutorial |
| export ONOS_NIC=127.0.0.* |
| export OC1="127.0.0.1" |
| export OCI="${OC1}" |
| export ONOS_FEATURES="webconsole,onos-rest,onos-api,onos-core-trivial,onos-cli,onos-openflow" |
| EOF |
| |
| cell tutorial |
| |
| onos-package |
| onos-install -f $OC1 |
| |