File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,10 +11,12 @@ Feature
1111
1212Build OpenNet on your own - Use install.sh
1313------------------------------------------
14- Support Ubuntu 14.04.1
14+ Supports Ubuntu 14.04.1
1515
1616 $ git clone https://github.com/dlinknctu/OpenNet.git
17- $ sudo ./install.sh -a
17+ $ cd OpenNet
18+ $ sudo ./configure.sh
19+ $ sudo ./install.sh master
1820 After a successful installation, the script will show "OpenNet installation complete."
1921
2022Run OpenNet
@@ -26,6 +28,8 @@ Please try following commands to run the simulation:
2628 # cd $ROOT_PATH/mininet/examples/opennet
2729 # python wifiroaming.py
2830
31+ Do not add "sudo" at the head of the third line.
32+
2933Run NetAnim
3034-----------
3135Use NetAnim to open the XML file in the directory /tmp/xml.
Original file line number Diff line number Diff line change @@ -5,4 +5,3 @@ NS3_VERSION: 3.22
55PYGCCXML_VERSION: 1.0.0
66NETANIM_VERSION: 3.105
77temp_location: "/tmp"
8- home_location: "/root/opennet"
Original file line number Diff line number Diff line change 4444 - uuid-runtime
4545 - qt4-dev-tools
4646 - python-networkx
47- tags : apt
47+ - librdmacm-dev
48+ tags : apt
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ OpenNet installation complete.
33Before using OpenNet, you need to prepare SDN controller by yourself.
44=======================================================================
55Please try following commands to run the simulation
6- $ ./waf_shell.sh
7- $ cd {{ home_location }}/mininet/examples/opennet
8- $ python wifiroaming.py
6+ $ sudo ./waf_shell.sh
7+ # cd {{ home_location }}/mininet/examples/opennet
8+ # python wifiroaming.py
99
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd " {{ home_location }}/ns-allinone-{{ NS3_VERSION }}/ns-{{ NS3_VERSION }}"
3- ./waf shell
3+ ./waf shell
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script can help users to configure the /etc/hosts file
4+ # Currently only support local installation
5+
6+ set -e
7+ HOSTS_COMMENT=' # The following lines are desirable for OpenNet'
8+ FIRST_LOCAL_IP=` ifconfig | grep inet | awk ' NR==1 {gsub("addr:","",$2); print $2}' `
9+
10+ function LOCAL_INSTALL {
11+ echo >> /etc/hosts
12+ echo " $HOSTS_COMMENT " >> /etc/hosts
13+ echo " $FIRST_LOCAL_IP master" >> /etc/hosts
14+ }
15+
16+ if [ $# -eq 0 ]; then
17+ LOCAL_INSTALL
18+ exit
19+ fi
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33set -e
4- PWD=$( pwd)
5- OPENNET_PATH=$HOME /opennet
4+ OPENNET_PATH=$PWD
65ANSIBLE_PATH=$OPENNET_PATH /ansible
76USERDIR=$HOME /.ssh
87user=$( whoami)
98
109function Install_Ansible {
1110
1211 apt-get update
13- apt-get install software-properties-common
14- apt-add-repository ppa:ansible/ansible
12+ apt-get install -y software-properties-common
13+ apt-add-repository -y ppa:ansible/ansible
1514 apt-get update
16- apt-get install ansible
15+ apt-get install -y ansible
1716
1817}
1918
@@ -32,6 +31,7 @@ function SSH_Config_Setup {
3231 fi
3332 for host in $hosts ; do
3433 echo " ***copying public key to $host "
34+ ssh-keyscan -H $host >> ~ /.ssh/known_hosts
3535 ssh-copy-id -i $USERDIR /cluster_key.pub $user @$host & > /dev/null
3636 echo " ***copying key pair to remote host"
3737 scp $USERDIR /{cluster_key,cluster_key.pub,config} $user @$host :$USERDIR
@@ -80,6 +80,7 @@ function Test_Network {
8080function Install_OpenNet {
8181
8282 cd $ANSIBLE_PATH
83+ echo " home_location: \" $OPENNET_PATH \" \n" >> group_vars/all
8384 ansible-playbook playbook.yml
8485
8586}
@@ -125,4 +126,4 @@ SSH_Config_Setup
125126SSH_Daemon_Setup
126127Test_Network
127128Install_OpenNet
128- cat opennet_help.txt
129+ cat $OPENNET_PATH / opennet_help.txt
You can’t perform that action at this time.
0 commit comments