Jonathan Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | export USER=distributed |
| 4 | export USER_HOME=/home/${USER} |
| 5 | |
| 6 | echo "Creating distributed tutorial" |
| 7 | |
| 8 | IDEA_URL=http://download.jetbrains.com/idea/ideaIC-14.0.2.tar.gz |
| 9 | |
| 10 | cd ~ |
| 11 | |
| 12 | git clone https://github.com/bocon13/onos-byon.git |
| 13 | |
Jonathan Hart | 5cf990e | 2015-04-02 14:47:36 -0700 | [diff] [blame] | 14 | # Pull ONOS code into local repo to compile against |
| 15 | mkdir -p .m2/repository/org |
| 16 | cp -r /home/mininet/.m2/repository/org/onosproject .m2/repository/org |
| 17 | |
Jonathan Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 18 | sed -i -e 's/open/xdg-open/' ~/onos/tools/test/bin/onos-gui |
| 19 | |
Jonathan Hart | 5cf990e | 2015-04-02 14:47:36 -0700 | [diff] [blame] | 20 | echo "export KARAF_TAR=/home/mininet/apache-karaf-3.0.2.tar.gz" >> ~/.bashrc |
| 21 | echo "cell 3node > /dev/null" >> ~/.bashrc |
| 22 | |
| 23 | |
Jonathan Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 24 | cat > ~/startmn.sh << EOF |
| 25 | #!/bin/bash |
| 26 | sudo python ~/onos/tools/test/topos/sol.py \$OC1 \$OC2 \$OC3 |
| 27 | EOF |
| 28 | |
| 29 | chmod +x ~/startmn.sh |
| 30 | |
| 31 | DESKTOP=${USER_HOME}/Desktop |
| 32 | |
| 33 | mkdir -p ${DESKTOP} |
| 34 | |
| 35 | cat > ${DESKTOP}/IntelliJ << EOF |
| 36 | [Desktop Entry] |
| 37 | Encoding=UTF-8 |
| 38 | Type=Application |
| 39 | Name=IntelliJ |
| 40 | Name[en_US]=IntelliJ |
| 41 | Icon=/home/distributed/Applications/idea/bin/idea.png |
| 42 | Exec=/home/distributed/Applications/idea/bin/idea.sh |
| 43 | Comment[en_US]= |
| 44 | EOF |
| 45 | |
| 46 | cat > ${DESKTOP}/Tutorial << EOF |
| 47 | [Desktop Entry] |
| 48 | Encoding=UTF-8 |
| 49 | Type=Application |
| 50 | Name=ONOS Tutorial |
| 51 | Name[en_US]=ONOS Tutorial |
| 52 | Icon=internet-web-browser |
| 53 | Exec=/usr/bin/chromium-browser https://wiki.onosproject.org/display/ONOS/Distributed+ONOS+Tutorial |
| 54 | Comment[en_US]= |
| 55 | EOF |
| 56 | |
| 57 | |
| 58 | cat > ${DESKTOP}/Wireshark << EOF |
| 59 | [Desktop Entry] |
| 60 | Encoding=UTF-8 |
| 61 | Type=Application |
| 62 | Name=Wireshark |
| 63 | Name[en_US]=Wireshark |
| 64 | Icon=wireshark |
| 65 | Exec=/usr/bin/wireshark |
| 66 | Comment[en_US]= |
| 67 | EOF |
| 68 | |
| 69 | cat > ${DESKTOP}/Terminal << EOF |
| 70 | [Desktop Entry] |
| 71 | Encoding=UTF-8 |
| 72 | Name=LXTerminal |
| 73 | TryExec=lxterminal |
| 74 | Exec=lxterminal |
| 75 | Icon=lxterminal |
| 76 | Type=Application |
| 77 | Categories=GTK;Utility;TerminalEmulator; |
| 78 | EOF |
| 79 | |
Jonathan Hart | 5cf990e | 2015-04-02 14:47:36 -0700 | [diff] [blame] | 80 | cat > ${DESKTOP}/Reset << EOF |
| 81 | [Desktop Entry] |
| 82 | Encoding=UTF-8 |
| 83 | Type=Application |
| 84 | Name=Reset |
| 85 | Name[en_US]=Reset |
| 86 | Icon=konsole |
| 87 | Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e '/bin/bash -c /home/mininet/reset-to-3.sh' |
| 88 | Comment[en_US]= |
| 89 | EOF |
| 90 | |
Jonathan Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 91 | sudo apt-get install -y git-review |
| 92 | |
| 93 | # Install IntelliJ |
| 94 | mkdir ~/Applications |
| 95 | cd ~/Applications |
| 96 | |
| 97 | wget -c -N -O /tmp/idea.tar.gz ${IDEA_URL} |
| 98 | tar xzf /tmp/idea.tar.gz |
| 99 | sudo mv idea-IC-139.659.2 idea |
| 100 | |
| 101 | cd - |