Merge pull request #1302 from ceph/docker-pull

docker: use a better method to pull images
pull/1306/head
Andrew Schoen 2017-02-10 10:18:37 -06:00 committed by GitHub
commit 94ac749918
39 changed files with 109 additions and 255 deletions

View File

@ -1,108 +0,0 @@
---
dummy:
##########
# GLOBAL #
##########
#docker: true
#ceph_docker_dev_image: false
#ceph_docker_registry: docker.io
#######
# MON #
#######
#mon_containerized_deployment: true
#mon_containerized_deployment_with_kv: false
#mon_containerized_default_ceph_conf_with_kv: true
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#kv_port: 4001
#mon_docker_privileged: true
#ceph_mon_docker_username: ceph
#ceph_mon_docker_imagename: daemon
#ceph_mon_docker_image_tag: latest
#ceph_mon_docker_interface: "{{ monitor_interface }}"
#ceph_mon_docker_subnet: "{{ public_network }}" # subnet of the ceph_mon_docker_interface
#ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }} -e MON_NAME={{ ansible_hostname }}
#######
# OSD #
#######
#osd_containerized_deployment: true
#osd_containerized_deployment_with_kv: false
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#ceph_osd_docker_username: ceph
#ceph_osd_docker_imagename: daemon
#ceph_osd_docker_image_tag: latest
#ceph_osd_docker_extra_env: -e CLUSTER={{ cluster }} -e CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE -e OSD_JOURNAL_SIZE={{ journal_size }}
#ceph_osd_docker_prepare_env: "OSD_FORCE_ZAP=1" # comma separated variables
#ceph_osd_docker_devices:
# - /dev/sdb
# - /dev/sdc
#journal_size: 5120 # OSD journal size in MB
#public_network: 0.0.0.0/0
#cluster_network: "{{ public_network }}"
#######
# MDS #
#######
#mds_containerized_deployment: true
#mds_containerized_deployment_with_kv: false
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#ceph_mds_docker_username: ceph
#ceph_mds_docker_imagename: daemon
#ceph_mds_docker_image_tag: latest
#ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
#######
# RGW #
#######
#rgw_containerized_deployment: true
#rgw_containerized_deployment_with_kv: false
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#ceph_rgw_docker_username: ceph
#ceph_rgw_docker_imagename: daemon
#ceph_rgw_docker_image_tag: latest
#ceph_rgw_civetweb_port: 80
#ceph_rgw_docker_extra_env: -e CLUSTER={{ cluster }} -e RGW_CIVETWEB_PORT={{ ceph_rgw_civetweb_port }}
###########
# RESTAPI #
###########
#restapi_containerized_deployment: true
#ceph_restapi_docker_interface: eth0
#ceph_restapi_port: 5000
#ceph_restapi_docker_username: ceph
#ceph_restapi_docker_imagename: daemon
#ceph_restapi_docker_image_tag: latest
#ceph_restapi_docker_extra_env: "RESTAPI_IP=0.0.0.0" # comma separated variables
##############
# RBD MIRROR #
##############
#rbd_mirror_containerized_deployment: true
#rbd_mirror_containerized_deployment_with_kv: false
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#ceph_rbd_mirror_docker_username: ceph
#ceph_rbd_mirror_docker_imagename: daemon
#ceph_rbd_mirror_docker_image_tag: latest
#ceph_docker_on_openstack: false
#######
# NFS #
#######
#nfs_containerized_deployment: true
#nfs_containerized_deployment_with_kv: false
#ceph_nfs_docker_username: ceph
#ceph_nfs_docker_imagename: daemon
#ceph_nfs_docker_image_tag: latest
#ceph_nfs_docker_extra_env: -e GANESHA_EPOCH={{ ganesha_epoch }}
#nfs_file_gw: false
#nfs_obj_gw: false
#ceph_nfs_rgw_access_key: "QFAMEDSJP5DEKJO0DDXY"
#ceph_nfs_rgw_secret_key: "iaSFLDVvDdQt6lkNzHyW4fPLZugBAI1g17LO0+87[MAC[M#C"

