Jonathan Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | export USER=optical |
| 4 | export USER_HOME=/home/${USER} |
| 5 | |
| 6 | echo "Creating optical tutorial" |
| 7 | |
| 8 | DESKTOP=${USER_HOME}/Desktop |
| 9 | |
| 10 | mkdir -p ${DESKTOP} |
| 11 | |
| 12 | cat > ${DESKTOP}/ONOS << EOF |
| 13 | [Desktop Entry] |
| 14 | Encoding=UTF-8 |
| 15 | Type=Application |
| 16 | Name=ONOS |
| 17 | Name[en_US]=ONOS |
| 18 | Icon=konsole |
| 19 | Exec=/usr/bin/lxterminal -t 'ONOS' -e '/home/mininet/apache-karaf-3.0.2/bin/client -u karaf -h 10.0.3.11' |
| 20 | Comment[en_US]= |
| 21 | EOF |
| 22 | |
Jonathan Hart | f16c122 | 2015-04-01 19:38:49 -0700 | [diff] [blame] | 23 | |
| 24 | |
Jonathan Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 25 | cat > "${DESKTOP}/Mininet Small" << EOF |
| 26 | [Desktop Entry] |
| 27 | Encoding=UTF-8 |
| 28 | Type=Application |
| 29 | Name=Mininet Small |
| 30 | Name[en_US]=Mininet Small |
| 31 | Icon=konsole |
Jonathan Hart | f16c122 | 2015-04-01 19:38:49 -0700 | [diff] [blame] | 32 | Exec=/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 Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 33 | Comment[en_US]= |
| 34 | EOF |
| 35 | |
| 36 | cat > "${DESKTOP}/Mininet Large" << EOF |
| 37 | [Desktop Entry] |
| 38 | Encoding=UTF-8 |
| 39 | Type=Application |
| 40 | Name=Mininet Large |
| 41 | Name[en_US]=Mininet Large |
| 42 | Icon=konsole |
Jonathan Hart | f16c122 | 2015-04-01 19:38:49 -0700 | [diff] [blame] | 43 | Exec=/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 Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 44 | Comment[en_US]= |
| 45 | EOF |
| 46 | |
| 47 | cat > "${DESKTOP}/LINC-OE" << EOF |
| 48 | [Desktop Entry] |
| 49 | Encoding=UTF-8 |
| 50 | Type=Application |
| 51 | Name=LINC-OE |
| 52 | Name[en_US]=LINC-OE |
| 53 | Icon=konsole |
| 54 | Exec=/usr/bin/lxterminal -t 'LINC-OE' -e 'sudo linc-oe/rel/linc/bin/linc attach' |
| 55 | Comment[en_US]= |
| 56 | EOF |
| 57 | |
| 58 | cat > ${DESKTOP}/Tutorial << EOF |
| 59 | [Desktop Entry] |
| 60 | Encoding=UTF-8 |
| 61 | Type=Application |
| 62 | Name=Tutorial |
| 63 | Name[en_US]=Tutorial |
| 64 | Icon=internet-web-browser |
| 65 | Exec=/usr/bin/chromium-browser https://wiki.onosproject.org/display/ONOS/Packet+Optical+Tutorial |
| 66 | Comment[en_US]= |
| 67 | EOF |
| 68 | |
| 69 | cat > ${DESKTOP}/GUI << EOF |
| 70 | [Desktop Entry] |
| 71 | Encoding=UTF-8 |
| 72 | Type=Application |
| 73 | Name=ONOS GUI |
| 74 | Name[en_US]=ONOS GUI |
| 75 | Icon=internet-web-browser |
| 76 | Exec=/usr/bin/chromium-browser http://10.0.3.11:8181/onos/ui/index.html#topo |
| 77 | Comment[en_US]= |
| 78 | EOF |
| 79 | |
| 80 | cat > ${DESKTOP}/Wireshark << EOF |
| 81 | [Desktop Entry] |
| 82 | Encoding=UTF-8 |
| 83 | Type=Application |
| 84 | Name=Wireshark |
| 85 | Name[en_US]=Wireshark |
| 86 | Icon=wireshark |
| 87 | Exec=/usr/bin/wireshark |
| 88 | Comment[en_US]= |
| 89 | EOF |
| 90 | |
| 91 | |
| 92 | cat > ${DESKTOP}/Reset-ONOS << EOF |
| 93 | [Desktop Entry] |
| 94 | Encoding=UTF-8 |
| 95 | Type=Application |
| 96 | Name=Reset ONOS |
| 97 | Name[en_US]=Reset ONOS |
| 98 | Icon=konsole |
| 99 | Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e '/bin/bash -c /home/mininet/reset-to-1.sh' |
| 100 | Comment[en_US]= |
| 101 | EOF |
| 102 | |
| 103 | |
| 104 | cat > ${DESKTOP}/Reset << EOF |
| 105 | [Desktop Entry] |
| 106 | Encoding=UTF-8 |
| 107 | Type=Application |
| 108 | Name=Reset |
| 109 | Name[en_US]=Reset |
| 110 | Icon=konsole |
| 111 | Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e 'sudo mn -c' |
| 112 | Comment[en_US]= |
| 113 | EOF |
| 114 | |
Jonathan Hart | f16c122 | 2015-04-01 19:38:49 -0700 | [diff] [blame] | 115 | ln -s /home/mininet/onos onos |
| 116 | ln -s /home/mininet/.m2 .m2 |
| 117 | |
Jonathan Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 118 | # -------------- Setup LINC & dependencies --------------- |
| 119 | git clone https://github.com/FlowForwarding/LINC-config-generator.git |
| 120 | cd ~/LINC-config-generator |
| 121 | git checkout oe-0.4 |
| 122 | make |
| 123 | cd |
| 124 | |
| 125 | git clone https://github.com/FlowForwarding/LINC-Switch.git linc-oe |
| 126 | cd linc-oe |
| 127 | sed -i s/3000/300000/ rel/files/vm.args |
| 128 | cp rel/files/sys.config.orig rel/files/sys.config |
| 129 | make rel |
| 130 | cd |