blob: 0c5a6afec6eafc86339370ce11cc54b5d533f012 [file] [log] [blame]
Jonathan Hart59c036f2015-04-01 16:33:33 -07001#!/bin/bash
2
3export USER=optical
4export USER_HOME=/home/${USER}
5
6echo "Creating optical tutorial"
7
8DESKTOP=${USER_HOME}/Desktop
9
10mkdir -p ${DESKTOP}
11
12cat > ${DESKTOP}/ONOS << EOF
13[Desktop Entry]
14Encoding=UTF-8
15Type=Application
16Name=ONOS
17Name[en_US]=ONOS
18Icon=konsole
19Exec=/usr/bin/lxterminal -t 'ONOS' -e '/home/mininet/apache-karaf-3.0.2/bin/client -u karaf -h 10.0.3.11'
20Comment[en_US]=
21EOF
22
23cat > "${DESKTOP}/Mininet Small" << EOF
24[Desktop Entry]
25Encoding=UTF-8
26Type=Application
27Name=Mininet Small
28Name[en_US]=Mininet Small
29Icon=konsole
30Exec=/usr/bin/lxterminal -t 'Mininet Small Topology' -e 'sudo -E python /home/mininet/onos/tools/test/topos/opticalTest.py'
31Comment[en_US]=
32EOF
33
34cat > "${DESKTOP}/Mininet Large" << EOF
35[Desktop Entry]
36Encoding=UTF-8
37Type=Application
38Name=Mininet Large
39Name[en_US]=Mininet Large
40Icon=konsole
41Exec=/usr/bin/lxterminal -t 'Mininet Large Topology' -e 'sudo -E python /home/mininet/onos/tools/test/topos/opticalTestBig.py'
42Comment[en_US]=
43EOF
44
45cat > "${DESKTOP}/LINC-OE" << EOF
46[Desktop Entry]
47Encoding=UTF-8
48Type=Application
49Name=LINC-OE
50Name[en_US]=LINC-OE
51Icon=konsole
52Exec=/usr/bin/lxterminal -t 'LINC-OE' -e 'sudo linc-oe/rel/linc/bin/linc attach'
53Comment[en_US]=
54EOF
55
56cat > ${DESKTOP}/Tutorial << EOF
57[Desktop Entry]
58Encoding=UTF-8
59Type=Application
60Name=Tutorial
61Name[en_US]=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://10.0.3.11: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
89
90cat > ${DESKTOP}/Reset-ONOS << EOF
91[Desktop Entry]
92Encoding=UTF-8
93Type=Application
94Name=Reset ONOS
95Name[en_US]=Reset ONOS
96Icon=konsole
97Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e '/bin/bash -c /home/mininet/reset-to-1.sh'
98Comment[en_US]=
99EOF
100
101
102cat > ${DESKTOP}/Reset << EOF
103[Desktop Entry]
104Encoding=UTF-8
105Type=Application
106Name=Reset
107Name[en_US]=Reset
108Icon=konsole
109Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e 'sudo mn -c'
110Comment[en_US]=
111EOF
112
113# -------------- Setup LINC & dependencies ---------------
114git clone https://github.com/FlowForwarding/LINC-config-generator.git
115cd ~/LINC-config-generator
116git checkout oe-0.4
117make
118cd
119
120git clone https://github.com/FlowForwarding/LINC-Switch.git linc-oe
121cd linc-oe
122sed -i s/3000/300000/ rel/files/vm.args
123cp rel/files/sys.config.orig rel/files/sys.config
124make rel
125cd