3 # vim: sw=4 ts=4 sts=4 et tw=72 :
5 echo "---> Updating operating system"
7 DEBIAN_FRONTEND=noninteractive apt-get upgrade -y --force-yes -qq \
8 -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
10 # To handle the prompt style that is expected all over the environment
11 # with how use use robotframework we need to make sure that it is
12 # consistent for any of the users that are created during dynamic spin
14 echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc
17 # apt-get install -y --force-yes -qq mininet
19 # Install mininet with OF13 patch
21 cat > newOptions.patch <<EOF
22 --- mininet/node.py 2014-09-12 13:48:03.165628683 +0100
23 +++ mininet/node.py 2014-09-12 13:50:39.021630236 +0100
25 datapath: userspace or kernel mode (kernel|user)"""
26 Switch.__init__( self, name, **params )
27 self.failMode = failMode
28 + protKey = 'protocols'
29 + if self.params and protKey in self.params:
30 + print 'have protcol params!'
31 + self.opts += protKey + '=' + self.params[protKey]
32 self.datapath = datapath
36 if self.datapath == 'user':
37 self.cmd( 'ovs-vsctl set bridge', self,'datapath_type=netdev' )
38 int( self.dpid, 16 ) # DPID must be a hex string
39 + print 'OVSswitch opts: ',self.opts
40 self.cmd( 'ovs-vsctl -- set Bridge', self,
41 - 'other_config:datapath-id=' + self.dpid )
42 + self.opts+' other_config:datapath-id=' + self.dpid )
43 self.cmd( 'ovs-vsctl set-fail-mode', self, self.failMode )
44 for intf in self.intfList():
48 git clone git://github.com/mininet/mininet
50 git checkout -b 2.1.0 2.1.0
51 git apply -p0 < ../newOptions.patch
56 apt-get install -y --force-yes -qq build-essential cmake flex
57 apt-get install -y --force-yes -qq libpcre++-dev libxerces-c-dev libpcap-dev libboost-all-dev
60 wget -nc http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_2.5.dfsg-2.1_amd64.deb \
61 http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/libbison-dev_2.5.dfsg-2.1_amd64.deb
63 dpkg -i bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
64 rm bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
66 wget -nc http://www.nbee.org/download/nbeesrc-jan-10-2013.zip
67 unzip nbeesrc-jan-10-2013.zip
68 cd nbeesrc-jan-10-2013/src
71 cp ../bin/libn*.so /usr/local/lib
73 cp -R ../include/* /usr/include/
76 git clone https://github.com/CPqD/ofsoftswitch13.git
84 # cbench installation for running openflow performance tests
86 OF_DIR=$HOME/openflow # Directory that contains OpenFlow code
87 OFLOPS_DIR=$HOME/oflops # Directory that contains oflops repo
89 apt-get install -y --force-yes -qq libsnmp-dev libpcap-dev libconfig-dev
91 git clone git://gitosis.stanford.edu/openflow.git $OF_DIR
92 git clone https://github.com/andi-bigswitch/oflops.git $OFLOPS_DIR
96 ./configure --with-openflow-src-dir=$OF_DIR
100 # Install vlan for vlan based tests in VTN suites
101 apt-get install -y --force-yes -qq vlan