X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=vagrant%2Fgbp-ubuntu-docker-ovs-node%2Fbootstrap.sh;h=2fadf142d43d3f5b82bffa1c232b542cad2f4541;hb=422f7e222e48b08e5f22ee04bc471465aecc9047;hp=831a2d962c4378325a29b44cd50fb0310945fd97;hpb=67105890d2c8b760d901a6948291915021799d8d;p=releng%2Fbuilder.git diff --git a/vagrant/gbp-ubuntu-docker-ovs-node/bootstrap.sh b/vagrant/gbp-ubuntu-docker-ovs-node/bootstrap.sh index 831a2d962..2fadf142d 100644 --- a/vagrant/gbp-ubuntu-docker-ovs-node/bootstrap.sh +++ b/vagrant/gbp-ubuntu-docker-ovs-node/bootstrap.sh @@ -6,27 +6,47 @@ echo "---> Updating operating system" apt-get update -qq apt-get upgrade -y --force-yes -qq -echo "---> Installing Group Based Policy requirements" -apt-get install -y software-properties-common -qq -apt-get install -y python-software-properties -qq -apt-get install -y python-pip -qq -apt-get install -y python-virtualenv -qq -apt-get install -y git-core git -qq -apt-get install -y curl -qq -apt-get install -y bridge-utils -qq +# we need garethr-docker in our puppet manifest to install docker +# cleanly +puppet module install garethr-docker --version 4.1.1 -# docker -curl -sSL https://get.docker.com/ | sh +# do the package install via puppet so that we know it actually installs +# properly and it also makes it quieter but with better error reporting +echo "---> Installing Group Based Policy requirements" +puppet apply /vagrant/gbp_packages.pp # configure docker networking so that it does not conflict with LF internal networks # configure docker daemon to listen on port 5555 enabling remote managment +# This has to happen before docker gets installed or things go sideways +# badly cat < /etc/default/docker # /etc/default/docker DOCKER_OPTS='-H unix:///var/run/docker.sock -H tcp://0.0.0.0:5555 --bip=10.250.0.254/24' EOL -ip link set dev docker0 down -brctl delbr docker0 -restart docker + +# docker +echo "---> Installing docker" +puppet apply /vagrant/docker_setup.pp + +echo "---> stopping docker" +puppet apply -e "service { 'docker': ensure => stopped }" + +echo "---> cleaning docker configs that break after snapshotting" +rm -f /var/lib/docker/repositories-aufs /etc/docker/key.json # OVS -curl https://raw.githubusercontent.com/pritesh/ovs/nsh-v8/third-party/start-ovs-deb.sh | bash +echo "---> Installing ovs" +puppet module install puppetlabs-vcsrepo +puppet apply /vagrant/ovs_setup.pp + +pushd /root/ovs +DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary | \ + grep 'dpkg-deb: building package' +popd + +# Note this does not actually install OVS. Everytime we've tried to do +# that the snapshot system hangs on spin-up for some reason. As such the +# final installation will have to be left as a spin-up task + +# The following is what should be used in the spin-up task +# dpkg --install /root/openvswitch-datapath-dkms* && dpkg --install /root/openvswitch-{common,switch}*