Update ubuntu-mininet-2.3 vagrant definition for private cloud
[releng/builder.git] / vagrant / ubuntu-mininet-ovs-2.3 / bootstrap.sh
1 #!/bin/bash
2
3 # vim: sw=4 ts=4 sts=4 et tw=72 :
4
5 # Ensure that necessary variables are set to enable noninteractive mode in
6 # commands.
7 export DEBIAN_FRONTEND=noninteractive
8
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
12 # ups
13 echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc
14
15 echo '---> Install OpenVSwitch 2.3.1'
16 add-apt-repository -y ppa:vshn/openvswitch
17 apt-get install -y --force-yes -qq openvswitch-switch
18
19 echo '---> Installing CPqD and dependencies'
20 apt-get install -y --force-yes -qq build-essential cmake flex
21 apt-get install -y --force-yes -qq libpcre++-dev libxerces-c-dev libpcap-dev libboost-all-dev
22
23 cd /tmp
24 wget -nc http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_2.5.dfsg-2.1_amd64.deb \
25          http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/libbison-dev_2.5.dfsg-2.1_amd64.deb
26
27 dpkg -i bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
28 rm bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
29
30 wget -nc http://www.nbee.org/download/nbeesrc-jan-10-2013.zip
31 unzip nbeesrc-jan-10-2013.zip
32 cd nbeesrc-jan-10-2013/src
33 cmake .
34 make
35 cp ../bin/libn*.so /usr/local/lib
36 ldconfig
37 cp -R ../include/* /usr/include/
38 cd ../..
39
40 git clone https://github.com/CPqD/ofsoftswitch13.git
41 cd ofsoftswitch13
42 ./boot.sh
43 ./configure
44 make
45 make install
46 cd ..
47
48 echo '---> Installing mininet 2.2.1'
49 git clone git://github.com/mininet/mininet
50 cd mininet
51 git checkout -b 2.2.1 2.2.1
52 cd ..
53 mininet/util/install.sh -nf
54
55 echo '---> Installing cbench for openflow performance tests'
56 OF_DIR=$HOME/openflow  # Directory that contains OpenFlow code
57 OFLOPS_DIR=$HOME/oflops  # Directory that contains oflops repo
58
59 apt-get install -y --force-yes -qq libsnmp-dev libpcap-dev libconfig-dev
60
61 git clone git://gitosis.stanford.edu/openflow.git $OF_DIR
62 git clone https://github.com/andi-bigswitch/oflops.git $OFLOPS_DIR
63
64 cd $OFLOPS_DIR
65 ./boot.sh
66 ./configure --with-openflow-src-dir=$OF_DIR
67 make
68 make install
69
70 echo '---> Installing exabgp'
71 apt-get install -y --force-yes -qq exabgp