View File

@ -393,6 +393,8 @@ dummy:
##########
#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

View File

@ -32,9 +32,8 @@ dummy:
#mds_containerized_deployment_with_kv: false
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#ceph_mds_docker_username: ceph
#ceph_mds_docker_imagename: daemon
#ceph_mds_docker_image_tag: latest
#ceph_docker_image: "ceph/daemon"
#ceph_docker_image_tag: latest
#ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
#ceph_docker_on_openstack: false
#ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -81,9 +81,8 @@ dummy:
#mon_containerized_default_ceph_conf_with_kv: false
#ceph_mon_docker_interface: "{{ monitor_interface }}"
#ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the ceph_mon_docker_interface
#ceph_mon_docker_username: ceph
#ceph_mon_docker_imagename: daemon
#ceph_mon_docker_image_tag: latest
#ceph_docker_image: "ceph/daemon"
#ceph_docker_image_tag: latest
#ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }} -e MON_NAME={{ ansible_hostname }}
#ceph_docker_on_openstack: false
#mon_docker_privileged: false

View File

@ -85,9 +85,8 @@ dummy:
#nfs_containerized_deployment_with_kv: false
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#ceph_nfs_docker_username: ceph
#ceph_nfs_docker_imagename: ganesha
#ceph_nfs_docker_image_tag: latest
#ceph_docker_image: "ceph/ganesha"
#ceph_docker_image_tag: latest
#ceph_nfs_docker_extra_env: -e GANESHA_EPOCH={{ ganesha_epoch }}
#ceph_docker_on_openstack: false
#ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -177,9 +177,8 @@ dummy:
#kv_endpoint: 127.0.0.1
#kv_port: 4001
#ceph_osd_docker_prepare_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1
#ceph_osd_docker_username: ceph
#ceph_osd_docker_imagename: daemon
#ceph_osd_docker_image_tag: latest
#ceph_docker_image: "ceph/daemon"
#ceph_docker_image_tag: latest
#ceph_osd_docker_extra_env: -e CLUSTER={{ cluster }} -e CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE -e OSD_JOURNAL_SIZE={{ journal_size }}
#ceph_osd_docker_devices: "{{ devices }}"
#ceph_docker_on_openstack: false

View File

