]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
docker: use a better method to pull images
authorSébastien Han <seb@redhat.com>
Thu, 9 Feb 2017 14:16:39 +0000 (15:16 +0100)
committerSébastien Han <seb@redhat.com>
Thu, 9 Feb 2017 16:57:18 +0000 (17:57 +0100)
We changed the way we declare image.
Prior to this patch we must have a "user/image:tag"
format, which is incompatible with non docker-hub registry where you
usually don't have a "user". On the docker hub a "user" is also
identified as a namespace, so for Ceph the user was "ceph".

Variables have been simplified with only:

* ceph_docker_image
* ceph_docker_image_tag

1. For docker hub images: ceph_docker_name: "ceph/daemon" will give
you the 'daemon' image of the 'ceph' user.

2. For non docker hub images: ceph_docker_name: "daemon" will simply
give you the "daemon" image.

Infrastructure playbooks have been modified as well.
The file group_vars/all.docker.yml.sample has been removed as well.
It is hard to maintain since we have to generate it manually. If
you want to configure specific variables for a specific daemon simply
edit group_vars/$DAEMON.yml

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1420207
Signed-off-by: Sébastien Han <seb@redhat.com>
defaults/main.yml
tasks/docker/fetch_image.yml

index e6dddb528260bde114f5e32e8977bc6a13dbca7a..c5a5643261b44504ed568a1e72595de297e0a017 100644 (file)
@@ -385,6 +385,8 @@ os_tuning_params:
 ##########
 
 docker: false
+ceph_docker_image: "ceph/daemon"
+ceph_docker_image_tag: latest
 
 # Do not comment the following variables mon_containerized_deployment_* here. These variables are being used
 # by ceph.conf.j2 template. so it should always be defined
index 26e8b2b01fb5bbb7a16910376c76088fbf488c23..57c76ed859e9cbcf30e916107c9b0e40ac48efb8 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # Normal case - pull image from registry
-- name: pull ceph daemon image
-  command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_username }}/{{ ceph_docker_imagename }}:{{ ceph_docker_image_tag }}"
+- name: "pull {{ ceph_docker_image }} image"
+  command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
   changed_when: false
   when: ceph_docker_dev_image is undefined or not ceph_docker_dev_image