From 2dac885e6c48989d9a7bc89aca2b69503d2b3399 Mon Sep 17 00:00:00 2001 From: Eric Windisch Date: Fri, 31 Jan 2014 01:25:28 -0500 Subject: [PATCH] Pull docker images from global registry The global docker registry is where images are being built and uploaded. It's effectively docker's version of, say, 'pip'. The static tarballs are not only an extra maintenance burden as they're outside the standard build and publishing process, but are presently outside the scope of an open development / release process as well. While this process does cause some trouble with network-independence for CI purposes, the fetching is still done from install-docker.sh; Additionally, this driver is not currently tested via the community CI effort. Change-Id: I3ee6bfee9c273cd3aabe1e00a1d1a8856a466189 --- lib/nova_plugins/hypervisor-docker | 8 ++++---- tools/docker/install_docker.sh | 23 ++++++----------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/lib/nova_plugins/hypervisor-docker b/lib/nova_plugins/hypervisor-docker index 0153953d6c..bb934b87d6 100644 --- a/lib/nova_plugins/hypervisor-docker +++ b/lib/nova_plugins/hypervisor-docker @@ -31,10 +31,10 @@ DOCKER_UNIX_SOCKET=/var/run/docker.sock DOCKER_PID_FILE=/var/run/docker.pid DOCKER_REGISTRY_PORT=${DOCKER_REGISTRY_PORT:-5042} -DOCKER_IMAGE=${DOCKER_IMAGE:-http://get.docker.io/images/openstack/docker-ut.tar.gz} -DOCKER_IMAGE_NAME=docker-busybox -DOCKER_REGISTRY_IMAGE=${DOCKER_REGISTRY_IMAGE:-http://get.docker.io/images/openstack/docker-registry.tar.gz} -DOCKER_REGISTRY_IMAGE_NAME=docker-registry +DOCKER_IMAGE=${DOCKER_IMAGE:-busybox:latest} +DOCKER_IMAGE_NAME=busybox +DOCKER_REGISTRY_IMAGE=${DOCKER_REGISTRY_IMAGE:-registry:latest} +DOCKER_REGISTRY_IMAGE_NAME=registry DOCKER_REPOSITORY_NAME=${SERVICE_HOST}:${DOCKER_REGISTRY_PORT}/${DOCKER_IMAGE_NAME} DOCKER_APT_REPO=${DOCKER_APT_REPO:-https://get.docker.io/ubuntu} diff --git a/tools/docker/install_docker.sh b/tools/docker/install_docker.sh index 375cfe958b..4fa23864fb 100755 --- a/tools/docker/install_docker.sh +++ b/tools/docker/install_docker.sh @@ -55,21 +55,10 @@ if ! timeout $SERVICE_TIMEOUT sh -c "$CONFIGURE_CMD"; then die $LINENO "docker did not start" fi +# Get guest container image +docker pull $DOCKER_IMAGE +docker tag $DOCKER_IMAGE $DOCKER_IMAGE_NAME -# Get Docker image -if [[ ! -r $FILES/docker-ut.tar.gz ]]; then - (cd $FILES; curl -OR $DOCKER_IMAGE) -fi -if [[ ! -r $FILES/docker-ut.tar.gz ]]; then - die $LINENO "Docker image unavailable" -fi -docker import - $DOCKER_IMAGE_NAME <$FILES/docker-ut.tar.gz - -# Get Docker registry image -if [[ ! -r $FILES/docker-registry.tar.gz ]]; then - (cd $FILES; curl -OR $DOCKER_REGISTRY_IMAGE) -fi -if [[ ! -r $FILES/docker-registry.tar.gz ]]; then - die $LINENO "Docker registry image unavailable" -fi -docker import - $DOCKER_REGISTRY_IMAGE_NAME <$FILES/docker-registry.tar.gz +# Get docker-registry image +docker pull $REGISTRY_IMAGE +docker tag $REGISTRY_IMAGE $REGISTRY_IMAGE_NAME