@ -46,9 +46,8 @@ dummy:
#rbd_mirror_containerized_deployment_with_kv: false
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#ceph_rbd_mirror_docker_username: ceph
#ceph_rbd_mirror_docker_imagename: daemon
#ceph_rbd_mirror_docker_image_tag: latest
#ceph_docker_image: "ceph/daemon"
#ceph_docker_image_tag: latest
#ceph_docker_on_openstack: false
#ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -21,9 +21,8 @@ dummy:
#restapi_containerized_deployment: false
#ceph_restapi_docker_interface: eth0
#ceph_restapi_port: 5000
#ceph_restapi_docker_username: ceph
#ceph_restapi_docker_imagename: daemon
#ceph_restapi_docker_image_tag: latest
#ceph_docker_image: "ceph/daemon"
#ceph_docker_image_tag: latest
#ceph_restapi_docker_extra_env: "RESTAPI_IP=0.0.0.0" # comma separated variables
#ceph_docker_on_openstack: false
#ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -43,9 +43,8 @@ dummy:
#kv_type: etcd
#kv_endpoint: 127.0.0.1
#ceph_rgw_civetweb_port: "{{ radosgw_civetweb_port }}"
#ceph_rgw_docker_username: ceph
#ceph_rgw_docker_imagename: daemon
#ceph_rgw_docker_image_tag: latest
#ceph_docker_image: "ceph/daemon"
#ceph_docker_image_tag: latest
#ceph_rgw_docker_extra_env: -e CLUSTER={{ cluster }} -e RGW_CIVETWEB_PORT={{ ceph_rgw_civetweb_port }}
#ceph_docker_on_openstack: false
#ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -71,7 +71,7 @@
- name: remove ceph mds container
docker:
image: "{{ ceph_mds_docker_username }}/{{ ceph_mds_docker_imagename }}:{{ ceph_mds_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}"
state: absent
ignore_errors: true
@ -84,8 +84,8 @@
- name: remove ceph mds image
docker_image:
state: absent
name: "{{ ceph_mds_docker_username }}/{{ ceph_mds_docker_imagename }}"
tag: "{{ ceph_mds_docker_image_tag }}"
name: "{{ ceph_docker_image }}"
tag: "{{ ceph_docker_image_tag }}"
force: yes
tags:
remove_img
@ -118,7 +118,7 @@
- name: remove ceph rgw container
docker:
image: "{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}:{{ ceph_rgw_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}"
state: absent
ignore_errors: true
@ -131,8 +131,8 @@
- name: remove ceph rgw image
docker_image:
state: absent
name: "{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}"
tag: "{{ ceph_rgw_docker_image_tag }}"
name: "{{ ceph_docker_image }}"
tag: "{{ ceph_docker_image_tag }}"
force: yes
tags:
remove_img
@ -165,7 +165,7 @@
- name: remove ceph rbd-mirror container
docker:
image: "{{ ceph_rbd_mirror_docker_username }}/{{ ceph_rbd_mirror_docker_imagename }}:{{ ceph_rbd_mirror_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}"
state: absent
ignore_errors: true
@ -178,8 +178,8 @@
- name: remove ceph rbd-mirror image
docker_image:
state: absent
name: "{{ ceph_rbd_mirror_docker_username }}/{{ ceph_rbd_mirror_docker_imagename }}"
tag: "{{ ceph_rbd_mirror_docker_image_tag }}"
name: "{{ ceph_docker_image }}"
tag: "{{ ceph_docker_image_tag }}"
force: yes
tags:
remove_img
@ -212,7 +212,7 @@
- name: remove ceph nfs container
docker:
image: "{{ ceph_nfs_docker_username }}/{{ ceph_nfs_docker_imagename }}:{{ ceph_nfs_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}"
state: absent
ignore_errors: true
@ -234,8 +234,8 @@
- name: remove ceph nfs image
docker_image:
state: absent
name: "{{ ceph_nfs_docker_username }}/{{ ceph_nfs_docker_imagename }}"
tag: "{{ ceph_nfs_docker_image_tag }}"
name: "{{ ceph_docker_image }}"
tag: "{{ ceph_docker_image_tag }}"
force: yes
tags:
remove_img
@ -269,7 +269,7 @@
- name: remove ceph osd prepare container
docker:
image: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-osd-prepare-{{ item | regex_replace('/', '') }}"
state: absent
with_items: "{{ ceph_osd_docker_devices }}"
@ -277,7 +277,7 @@
- name: remove ceph osd container
docker:
image: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-osd-{{ item | regex_replace('/', '') }}"
state: absent
with_items: "{{ ceph_osd_docker_devices }}"
@ -285,7 +285,7 @@
- name: zap ceph osd disk
docker:
image: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-osd-zap-{{ item | regex_replace('/', '') }}"
net: host
pid: host
@ -297,7 +297,7 @@
- name: remove ceph osd zap disk container
docker:
image: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-osd-zap-{{ item | regex_replace('/', '') }}"
state: absent
with_items: "{{ ceph_osd_docker_devices }}"
@ -305,7 +305,7 @@
# zap twice
- name: zap ceph osd disk
docker:
image: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-osd-zap-{{ item | regex_replace('/', '') }}"
net: host
pid: host
@ -317,7 +317,7 @@
- name: remove ceph osd zap disk container
docker:
image: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-osd-zap-{{ item | regex_replace('/', '') }}"
state: absent
with_items: "{{ ceph_osd_docker_devices }}"
@ -330,8 +330,8 @@
- name: remove ceph osd image
docker_image:
state: absent
name: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}"
tag: "{{ ceph_osd_docker_image_tag }}"
name: "{{ ceph_docker_image }}"
tag: "{{ ceph_docker_image_tag }}"
force: yes
tags:
remove_img
@ -368,14 +368,14 @@
- name: remove ceph mon container
docker:
image: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}"
state: absent
ignore_errors: true
- name: remove restapi container
docker:
image: "{{ ceph_restapi_docker_username }}/{{ ceph_restapi_docker_imagename }}:{{ ceph_restapi_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-ceph-restapi"
state: absent
ignore_errors: true
@ -388,8 +388,8 @@
- name: remove ceph mon image
docker_image:
state: absent
name: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}"
tag: "{{ ceph_mon_docker_image_tag }}"
name: "{{ ceph_docker_image }}"
tag: "{{ ceph_docker_image_tag }}"
force: yes
tags:
remove_img

