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