diff --git a/test/README.md b/test/README.md index 4e18f175..d7358b86 100644 --- a/test/README.md +++ b/test/README.md @@ -57,3 +57,23 @@ DOCKER_OPTS="--host unix:///var/run/docker.sock --host tcp://0.0.0.0:2375" ``` to the file `/etc/default/docker`, then restart docker. + +## Updating the GCE test image + +When a new version of Docker is released, you'll need to update the GCE test image. + +To do this, pick a fresh ```TEMPLATE_NAME``` and update any commands in +```function make_template``` in gce.sh, then run: + +``` +./gce.sh make_template +``` + +For this you'll need the GCE credentials, which can be found in ```bin/setup-circleci-secrets```, +which you'll need to decrypt and run (its echos the secrets into know locations): + +``` +./bin/setup-circleci-secrets "$SECRET_PASSWORD" +``` + +If you don't know the password, ask tom@weave.works. diff --git a/test/gce.sh b/test/gce.sh index 09e557fd..f2d7be82 100755 --- a/test/gce.sh +++ b/test/gce.sh @@ -11,7 +11,7 @@ set -e : ${SSH_KEY_FILE:=$HOME/.ssh/gce_ssh_key} : ${PROJECT:=positive-cocoa-90213} : ${IMAGE:=ubuntu-14-04} -: ${TEMPLATE_NAME:=test-template-3} +: ${TEMPLATE_NAME:=test-template-4} : ${ZONE:=us-central1-a} : ${NUM_HOSTS:=5} SUFFIX="" @@ -68,10 +68,10 @@ function try_connect { function install_docker_on { name=$1 ssh -t $name sudo bash -x -s < /etc/apt/sources.list.d/docker.list; +curl -sSL https://get.docker.com/gpg | sudo apt-key add - +curl -sSL https://get.docker.com/ | sh apt-get update -qq; -apt-get install -q -y --force-yes --no-install-recommends lxc-docker ethtool; +apt-get install -q -y --force-yes --no-install-recommends ethtool; usermod -a -G docker vagrant; echo 'DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375"' >> /etc/default/docker; service docker restart