View File

@ -137,19 +137,19 @@
- set_fact:
ceph_uid: 64045
when: ceph_mon_docker_image_tag | match("latest")
when: ceph_docker_image_tag | match("latest")
- set_fact:
ceph_uid: 64045
when: ceph_mon_docker_image_tag | search("ubuntu")
when: ceph_docker_image_tag | search("ubuntu")
- set_fact:
ceph_uid: 167
when: ceph_mon_docker_image_tag | search("centos")
when: ceph_docker_image_tag | search("centos")
- set_fact:
ceph_uid: 167
when: ceph_mon_docker_image_tag | search("fedora")
when: ceph_docker_image_tag | search("fedora")
- name: set proper ownership on ceph directories
file:
@ -162,7 +162,7 @@
- name: start ceph mon container image
docker:
image: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}"
net: "host"
state: "running"
@ -221,19 +221,19 @@
- set_fact:
ceph_uid: 64045
when: ceph_osd_docker_image_tag | match("latest")
when: ceph_docker_image_tag | match("latest")
- set_fact:
ceph_uid: 64045
when: ceph_osd_docker_image_tag | search("ubuntu")
when: ceph_docker_image_tag | search("ubuntu")
- set_fact:
ceph_uid: 167
when: ceph_osd_docker_image_tag | search("centos")
when: ceph_docker_image_tag | search("centos")
- set_fact:
ceph_uid: 167
when: ceph_osd_docker_image_tag | search("fedora")
when: ceph_docker_image_tag | search("fedora")
- name: set proper ownership on ceph directories
file:
@ -265,7 +265,7 @@
- name: start ceph osd container image(s)
docker:
image: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-osd-{{ item | regex_replace('/', '') }}"
net: host
pid: host
@ -313,19 +313,19 @@
- set_fact:
ceph_uid: 64045
when: ceph_mds_docker_image_tag | match("latest")
when: ceph_docker_image_tag | match("latest")
- set_fact:
ceph_uid: 64045
when: ceph_mds_docker_image_tag | search("ubuntu")
when: ceph_docker_image_tag | search("ubuntu")
- set_fact:
ceph_uid: 167
when: ceph_mds_docker_image_tag | search("centos")
when: ceph_docker_image_tag | search("centos")
- set_fact:
ceph_uid: 167
when: ceph_mds_docker_image_tag | search("fedora")
when: ceph_docker_image_tag | search("fedora")
- name: set proper ownership on ceph directories
file:
@ -338,7 +338,7 @@
- name: start ceph metadata container image
docker:
image: "{{ ceph_mds_docker_username }}/{{ ceph_mds_docker_imagename }}:{{ ceph_mds_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: ceph-{{ ansible_hostname }}-mds
net: host
state: running
@ -373,19 +373,19 @@
- set_fact:
ceph_uid: 64045
when: ceph_rgw_docker_image_tag | match("latest")
when: ceph_docker_image_tag | match("latest")
- set_fact:
ceph_uid: 64045
when: ceph_rgw_docker_image_tag | search("ubuntu")
when: ceph_docker_image_tag | search("ubuntu")
- set_fact:
ceph_uid: 167
when: ceph_rgw_docker_image_tag | search("centos")
when: ceph_docker_image_tag | search("centos")
- set_fact:
ceph_uid: 167
when: ceph_rgw_docker_image_tag | search("fedora")
when: ceph_docker_image_tag | search("fedora")
- name: set proper ownership on ceph directories
file:
@ -398,7 +398,7 @@
- name: start ceph rados gateway container image
docker:
image: "{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}:{{ ceph_rgw_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: ceph-{{ ansible_hostname }}-rgw
expose: "{{ ceph_rgw_civetweb_port }}"
ports: "{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}"
@ -434,19 +434,19 @@
- set_fact:
ceph_uid: 64045
when: ceph_rbd_mirror_docker_image_tag | match("latest")
when: ceph_docker_image_tag | match("latest")
- set_fact:
ceph_uid: 64045
when: ceph_rbd_mirror_docker_image_tag | search("ubuntu")
when: ceph_docker_image_tag | search("ubuntu")
- set_fact:
ceph_uid: 167
when: ceph_rbd_mirror_docker_image_tag | search("centos")
when: ceph_docker_image_tag | search("centos")
- set_fact:
ceph_uid: 167
when: ceph_rbd_mirror_docker_image_tag | search("fedora")
when: ceph_docker_image_tag | search("fedora")
- name: set proper ownership on ceph directories
file:
@ -459,7 +459,7 @@
- name: start ceph rbd mirror container image
docker:
image: "{{ ceph_rbd_mirror_docker_username }}/{{ ceph_rbd_mirror_docker_imagename }}:{{ ceph_rbd_mirror_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}"
net: host
state: running
@ -493,19 +493,19 @@
- set_fact:
ceph_uid: 64045
when: ceph_nfs_docker_image_tag | match("latest")
when: ceph_docker_image_tag | match("latest")
- set_fact:
ceph_uid: 64045
when: ceph_nfs_docker_image_tag | search("ubuntu")
when: ceph_docker_image_tag | search("ubuntu")
- set_fact:
ceph_uid: 167
when: ceph_nfs_docker_image_tag | search("centos")
when: ceph_docker_image_tag | search("centos")
- set_fact:
ceph_uid: 167
when: ceph_nfs_docker_image_tag | search("fedora")
when: ceph_docker_image_tag | search("fedora")
- name: set proper ownership on ceph directories
file:
@ -518,7 +518,7 @@
- name: start ceph nfs container image
docker:
image: "{{ ceph_nfs_docker_username }}/{{ ceph_nfs_docker_imagename }}:{{ ceph_nfs_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}"
net: "host"
state: "running"

