3 # vim: sw=4 ts=4 sts=4 et tw=72 :
5 echo "---> Updating operating system"
7 DEBIAN_FRONTEND=noninteractive apt-get upgrade -y --force-yes -qq \
8 -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
10 # we need garethr-docker in our puppet manifest to install docker
12 puppet module install garethr-docker --version 4.1.1
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
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
23 cat <<EOL > /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'
29 echo "---> Installing docker"
30 puppet apply /vagrant/docker_setup.pp
32 echo "---> stopping docker"
33 puppet apply -e "service { 'docker': ensure => stopped }"
35 echo "---> cleaning docker configs that break after snapshotting"
36 rm -f /var/lib/docker/repositories-aufs /etc/docker/key.json
39 echo "---> Installing ovs"
40 puppet module install puppetlabs-vcsrepo
41 puppet apply /vagrant/ovs_setup.pp
44 DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary | \
45 grep 'dpkg-deb: building package'
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
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}*