Packet/optical tutorial
Change-Id: I066704381e039ce9f392c2764feb6c451d3702aa
diff --git a/opt-setup.sh b/opt-setup.sh
new file mode 100644
index 0000000..fe6b138
--- /dev/null
+++ b/opt-setup.sh
@@ -0,0 +1,99 @@
+#!/bin/bash
+# vm-setup.sh
+#
+# This script installs ONOS dependencies for packet/optical use case.
+
+
+export CURRENT_USER=opt
+export USER_HOME=/home/${CURRENT_USER}
+
+# -------------- Setup keys -------------------
+
+mkdir -p ~/.ssh
+ssh-keygen -t dsa -P "" -f .ssh/id_dsa
+cp .ssh/id_dsa.pub .ssh/authorized_keys
+
+# -------------- Setup Desktop ---------------
+
+DESKTOP=${USER_HOME}/Desktop
+
+mkdir -p ${DESKTOP}
+
+cat > ${DESKTOP}/ONOS << EOF
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=ONOS
+Name[en_US]=ONOS
+Icon=konsole
+Exec=/usr/bin/lxterminal -e '/opt/onos/apache-karaf-3.0.2/bin/client -u karaf'
+Comment[en_US]=
+EOF
+
+# TODO: make large too!
+cat > "${DESKTOP}/Packet-Optical Mininet Small" << EOF
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=Packet/Optical Mininet Small
+Name[en_US]=Packet/Optical Mininet Small
+Icon=konsole
+Exec=/usr/bin/lxterminal -e 'sudo /opt/onos/tools/test/topos/opticalTest.py'
+Comment[en_US]=
+EOF
+
+cat > "${DESKTOP}/Packet-Optical Mininet Large" << EOF
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=Packet/Optical Mininet Large
+Name[en_US]=Packet/Optical Mininet Large
+Icon=konsole
+Exec=/usr/bin/lxterminal -e 'sudo /opt/onos/tools/test/topos/opticalTestBig.py'
+Comment[en_US]=
+EOF
+
+cat > ${DESKTOP}/Tutorial << EOF
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=SDN-IP Tutorial
+Name[en_US]=SDN-IP Tutorial
+Icon=internet-web-browser
+Exec=/usr/bin/chromium-browser https://wiki.onosproject.org/display/ONOS/Packet+Optical+Tutorial
+Comment[en_US]=
+EOF
+
+cat > ${DESKTOP}/GUI << EOF
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=ONOS GUI
+Name[en_US]=ONOS GUI
+Icon=internet-web-browser
+Exec=/usr/bin/chromium-browser http://localhost:8181/onos/ui/index.html#topo
+Comment[en_US]=
+EOF
+
+cat > ${DESKTOP}/Wireshark << EOF
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=Wireshark
+Name[en_US]=Wireshark
+Icon=wireshark
+Exec=/usr/bin/wireshark
+Comment[en_US]=
+EOF
+
+cat > ${DESKTOP}/Reset << EOF
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=Reset
+Name[en_US]=Reset
+Icon=konsole
+Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e 'sudo service onos restart'
+Comment[en_US]=
+EOF
+