Merge branch '34_version_alignment' of https://github.com/rade/weave into pr306_lock_versions

This commit is contained in:
Michael Bridgen committed 2014-12-30 17:00:08 +00:00
commit 5f69637f31
1 file changed
+21 -4
+21 -4
View File
@@ -33,8 +33,18 @@ usage() {
[ $# -gt 0 ] || usage
IMAGE=zettio/weave
DNS_IMAGE=zettio/weavedns
if [ "$SCRIPT_VERSION" = "(unreleased version)" ] ; then
IMAGE_VERSION=latest
else
IMAGE_VERSION=$SCRIPT_VERSION
fi
IMAGE_VERSION=${VERSION:-$IMAGE_VERSION}
BASE_IMAGE=zettio/weave
BASE_DNS_IMAGE=zettio/weavedns
IMAGE=$BASE_IMAGE:$IMAGE_VERSION
DNS_IMAGE=$BASE_DNS_IMAGE:$IMAGE_VERSION
CONTAINER_NAME=weave
DNS_CONTAINER_NAME=weavedns
BRIDGE=weave
@@ -358,9 +368,16 @@ check_not_running() {
echo "$1 is already running." >&2
exit 1
;;
"true $2:"*)
echo "$1 is already running." >&2
exit 1
;;
"false $2")
docker rm $1 >/dev/null
;;
"false $2:"*)
docker rm $1 >/dev/null
;;
true*)
echo "Found another running container named '$1'. Aborting." >&2
exit 1
@@ -429,7 +446,7 @@ DOCKER_VERSION_PATCH=$(echo "$DOCKER_VERSION" | cut -d. -f 3)
case "$COMMAND" in
launch)
check_not_running $CONTAINER_NAME $IMAGE
check_not_running $CONTAINER_NAME $BASE_IMAGE
create_bridge
# We set the router name to the bridge mac since that is
# stable across re-creations of the containers.
@@ -466,7 +483,7 @@ case "$COMMAND" in
[ $# -gt 0 ] || usage
CIDR=$1
shift 1
check_not_running $DNS_CONTAINER_NAME $DNS_IMAGE
check_not_running $DNS_CONTAINER_NAME $BASE_DNS_IMAGE
create_bridge
docker_bridge_ip
DNS_CONTAINER=$(docker run --privileged -d --name=$DNS_CONTAINER_NAME \