update devel configuration to onboarding
Change-Id: I6b230eeea4dff0e893bc9e71a90a5f0d6806c57f
diff --git a/common/Makefile.cloudlab b/common/Makefile.cloudlab
index 7ab8a54..ee0bc48 100644
--- a/common/Makefile.cloudlab
+++ b/common/Makefile.cloudlab
@@ -10,6 +10,7 @@
prereqs:
make -f Makefile.prereqs
mkdir -p $(SETUPDIR)
+ sudo ./check_docker_version.sh
admin-openrc:
sudo cat /root/setup/admin-openrc.sh > $(SETUPDIR)/admin-openrc.sh
diff --git a/common/Makefile.prereqs b/common/Makefile.prereqs
index fce51be..381a1e7 100644
--- a/common/Makefile.prereqs
+++ b/common/Makefile.prereqs
@@ -39,3 +39,17 @@
/usr/local/bin/docker-compose:
sudo bash -c "curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
sudo chmod +x /usr/local/bin/docker-compose
+
+rebuild_docker:
+ stat docker_build || git clone https://github.com/dotcloud/docker.git docker_build
+ sudo make -C docker_build build
+ sudo make -C docker_build binary
+ sudo service docker stop
+ sudo mv /usr/bin/docker /usr/bin/docker-old
+ sudo cp docker_build/bundles/latest/binary-client/docker /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/dockerd /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd-shim /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd-ctr /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/docker-runc /usr/bin/
+ sudo service docker start
diff --git a/common/check_docker_version.sh b/common/check_docker_version.sh
new file mode 100755
index 0000000..654ff5f
--- /dev/null
+++ b/common/check_docker_version.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+DOCKER_VERSION=`docker version --format '{{.Server.Version}}'`
+
+verlte() {
+ [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
+}
+
+verlte $DOCKER_VERSION 1.10.0 && echo "Please upgrade to docker 1.10.2 or better" && exit -1
+
+exit 0