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