Add git-review to centos systems
[releng/builder.git] / packer / provision / mininet-ovs-2.3.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 update -y --force-yes
18 apt-get install -y --force-yes openvswitch-switch
19
20 echo '---> Installing CPqD and dependencies'
21 apt-get install -y --force-yes build-essential cmake flex
22 apt-get install -y --force-yes libpcre++-dev libxerces-c-dev libpcap-dev libboost-all-dev
23
24 cd /tmp
25 wget -nc http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_2.5.dfsg-2.1_amd64.deb \
26          http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/libbison-dev_2.5.dfsg-2.1_amd64.deb
27
28 dpkg -i bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
29 rm bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
30
31 wget -nc http://www.nbee.org/download/nbeesrc-jan-10-2013.zip
32 unzip nbeesrc-jan-10-2013.zip
33 cd nbeesrc-jan-10-2013/src
34 cmake .
35 make
36 cp ../bin/libn*.so /usr/local/lib
37 ldconfig
38 cp -R ../include/* /usr/include/
39 cd ../..
40
41 git clone https://github.com/CPqD/ofsoftswitch13.git
42 cd ofsoftswitch13
43 ./boot.sh
44 ./configure
45 make
46 make install
47 cd ..
48
49 echo '---> Installing mininet 2.2.1'
50 git clone git://github.com/mininet/mininet
51 cd mininet
52 git checkout -b 2.2.1 2.2.1
53 cd ..
54 mininet/util/install.sh -nf
55
56 echo '---> Installing cbench for openflow performance tests'
57 OF_DIR=$HOME/openflow  # Directory that contains OpenFlow code
58 OFLOPS_DIR=$HOME/oflops  # Directory that contains oflops repo
59
60 apt-get install -y --force-yes libsnmp-dev libpcap-dev libconfig-dev
61
62 git clone git://gitosis.stanford.edu/openflow.git $OF_DIR
63 git clone https://github.com/andi-bigswitch/oflops.git $OFLOPS_DIR
64
65 cd $OFLOPS_DIR
66 ./boot.sh
67 ./configure --with-openflow-src-dir=$OF_DIR
68 make
69 make install
70
71 echo '---> Installing exabgp'
72 apt-get install -y --force-yes exabgp
73
74 echo '---> All Python package installation should happen in virtualenv'
75 apt-get install -y --force-yes python-virtualenv python-pip