View 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

View 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

View File

@ -24,9 +24,8 @@ mds_containerized_deployment: false
mds_containerized_deployment_with_kv: false
kv_type: etcd
kv_endpoint: 127.0.0.1
ceph_mds_docker_username: ceph
ceph_mds_docker_imagename: daemon
ceph_mds_docker_image_tag: latest
ceph_docker_image: "ceph/daemon"
ceph_docker_image_tag: latest
ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
ceph_docker_on_openstack: false
ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -1,6 +1,6 @@
---
- name: check if a cluster is already running
shell: "docker ps | grep -sq '{{ceph_mds_docker_username}}/{{ceph_mds_docker_imagename}}:{{ceph_mds_docker_image_tag}}'"
command: "docker ps -q -a --filter='ancestor={{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'"
register: ceph_health
changed_when: false
failed_when: false
@ -41,10 +41,6 @@
- ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml"
vars:
ceph_docker_username: "{{ ceph_mds_docker_username }}"
ceph_docker_imagename: "{{ ceph_mds_docker_imagename }}"
ceph_docker_image_tag: "{{ ceph_mds_docker_image_tag }}"
- include: dirs_permissions.yml
- include: fetch_configs.yml

View File

@ -20,7 +20,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
-e CEPHFS_CREATE=1 \
{{ ceph_mds_docker_extra_env }} \
--name={{ ansible_hostname }} \
{{ ceph_docker_registry }}/{{ ceph_mds_docker_username }}/{{ ceph_mds_docker_imagename }}:{{ ceph_mds_docker_image_tag }}
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
Restart=always
RestartSec=10s

View File

@ -73,9 +73,8 @@ mon_containerized_deployment_with_kv: false
#mon_containerized_default_ceph_conf_with_kv: false
ceph_mon_docker_interface: "{{ monitor_interface }}"
ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the ceph_mon_docker_interface
ceph_mon_docker_username: ceph
ceph_mon_docker_imagename: daemon
ceph_mon_docker_image_tag: latest
ceph_docker_image: "ceph/daemon"
ceph_docker_image_tag: latest
ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }} -e MON_NAME={{ ansible_hostname }}
ceph_docker_on_openstack: false
mon_docker_privileged: false

View File

@ -1,6 +1,6 @@
---
- name: check if a cluster is already running
shell: "docker ps | grep -sq '{{ceph_mon_docker_username}}/{{ceph_mon_docker_imagename}}:{{ceph_mon_docker_image_tag}}'"
command: "docker ps -q -a --filter='ancestor={{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'"
register: ceph_health
changed_when: false
failed_when: false
@ -42,10 +42,6 @@
- ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml"
vars:
ceph_docker_username: "{{ ceph_mon_docker_username }}"
ceph_docker_imagename: "{{ ceph_mon_docker_imagename }}"
ceph_docker_image_tag: "{{ ceph_mon_docker_image_tag }}"
- include: dirs_permissions.yml

View File

@ -129,7 +129,7 @@
tags:
with_pkg
when: ansible_version['full'] | version_compare('2.1.0.0', '<')
- name: install docker-py
pip:
name: docker-py

View File

@ -2,7 +2,7 @@
- name: populate kv_store with default ceph.conf
docker:
name: populate-kv-store
image: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
command: populate_kvstore
net: host
env:
@ -18,7 +18,7 @@
- name: populate kv_store with custom ceph.conf
docker:
name: populate-kv-store
image: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
command: populate_kvstore
net: host
env:
@ -37,7 +37,7 @@
docker:
name: populate-kv-store
state: absent
image: "{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
when: mon_containerized_deployment_with_kv
- name: generate systemd unit file

View File

