blob: e7c895fd909f0fb88a16895c1c0184d53634bfeb [file] [log] [blame]
Marc De Leenheer5dbd04f2015-01-09 12:51:49 -08001#!/bin/bash
2# vm-setup.sh
3#
4# This script installs ONOS dependencies for packet/optical use case.
5
6
Marc De Leenheer06aae542015-01-09 14:47:41 -08007export CURRENT_USER=optical
Marc De Leenheer5dbd04f2015-01-09 12:51:49 -08008export USER_HOME=/home/${CURRENT_USER}
9
10# -------------- Setup keys -------------------
11
12mkdir -p ~/.ssh
13ssh-keygen -t dsa -P "" -f .ssh/id_dsa
14cp .ssh/id_dsa.pub .ssh/authorized_keys
15
16# -------------- Setup Desktop ---------------
17
18DESKTOP=${USER_HOME}/Desktop
19
20mkdir -p ${DESKTOP}
21
22cat > ${DESKTOP}/ONOS << EOF
23[Desktop Entry]
24Encoding=UTF-8
25Type=Application
26Name=ONOS
27Name[en_US]=ONOS
28Icon=konsole
29Exec=/usr/bin/lxterminal -e '/opt/onos/apache-karaf-3.0.2/bin/client -u karaf'
30Comment[en_US]=
31EOF
32
33# TODO: make large too!
34cat > "${DESKTOP}/Packet-Optical Mininet Small" << EOF
35[Desktop Entry]
36Encoding=UTF-8
37Type=Application
38Name=Packet/Optical Mininet Small
39Name[en_US]=Packet/Optical Mininet Small
40Icon=konsole
41Exec=/usr/bin/lxterminal -e 'sudo /opt/onos/tools/test/topos/opticalTest.py'
42Comment[en_US]=
43EOF
44
45cat > "${DESKTOP}/Packet-Optical Mininet Large" << EOF
46[Desktop Entry]
47Encoding=UTF-8
48Type=Application
49Name=Packet/Optical Mininet Large
50Name[en_US]=Packet/Optical Mininet Large
51Icon=konsole
52Exec=/usr/bin/lxterminal -e 'sudo /opt/onos/tools/test/topos/opticalTestBig.py'
53Comment[en_US]=
54EOF
55
56cat > ${DESKTOP}/Tutorial << EOF
57[Desktop Entry]
58Encoding=UTF-8
59Type=Application
60Name=SDN-IP Tutorial
61Name[en_US]=SDN-IP Tutorial
62Icon=internet-web-browser
63Exec=/usr/bin/chromium-browser https://wiki.onosproject.org/display/ONOS/Packet+Optical+Tutorial
64Comment[en_US]=
65EOF
66
67cat > ${DESKTOP}/GUI << EOF
68[Desktop Entry]
69Encoding=UTF-8
70Type=Application
71Name=ONOS GUI
72Name[en_US]=ONOS GUI
73Icon=internet-web-browser
74Exec=/usr/bin/chromium-browser http://localhost:8181/onos/ui/index.html#topo
75Comment[en_US]=
76EOF
77
78cat > ${DESKTOP}/Wireshark << EOF
79[Desktop Entry]
80Encoding=UTF-8
81Type=Application
82Name=Wireshark
83Name[en_US]=Wireshark
84Icon=wireshark
85Exec=/usr/bin/wireshark
86Comment[en_US]=
87EOF
88
89cat > ${DESKTOP}/Reset << EOF
90[Desktop Entry]
91Encoding=UTF-8
92Type=Application
93Name=Reset
94Name[en_US]=Reset
95Icon=konsole
96Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e 'sudo service onos restart'
97Comment[en_US]=
98EOF
99