blob: 7887d153a43a56ba39a0d060d2dac8fee57bce26 [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
Jonathan Hartf16c1222015-04-01 19:38:49 -070023
24
Jonathan Hart59c036f2015-04-01 16:33:33 -070025cat > "${DESKTOP}/Mininet Small" << EOF
26[Desktop Entry]
27Encoding=UTF-8
28Type=Application
29Name=Mininet Small
30Name[en_US]=Mininet Small
31Icon=konsole
Jonathan Hartf16c1222015-04-01 19:38:49 -070032Exec=/usr/bin/lxterminal -t 'Mininet Small Topology' -e '/bin/bash -c "export ONOS_ROOT=~/onos ; sudo -E python /home/mininet/onos/tools/test/topos/opticalTest.py 10.0.3.11"'
Jonathan Hart59c036f2015-04-01 16:33:33 -070033Comment[en_US]=
34EOF
35
36cat > "${DESKTOP}/Mininet Large" << EOF
37[Desktop Entry]
38Encoding=UTF-8
39Type=Application
40Name=Mininet Large
41Name[en_US]=Mininet Large
42Icon=konsole
Jonathan Hartf16c1222015-04-01 19:38:49 -070043Exec=/usr/bin/lxterminal -t 'Mininet Large Topology' -e '/bin/bash -c "export ONOS_ROOT=~/onos ; sudo -E python /home/mininet/onos/tools/test/topos/opticalTestBig.py 10.0.3.11"'
Jonathan Hart59c036f2015-04-01 16:33:33 -070044Comment[en_US]=
45EOF
46
47cat > "${DESKTOP}/LINC-OE" << EOF
48[Desktop Entry]
49Encoding=UTF-8
50Type=Application
51Name=LINC-OE
52Name[en_US]=LINC-OE
53Icon=konsole
54Exec=/usr/bin/lxterminal -t 'LINC-OE' -e 'sudo linc-oe/rel/linc/bin/linc attach'
55Comment[en_US]=
56EOF
57
58cat > ${DESKTOP}/Tutorial << EOF
59[Desktop Entry]
60Encoding=UTF-8
61Type=Application
62Name=Tutorial
63Name[en_US]=Tutorial
64Icon=internet-web-browser
65Exec=/usr/bin/chromium-browser https://wiki.onosproject.org/display/ONOS/Packet+Optical+Tutorial
66Comment[en_US]=
67EOF
68
69cat > ${DESKTOP}/GUI << EOF
70[Desktop Entry]
71Encoding=UTF-8
72Type=Application
73Name=ONOS GUI
74Name[en_US]=ONOS GUI
75Icon=internet-web-browser
76Exec=/usr/bin/chromium-browser http://10.0.3.11:8181/onos/ui/index.html#topo
77Comment[en_US]=
78EOF
79
80cat > ${DESKTOP}/Wireshark << EOF
81[Desktop Entry]
82Encoding=UTF-8
83Type=Application
84Name=Wireshark
85Name[en_US]=Wireshark
86Icon=wireshark
87Exec=/usr/bin/wireshark
88Comment[en_US]=
89EOF
90
91
92cat > ${DESKTOP}/Reset-ONOS << EOF
93[Desktop Entry]
94Encoding=UTF-8
95Type=Application
96Name=Reset ONOS
97Name[en_US]=Reset ONOS
98Icon=konsole
99Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e '/bin/bash -c /home/mininet/reset-to-1.sh'
100Comment[en_US]=
101EOF
102
103
104cat > ${DESKTOP}/Reset << EOF
105[Desktop Entry]
106Encoding=UTF-8
107Type=Application
108Name=Reset
109Name[en_US]=Reset
110Icon=konsole
111Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e 'sudo mn -c'
112Comment[en_US]=
113EOF
114
Jonathan Hartf16c1222015-04-01 19:38:49 -0700115ln -s /home/mininet/onos onos
116ln -s /home/mininet/.m2 .m2
117
Jonathan Hart59c036f2015-04-01 16:33:33 -0700118# -------------- Setup LINC & dependencies ---------------
119git clone https://github.com/FlowForwarding/LINC-config-generator.git
120cd ~/LINC-config-generator
121git checkout oe-0.4
122make
123cd
124
125git clone https://github.com/FlowForwarding/LINC-Switch.git linc-oe
126cd linc-oe
127sed -i s/3000/300000/ rel/files/vm.args
128cp rel/files/sys.config.orig rel/files/sys.config
129make rel
130cd