Merge "Add odl-sxp-routing feature to distribution"
[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 # Temporary workaround required to bring up OVS
23 # post-install without which OVS daemon exits.
24 service openvswitch-switch restart
25 # Verify the OVS service status
26 service openvswitch-switch status
27
28 echo '---> Installing mininet'
29 apt-get install mininet
30
31 echo '---> Installing build pre-requisites'
32 apt-get install build-essential snmp libsnmp-dev snmpd libpcap-dev \
33 autoconf make automake libtool libconfig-dev libssl-dev libffi-dev libssl-doc pkg-config
34
35 git clone https://github.com/intracom-telecom-sdn/mtcbench.git
36 mtcbench/deploy/docker/provision.sh
37 # TODO: remove workaround for build issue with mtcbench
38 # when mtcbench dependency build correctly
39 # https://github.com/intracom-telecom-sdn/mtcbench/issues/10
40 mtcbench/build_mtcbench.sh || true
41 cd mtcbench/oflops/cbench
42 make
43 cp cbench /usr/local/bin/
44
45 echo '---> Installing exabgp'
46 apt-get install exabgp
47
48 # Install vlan for vlan based tests in VTN suites
49 apt-get install vlan
50
51 # Install netaddr package which is needed by some custom mininet topologies
52 apt-get install python-netaddr