From 20d5903696bb5499eb88cec8c1621cfe263bf59c Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 5 Nov 2015 15:45:09 +0000 Subject: [PATCH 1/5] Update test template name to pull in new Docker version --- test/gce.sh | 4 ++-- tools | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/gce.sh b/test/gce.sh index 55a577de..b83f5198 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-6} +: ${TEMPLATE_NAME:=test-template-8} : ${ZONE:=us-central1-a} : ${NUM_HOSTS:=5} SUFFIX="" @@ -73,7 +73,7 @@ curl -sSL https://get.docker.com/ | sh apt-get update -qq; 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; +echo 'DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 -s overlay"' >> /etc/default/docker; service docker restart EOF # It seems we need a short delay for docker to start up, so I put this in diff --git a/tools b/tools index 58c9a390..452f2b7d 160000 --- a/tools +++ b/tools @@ -1 +1 @@ -Subproject commit 58c9a390c54860547254fa3a66e0acd8916f889c +Subproject commit 452f2b7de10dddb1bd8933ebb43bc8d8775e6658 From 499d6312b7e6159ab94c116127b9c020fe109118 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 6 Nov 2015 10:02:19 +0000 Subject: [PATCH 2/5] Don't need --add-host except in non-FDP case because we put the mappings in the outer /etc/hosts --- test/190_no_fastdp_2_test.sh | 4 ++-- test/gce.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/190_no_fastdp_2_test.sh b/test/190_no_fastdp_2_test.sh index fe793f2b..18d235fc 100755 --- a/test/190_no_fastdp_2_test.sh +++ b/test/190_no_fastdp_2_test.sh @@ -7,8 +7,8 @@ C2=10.2.1.47 start_suite "WEAVE_NO_FASTDP operation" -WEAVE_NO_FASTDP=1 weave_on $HOST1 launch -WEAVE_NO_FASTDP=1 weave_on $HOST2 launch $HOST1 +WEAVE_NO_FASTDP=1 WEAVE_DOCKER_ARGS=$ADD_HOST_ARGS weave_on $HOST1 launch +WEAVE_NO_FASTDP=1 WEAVE_DOCKER_ARGS=$ADD_HOST_ARGS weave_on $HOST2 launch $HOST1 start_container $HOST1 $C1/24 --name=c1 start_container $HOST2 $C2/24 --name=c2 diff --git a/test/gce.sh b/test/gce.sh index b83f5198..b1cc7cca 100755 --- a/test/gce.sh +++ b/test/gce.sh @@ -142,7 +142,7 @@ function hosts { done echo export SSH=ssh echo export HOSTS=\"$hosts\" - echo export WEAVE_DOCKER_ARGS=\"$args\" + echo export ADD_HOST_ARGS=\"$args\" rm $json } From fa5bcd045704dacca0504c4c183c7e6783c12fa5 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 6 Nov 2015 10:37:51 +0000 Subject: [PATCH 3/5] Lump some commands together to reduce CircleCI waiting overhead --- circle.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/circle.yml b/circle.yml index cd208015..32804c63 100644 --- a/circle.yml +++ b/circle.yml @@ -27,13 +27,10 @@ dependencies: docker save weaveworks/weave-test >$WEAVE_TEST; fi post: - - sudo apt-get update - - sudo apt-get install bc jq - - pip install requests + - sudo apt-get update && sudo apt-get install bc jq && pip install requests - curl https://sdk.cloud.google.com | bash - bin/setup-circleci-secrets "$SECRET_PASSWORD" - - mkdir -p $(dirname $SRCDIR) - - cp -r $(pwd)/ $SRCDIR + - mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR - cd $SRCDIR/test; ./gce.sh make_template: parallel: false @@ -45,9 +42,7 @@ test: parallel: true - docker run -v /var/run/docker.sock:/run/docker.sock -v /home/ubuntu:/home/go -e COVERAGE=true weaveworks/weave-build: parallel: true - - cd $SRCDIR/test; ./gce.sh setup: - parallel: true - - cd $SRCDIR/test; eval $(./gce.sh hosts); ./setup.sh: + - cd $SRCDIR/test; ./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh: parallel: true - cd $SRCDIR/test; eval $(./gce.sh hosts); export COVERAGE=true; ./run_all.sh: parallel: true From 17c835e6720c9a437614758cd81dccd9aa4b0371 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Mon, 9 Nov 2015 09:25:27 +0000 Subject: [PATCH 4/5] Compress weave.tar to save upload time --- .gitignore | 2 +- Makefile | 4 ++-- site/building.md | 6 +++--- test/setup.sh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 2cefdfb7..4506fcc5 100644 --- a/.gitignore +++ b/.gitignore @@ -48,7 +48,7 @@ releases .weaver.uptodate .weavedns.uptodate .weaveexec.uptodate -weave.tar +weave.tar.gz prog/weaveexec/weave prog/weaveexec/weavehosts prog/weaveexec/weaveproxy diff --git a/Makefile b/Makefile index 1757de4a..7431459e 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ WEAVEEXEC_IMAGE=$(DOCKERHUB_USER)/weaveexec IMAGES=$(WEAVER_IMAGE) $(WEAVEEXEC_IMAGE) -WEAVE_EXPORT=weave.tar +WEAVE_EXPORT=weave.tar.gz WEAVEEXEC_DOCKER_VERSION=1.3.1 DOCKER_DISTRIB=prog/weaveexec/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz @@ -105,7 +105,7 @@ $(WEAVEEXEC_UPTODATE): prog/weaveexec/Dockerfile $(DOCKER_DISTRIB) weave $(SIGPR touch $@ $(WEAVE_EXPORT): $(IMAGES_UPTODATE) - $(SUDO) docker save $(addsuffix :latest,$(IMAGES)) > $@ + $(SUDO) docker save $(addsuffix :latest,$(IMAGES)) | gzip > $@ $(DOCKER_DISTRIB): curl -o $(DOCKER_DISTRIB) $(DOCKER_DISTRIB_URL) diff --git a/site/building.md b/site/building.md index 2d7b713f..41b0bfe1 100644 --- a/site/building.md +++ b/site/building.md @@ -54,7 +54,7 @@ $ make This will build the weave components and package them into three Docker images (`weaveworks/weave`, `weaveworks/weavedns`, and -`weaveworks/weaveexec`). These are then exported as `weave.tar`. +`weaveworks/weaveexec`). These are then exported as `weave.tar.gz`. ## Building in a Docker container @@ -167,13 +167,13 @@ you can do so with $ vagrant ssh -c 'make -C src/github.com/weaveworks/weave' ``` -you should then find a `weave.tar` container snapshot tarball in the +you should then find a `weave.tar.gz` container snapshot tarball in the top-level directory. You can use that snapshot with `docker load` against a different host, e.g. ```bash $ export DOCKER_HOST=tcp:// -$ docker load < weave.tar +$ docker load < weave.tar.gz ``` You can provide extra Vagrant configuration by putting a file diff --git a/test/setup.sh b/test/setup.sh index 11280ce2..9312fc20 100755 --- a/test/setup.sh +++ b/test/setup.sh @@ -13,7 +13,7 @@ echo " prefetch test images" setup_host() { HOST=$1 - docker_on $HOST load -i ../weave.tar + docker_on $HOST load -i ../weave.tar.gz DANGLING_IMAGES="$(docker_on $HOST images -q -f dangling=true)" [ -n "$DANGLING_IMAGES" ] && docker_on $HOST rmi $DANGLING_IMAGES 1>/dev/null 2>&1 || true run_on $HOST mkdir -p bin From 65fe753a58e577f956496e2b20df301264032e06 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Mon, 9 Nov 2015 12:24:18 +0000 Subject: [PATCH 5/5] Remove code coverage as temporary work-around to Docker 1.9 issue --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 32804c63..bdb710c7 100644 --- a/circle.yml +++ b/circle.yml @@ -40,11 +40,11 @@ test: parallel: true - docker run -v /home/ubuntu:/home/go -e COVERDIR=test/coverage -e SLOW=true -e CIRCLECI -e CIRCLE_BUILD_NUM -e CIRCLE_NODE_TOTAL -e CIRCLE_NODE_INDEX weaveworks/weave-test: parallel: true - - docker run -v /var/run/docker.sock:/run/docker.sock -v /home/ubuntu:/home/go -e COVERAGE=true weaveworks/weave-build: + - docker run -v /var/run/docker.sock:/run/docker.sock -v /home/ubuntu:/home/go weaveworks/weave-build: parallel: true - cd $SRCDIR/test; ./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh: parallel: true - - cd $SRCDIR/test; eval $(./gce.sh hosts); export COVERAGE=true; ./run_all.sh: + - cd $SRCDIR/test; eval $(./gce.sh hosts); ./run_all.sh: parallel: true timeout: 300 - cd $SRCDIR; make clean-bin: