6e0fc75819aab66fff8995eb01d32170c0b73ac8
[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 echo "---> Updating operating system"
6 apt-get update -qq
7 DEBIAN_FRONTEND=noninteractive apt-get upgrade -y --force-yes -qq \
8     -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
9
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
13 # ups
14 echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc
15
16 # Install OpenVSwitch 2.3.1
17 add-apt-repository -y ppa:vshn/openvswitch
18 apt-get update -qq
19 apt-get install -y --force-yes -qq openvswitch-switch
20
21 # Install CPqD
22 apt-get install -y --force-yes -qq build-essential cmake flex
23 apt-get install -y --force-yes -qq libpcre++-dev libxerces-c-dev libpcap-dev libboost-all-dev
24
25 cd /tmp
26 wget -nc http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_2.5.dfsg-2.1_amd64.deb \
27          http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/libbison-dev_2.5.dfsg-2.1_amd64.deb
28
29 dpkg -i bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
30 rm bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
31
32 wget -nc http://www.nbee.org/download/nbeesrc-jan-10-2013.zip
33 unzip nbeesrc-jan-10-2013.zip
34 cd nbeesrc-jan-10-2013/src
35 cmake .
36 make
37 cp ../bin/libn*.so /usr/local/lib
38 ldconfig
39 cp -R ../include/* /usr/include/
40 cd ../..
41
42 git clone https://github.com/CPqD/ofsoftswitch13.git
43 cd ofsoftswitch13
44 ./boot.sh
45 ./configure
46 make
47 make install
48 cd ..
49
50 # Install mininet 2.2.1
51 git clone git://github.com/mininet/mininet
52 cd mininet
53 git checkout -b 2.2.1 2.2.1
54 cd ..
55 mininet/util/install.sh -nf
56
57 # cbench installation for running openflow performance tests
58
59 OF_DIR=$HOME/openflow  # Directory that contains OpenFlow code
60 OFLOPS_DIR=$HOME/oflops  # Directory that contains oflops repo
61
62 apt-get install -y --force-yes -qq libsnmp-dev libpcap-dev libconfig-dev
63
64 git clone git://gitosis.stanford.edu/openflow.git $OF_DIR
65 git clone https://github.com/andi-bigswitch/oflops.git $OFLOPS_DIR
66
67 cd $OFLOPS_DIR
68 ./boot.sh
69 ./configure --with-openflow-src-dir=$OF_DIR
70 make
71 make install
72
73 # Installing exabgp
74 apt-get install -y --force-yes -qq exabgp
75