@ -26,7 +26,7 @@ ExecStart=/usr/bin/docker run --rm --name %i --net=host \
-e MON_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_mon_docker_interface]['ipv4']['address'] }} \
-e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
{{ ceph_mon_docker_extra_env }} \
{{ceph_docker_registry }}/{{ ceph_mon_docker_username }}/{{ ceph_mon_docker_imagename }}:{{ ceph_mon_docker_image_tag }}
{{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/docker stop %i
Restart=always
RestartSec=10s

View File

@ -77,9 +77,8 @@ nfs_containerized_deployment: false
nfs_containerized_deployment_with_kv: false
kv_type: etcd
kv_endpoint: 127.0.0.1
ceph_nfs_docker_username: ceph
ceph_nfs_docker_imagename: ganesha
ceph_nfs_docker_image_tag: latest
ceph_docker_image: "ceph/ganesha"
ceph_docker_image_tag: latest
#ceph_nfs_docker_extra_env: -e GANESHA_EPOCH={{ ganesha_epoch }}
ceph_docker_on_openstack: false
ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -9,7 +9,7 @@
- name: create the nfs rgw user
docker:
image: "{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}:{{ ceph_rgw_docker_image_tag }}"
image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: ceph-{{ ansible_hostname }}-rgw-user
hostname: "{{ ansible_hostname }}"
expose: "{{ ceph_rgw_civetweb_port }}"

View File

@ -1,6 +1,6 @@
---
- name: check if a cluster is already running
shell: "docker ps | grep -sq '{{ceph_nfs_docker_username}}/{{ceph_nfs_docker_imagename}}:{{ceph_nfs_docker_image_tag}}'"
command: "docker ps -q -a --filter='ancestor={{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'"
register: ceph_health
changed_when: false
failed_when: false
@ -41,10 +41,6 @@
- ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml"
vars:
ceph_docker_username: "{{ ceph_nfs_docker_username }}"
ceph_docker_imagename: "{{ ceph_nfs_docker_imagename }}"
ceph_docker_image_tag: "{{ ceph_nfs_docker_image_tag }}"
- include: dirs_permissions.yml

View File

@ -20,7 +20,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
-e CEPH_DAEMON=NFS \
{{ ceph_nfs_docker_extra_env }} \
--name=nfs-{{ ansible_hostname }} \
{{ ceph_docker_registry }}/{{ ceph_nfs_docker_username }}/{{ ceph_nfs_docker_imagename }}:{{ ceph_nfs_docker_image_tag }}
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/docker stop %i
Restart=always
RestartSec=10s

View File

@ -169,9 +169,8 @@ kv_type: etcd
kv_endpoint: 127.0.0.1
kv_port: 4001
ceph_osd_docker_prepare_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1
ceph_osd_docker_username: ceph
ceph_osd_docker_imagename: daemon
ceph_osd_docker_image_tag: latest
ceph_docker_image: "ceph/daemon"
ceph_docker_image_tag: latest
ceph_osd_docker_extra_env: -e CLUSTER={{ cluster }} -e CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE -e OSD_JOURNAL_SIZE={{ journal_size }}
ceph_osd_docker_devices: "{{ devices }}"
ceph_docker_on_openstack: false

View File

@ -1,6 +1,6 @@
---
- name: check if a cluster is already running
shell: "docker ps | grep -sq '{{ceph_osd_docker_username}}/{{ceph_osd_docker_imagename}}:{{ceph_osd_docker_image_tag}}'"
command: "docker ps -q -a --filter='ancestor={{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'"
register: ceph_health
changed_when: false
failed_when: false
@ -42,10 +42,6 @@
- ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml"
vars:
ceph_docker_username: '{{ ceph_osd_docker_username }}'
ceph_docker_imagename: '{{ ceph_osd_docker_imagename }}'
ceph_docker_image_tag: '{{ ceph_osd_docker_image_tag }}'
# NOTE (jimcurtis): dirs_permissions.yml must precede fetch_configs.yml
# because it creates the directories needed by the latter.

View File

@ -117,7 +117,7 @@
tags:
with_pkg
when: ansible_version['full'] | version_compare('2.1.0.0', '<')
- name: install docker-py
pip:
name: docker-py

View File

@ -33,7 +33,7 @@
-e "OSD_DEVICE={{ item.0 }}" \
-e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \
{{ ceph_osd_docker_prepare_env }} \
"{{ ceph_docker_registry }}/{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
"{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
with_together:
- "{{ ceph_osd_docker_devices }}"
- "{{ osd_prepared.results }}"
@ -58,7 +58,7 @@
-e KV_IP={{kv_endpoint}} \
-e KV_PORT={{kv_port}} \
{{ ceph_osd_docker_prepare_env }} \
"{{ ceph_docker_registry }}/{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}" \
"{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" \
with_together:
- "{{ ceph_osd_docker_devices }}"
- "{{ osd_prepared.results }}"

View File

@ -22,7 +22,7 @@ ExecStart=/usr/bin/docker run --rm --net=host --pid=host\
-e OSD_DEVICE=/dev/%i \
{{ ceph_osd_docker_extra_env }} \
--name={{ ansible_hostname }}-osd-dev%i \
{{ ceph_docker_registry }}/{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStop=-/usr/bin/docker stop {{ ansible_hostname }}-osd-dev%i
Restart=always
RestartSec=10s

View File

@ -38,8 +38,7 @@ rbd_mirror_containerized_deployment: false
rbd_mirror_containerized_deployment_with_kv: false
kv_type: etcd
kv_endpoint: 127.0.0.1
ceph_rbd_mirror_docker_username: ceph
ceph_rbd_mirror_docker_imagename: daemon
ceph_rbd_mirror_docker_image_tag: latest
ceph_docker_image: "ceph/daemon"
ceph_docker_image_tag: latest
ceph_docker_on_openstack: false
ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -1,6 +1,6 @@
---
- name: check if a cluster is already running
shell: "docker ps | grep -sq '{{ceph_rbd_mirror_docker_username}}/{{ceph_rbd_mirror_docker_imagename}}:{{ceph_rbd_mirror_docker_image_tag}}'"
command: "docker ps -q -a --filter='ancestor={{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'"
register: ceph_health
changed_when: false
failed_when: false
@ -39,10 +39,6 @@
- ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml"
vars:
ceph_docker_username: "{{ ceph_rbd_mirror_docker_username }}"
ceph_docker_imagename: "{{ ceph_rbd_mirror_docker_imagename }}"
ceph_docker_image_tag: "{{ ceph_rbd_mirror_docker_image_tag }}"
- include: dirs_permissions.yml
- include: fetch_configs.yml

View File

@ -17,7 +17,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
--privileged \
-e CEPH_DAEMON=RBD_MIRROR \
--name={{ ansible_hostname }} \
{{ ceph_docker_registry }}/{{ ceph_rbd_mirror_docker_username }}/{{ ceph_rbd_mirror_docker_imagename }}:{{ ceph_rbd_mirror_docker_image_tag }}
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
Restart=always
RestartSec=10s

View File

@ -13,9 +13,8 @@ fetch_directory: fetch/
restapi_containerized_deployment: false
ceph_restapi_docker_interface: eth0
ceph_restapi_port: 5000
ceph_restapi_docker_username: ceph
ceph_restapi_docker_imagename: daemon
ceph_restapi_docker_image_tag: latest
ceph_docker_image: "ceph/daemon"
ceph_docker_image_tag: latest
ceph_restapi_docker_extra_env: "RESTAPI_IP=0.0.0.0" # comma separated variables
ceph_docker_on_openstack: false
ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -29,10 +29,6 @@
- ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml"
vars:
ceph_docker_username: "{{ ceph_restapi_docker_username }}"
ceph_docker_imagename: "{{ ceph_restapi_docker_imagename }}"
ceph_docker_image_tag: "{{ ceph_restapi_docker_image_tag }}"
- include: dirs_permissions.yml
- include: fetch_configs.yml
- include: start_docker_restapi.yml

View File

@ -1,7 +1,7 @@
---
- name: run the ceph rest api docker image
docker:
image: "{{ ceph_docker_registry }}/{{ ceph_restapi_docker_username }}/{{ ceph_restapi_docker_imagename }}:{{ ceph_restapi_docker_image_tag }}"
image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "{{ ansible_hostname }}-ceph-restapi"
net: host
expose: "{{ ceph_restapi_port }}"

View File

@ -35,9 +35,8 @@ rgw_containerized_deployment_with_kv: false
kv_type: etcd
kv_endpoint: 127.0.0.1
ceph_rgw_civetweb_port: "{{ radosgw_civetweb_port }}"
ceph_rgw_docker_username: ceph
ceph_rgw_docker_imagename: daemon
ceph_rgw_docker_image_tag: latest
ceph_docker_image: "ceph/daemon"
ceph_docker_image_tag: latest
ceph_rgw_docker_extra_env: -e CLUSTER={{ cluster }} -e RGW_CIVETWEB_PORT={{ ceph_rgw_civetweb_port }}
ceph_docker_on_openstack: false
ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -1,6 +1,6 @@
---
- name: check if a cluster is already running
shell: "docker ps | grep -sq '{{ceph_rgw_docker_username}}/{{ceph_rgw_docker_imagename}}:{{ceph_rgw_docker_image_tag}}'"
command: "docker ps -q -a --filter='ancestor={{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'"
register: ceph_health
changed_when: false
failed_when: false
@ -41,10 +41,6 @@
- ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml"
vars:
ceph_docker_username: "{{ ceph_rgw_docker_username }}"
ceph_docker_imagename: "{{ ceph_rgw_docker_imagename }}"
ceph_docker_image_tag: "{{ ceph_rgw_docker_image_tag }}"
- include: dirs_permissions.yml
# NOTE (jimcurtis): dirs_permissions.yml must precede fetch_configs.yml
# because it creates the directories needed by the latter.

View File

@ -19,7 +19,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
-e CEPH_DAEMON=RGW \
{{ ceph_rgw_docker_extra_env }} \
--name={{ ansible_hostname }} \
{{ ceph_docker_registry }}/{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}:{{ ceph_rgw_docker_image_tag }}
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
Restart=always
RestartSec=10s