blob: fbcf9019977cde020ca0b5ea8b7e5ab843e54d13 [file] [log] [blame]
Jonathan Hart6ccaec82015-04-01 14:43:40 -07001#!/bin/bash
2
3export USER=sdnip
4
5echo "Creating SDN-IP tutorial"
6
7#--------------- Copy SDNIP code to home -----
8
9cp -r /home/mininet/onos/tools/tutorials/sdnip /home/sdnip/
Jonathan Hart6b051d92015-04-01 17:04:35 -070010cp -r /home/sdnip/sdnip/configs /home/sdnip/
Jonathan Hartd2a52622015-04-01 16:46:18 -070011sudo -u mininet sh -c 'cp -r /home/sdnip/sdnip/configs/addresses.json /home/mininet/onos/tools/package/config'
12sudo -u mininet sh -c 'cp -r /home/sdnip/sdnip/configs/sdnip.json /home/mininet/onos/tools/package/config'
Jonathan Hart6ccaec82015-04-01 14:43:40 -070013
Jonathan Hartf16c1222015-04-01 19:38:49 -070014
15#--------------- Add iptables rule for BGP-ONOS communication -----
16
17echo \"sudo iptables -A PREROUTING -t nat -i root-eth0 -p tcp --dport 2000 -j DNAT --to 10.0.3.11:2000 \" >> /home/sdnip/.bashrc"
18
Jonathan Hart6ccaec82015-04-01 14:43:40 -070019DESKTOP=/home/${USER}/Desktop
20
21mkdir -p ${DESKTOP}
22
23cat > ${DESKTOP}/ONOS << EOF
24[Desktop Entry]
25Encoding=UTF-8
26Type=Application
27Name=ONOS
28Name[en_US]=ONOS
29Icon=konsole
30Exec=/usr/bin/lxterminal -e '/home/mininet/apache-karaf-3.0.2/bin/client -u karaf -h 10.0.3.11'
31Comment[en_US]=
32EOF
33
34cat > "${DESKTOP}/SDN-IP Mininet" << EOF
35[Desktop Entry]
36Encoding=UTF-8
37Type=Application
38Name=SDN-IP Mininet
39Name[en_US]=SDN-IP Mininet
40Icon=konsole
41Exec=/usr/bin/lxterminal -e 'sudo mn --custom /home/sdnip/sdnip/tutorial.py --topo sdnip --controller remote,10.0.3.11 --nolistenport'
42Comment[en_US]=
43EOF
44
45cat > ${DESKTOP}/Tutorial << EOF
46[Desktop Entry]
47Encoding=UTF-8
48Type=Application
49Name=SDN-IP Tutorial
50Name[en_US]=SDN-IP Tutorial
51Icon=internet-web-browser
52Exec=/usr/bin/chromium-browser https://wiki.onosproject.org/display/ONOS/SDN-IP+Tutorial
53Comment[en_US]=
54EOF
55
56cat > ${DESKTOP}/GUI << EOF
57[Desktop Entry]
58Encoding=UTF-8
59Type=Application
60Name=ONOS GUI
61Name[en_US]=ONOS GUI
62Icon=internet-web-browser
63Exec=/usr/bin/chromium-browser http://10.0.3.11:8181/onos/ui/index.html#topo
64Comment[en_US]=
65EOF
66
67cat > ${DESKTOP}/Wireshark << EOF
68[Desktop Entry]
69Encoding=UTF-8
70Type=Application
71Name=Wireshark
72Name[en_US]=Wireshark
73Icon=wireshark
74Exec=/usr/bin/wireshark
75Comment[en_US]=
76EOF
77
78cat > ${DESKTOP}/Reset << EOF
79[Desktop Entry]
80Encoding=UTF-8
81Type=Application
82Name=Reset
83Name[en_US]=Reset
84Icon=konsole
85Exec=/usr/bin/lxterminal -t 'Resetting; please wait' -e '/bin/bash -c /home/mininet/reset-to-1.sh'
86Comment[en_US]=
87EOF