55efc9970af866df8349ada2af99617be6302fb1
[releng/builder.git] / packer / provision / mininet-ovs-2.5.sh
1 #!/bin/bash -x
2
3 # vim: sw=4 ts=4 sts=4 et tw=72 :
4
5 # force any errors to cause the script and job to end in failure
6 set -xeu -o pipefail
7
8 # Ensure that necessary variables are set to enable noninteractive mode in
9 # commands.
10 export DEBIAN_FRONTEND=noninteractive
11
12 # To handle the prompt style that is expected all over the environment
13 # with how use use robotframework we need to make sure that it is
14 # consistent for any of the users that are created during dynamic spin
15 # ups
16 echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc
17
18 echo '---> Install OpenVSwitch 2.5.0'
19 apt-get update -m
20 apt-get install openvswitch-switch openvswitch-vtep
21
22 echo '---> Installing mininet'
23 apt-get install mininet
24
25 echo '---> Installing build pre-requisites'
26 apt-get install build-essential snmp libsnmp-dev snmpd libpcap-dev \
27 autoconf make automake libtool libconfig-dev libssl-dev libffi-dev libssl-doc pkg-config
28
29 git clone https://github.com/intracom-telecom-sdn/mtcbench.git
30 mtcbench/deploy/docker/provision.sh
31 # TODO: remove workaround for build issue with mtcbench
32 # when mtcbench dependency build correctly
33 # https://github.com/intracom-telecom-sdn/mtcbench/issues/10
34 mtcbench/build_mtcbench.sh || true
35 cd mtcbench/oflops/cbench
36 make
37 cp cbench /usr/local/bin/
38
39 echo '---> Installing exabgp'
40 apt-get install exabgp
41
42 echo '---> All Python package installation should happen in virtualenv'
43 apt-get install python-virtualenv python-pip
44
45 # Install vlan for vlan based tests in VTN suites
46 apt-get install vlan
47
48 # Install netaddr package which is needed by some custom mininet topologies
49 apt-get install python-netaddr
50
51 #Check out 6Wind quagga with tag name '20170418', compile and install for router functionalities
52 echo "---> Installing the Quagga..."
53 mkdir -p /tmp/build_quagga
54 cd /tmp/build_quagga
55 git clone https://github.com/6WIND/zrpcd.git
56 cd zrpcd
57 chmod a+x /tmp/build_quagga/zrpcd/pkgsrc/dev_compile_script.sh
58 /tmp/build_quagga/zrpcd/pkgsrc/dev_compile_script.sh -d -b -t -v 2
59
60 # Removing the build_quagga folder
61 rm -rf /tmp/build_quagga/