BUG-2625: validaste snmp using jdk8 only
[releng/builder.git] / vagrant / gbp-ubuntu-docker-ovs-node / 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 # we need garethr-docker in our puppet manifest to install docker
11 # cleanly
12 puppet module install garethr-docker --version 4.1.1
13
14 # do the package install via puppet so that we know it actually installs
15 # properly and it also makes it quieter but with better error reporting
16 echo "---> Installing Group Based Policy requirements"
17 puppet apply /vagrant/gbp_packages.pp
18
19 # configure docker networking so that it does not conflict with LF internal networks
20 # configure docker daemon to listen on port 5555 enabling remote managment
21 # This has to happen before docker gets installed or things go sideways
22 # badly
23 cat <<EOL > /etc/default/docker
24 # /etc/default/docker
25 DOCKER_OPTS='-H unix:///var/run/docker.sock -H tcp://0.0.0.0:5555 --bip=10.250.0.254/24'
26 EOL
27
28 # docker
29 echo "---> Installing docker"
30 puppet apply /vagrant/docker_setup.pp
31
32 echo "---> stopping docker"
33 puppet apply -e "service { 'docker': ensure => stopped }"
34
35 echo "---> cleaning docker configs that break after snapshotting"
36 rm -f /var/lib/docker/repositories-aufs /etc/docker/key.json
37
38 # OVS
39 echo "---> Installing ovs"
40 puppet module install puppetlabs-vcsrepo
41 puppet apply /vagrant/ovs_setup.pp
42
43 pushd /root/ovs
44 DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary | \
45  grep 'dpkg-deb: building package'
46 popd
47
48 # Note this does not actually install OVS. Everytime we've tried to do
49 # that the snapshot system hangs on spin-up for some reason. As such the
50 # final installation will have to be left as a spin-up task
51
52 # The following is what should be used in the spin-up task
53 # dpkg --install /root/openvswitch-datapath-dkms* && dpkg --install /root/openvswitch-{common,switch}*