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 #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 # 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 # by ceph.conf.j2 template. so it should always be defined

View File

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

View File

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

View File

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

View File

@ -177,9 +177,8 @@ dummy:
#kv_endpoint: 127.0.0.1 #kv_endpoint: 127.0.0.1
#kv_port: 4001 #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_prepare_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1
#ceph_osd_docker_username: ceph #ceph_docker_image: "ceph/daemon"
#ceph_osd_docker_imagename: daemon #ceph_docker_image_tag: latest
#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_extra_env: -e CLUSTER={{ cluster }} -e CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE -e OSD_JOURNAL_SIZE={{ journal_size }}
#ceph_osd_docker_devices: "{{ devices }}" #ceph_osd_docker_devices: "{{ devices }}"
#ceph_docker_on_openstack: false #ceph_docker_on_openstack: false

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -385,6 +385,8 @@ os_tuning_params:
########## ##########
docker: false 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 # 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 # by ceph.conf.j2 template. so it should always be defined

View File

@ -1,7 +1,7 @@
--- ---
# Normal case - pull image from registry # Normal case - pull image from registry
- name: pull ceph daemon image - name: "pull {{ ceph_docker_image }} image"
command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_username }}/{{ ceph_docker_imagename }}:{{ ceph_docker_image_tag }}" command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
changed_when: false changed_when: false
when: ceph_docker_dev_image is undefined or not ceph_docker_dev_image 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 mds_containerized_deployment_with_kv: false
kv_type: etcd kv_type: etcd
kv_endpoint: 127.0.0.1 kv_endpoint: 127.0.0.1
ceph_mds_docker_username: ceph ceph_docker_image: "ceph/daemon"
ceph_mds_docker_imagename: daemon ceph_docker_image_tag: latest
ceph_mds_docker_image_tag: latest
ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }} ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
ceph_docker_on_openstack: false ceph_docker_on_openstack: false
ceph_config_keys: [] # DON'T TOUCH ME ceph_config_keys: [] # DON'T TOUCH ME

View File

@ -1,6 +1,6 @@
--- ---
- name: check if a cluster is already running - 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 register: ceph_health
changed_when: false changed_when: false
failed_when: false failed_when: false
@ -41,10 +41,6 @@
- ntp_service_enabled - ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml" - 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: dirs_permissions.yml
- include: fetch_configs.yml - include: fetch_configs.yml

View File

@ -20,7 +20,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
-e CEPHFS_CREATE=1 \ -e CEPHFS_CREATE=1 \
{{ ceph_mds_docker_extra_env }} \ {{ ceph_mds_docker_extra_env }} \
--name={{ ansible_hostname }} \ --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 }} ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
Restart=always Restart=always
RestartSec=10s RestartSec=10s

View File

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

View File

@ -1,6 +1,6 @@
--- ---
- name: check if a cluster is already running - 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 register: ceph_health
changed_when: false changed_when: false
failed_when: false failed_when: false
@ -42,10 +42,6 @@
- ntp_service_enabled - ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml" - 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 - include: dirs_permissions.yml

View File

@ -2,7 +2,7 @@
- name: populate kv_store with default ceph.conf - name: populate kv_store with default ceph.conf
docker: docker:
name: populate-kv-store 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 command: populate_kvstore
net: host net: host
env: env:
@ -18,7 +18,7 @@
- name: populate kv_store with custom ceph.conf - name: populate kv_store with custom ceph.conf
docker: docker:
name: populate-kv-store 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 command: populate_kvstore
net: host net: host
env: env:
@ -37,7 +37,7 @@
docker: docker:
name: populate-kv-store name: populate-kv-store
state: absent 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 when: mon_containerized_deployment_with_kv
- name: generate systemd unit file - 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 MON_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_mon_docker_interface]['ipv4']['address'] }} \
-e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \ -e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
{{ ceph_mon_docker_extra_env }} \ {{ 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 ExecStopPost=-/usr/bin/docker stop %i
Restart=always Restart=always
RestartSec=10s RestartSec=10s

View File

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

View File

@ -9,7 +9,7 @@
- name: create the nfs rgw user - name: create the nfs rgw user
docker: 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 name: ceph-{{ ansible_hostname }}-rgw-user
hostname: "{{ ansible_hostname }}" hostname: "{{ ansible_hostname }}"
expose: "{{ ceph_rgw_civetweb_port }}" expose: "{{ ceph_rgw_civetweb_port }}"

View File

@ -1,6 +1,6 @@
--- ---
- name: check if a cluster is already running - 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 register: ceph_health
changed_when: false changed_when: false
failed_when: false failed_when: false
@ -41,10 +41,6 @@
- ntp_service_enabled - ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml" - 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 - include: dirs_permissions.yml

View File

@ -20,7 +20,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
-e CEPH_DAEMON=NFS \ -e CEPH_DAEMON=NFS \
{{ ceph_nfs_docker_extra_env }} \ {{ ceph_nfs_docker_extra_env }} \
--name=nfs-{{ ansible_hostname }} \ --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 ExecStopPost=-/usr/bin/docker stop %i
Restart=always Restart=always
RestartSec=10s RestartSec=10s

View File

@ -169,9 +169,8 @@ kv_type: etcd
kv_endpoint: 127.0.0.1 kv_endpoint: 127.0.0.1
kv_port: 4001 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_prepare_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1
ceph_osd_docker_username: ceph ceph_docker_image: "ceph/daemon"
ceph_osd_docker_imagename: daemon ceph_docker_image_tag: latest
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_extra_env: -e CLUSTER={{ cluster }} -e CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE -e OSD_JOURNAL_SIZE={{ journal_size }}
ceph_osd_docker_devices: "{{ devices }}" ceph_osd_docker_devices: "{{ devices }}"
ceph_docker_on_openstack: false ceph_docker_on_openstack: false

View File

@ -1,6 +1,6 @@
--- ---
- name: check if a cluster is already running - 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 register: ceph_health
changed_when: false changed_when: false
failed_when: false failed_when: false
@ -42,10 +42,6 @@
- ntp_service_enabled - ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml" - 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 # NOTE (jimcurtis): dirs_permissions.yml must precede fetch_configs.yml
# because it creates the directories needed by the latter. # because it creates the directories needed by the latter.

View File

@ -33,7 +33,7 @@
-e "OSD_DEVICE={{ item.0 }}" \ -e "OSD_DEVICE={{ item.0 }}" \
-e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \ -e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \
{{ ceph_osd_docker_prepare_env }} \ {{ 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: with_together:
- "{{ ceph_osd_docker_devices }}" - "{{ ceph_osd_docker_devices }}"
- "{{ osd_prepared.results }}" - "{{ osd_prepared.results }}"
@ -58,7 +58,7 @@
-e KV_IP={{kv_endpoint}} \ -e KV_IP={{kv_endpoint}} \
-e KV_PORT={{kv_port}} \ -e KV_PORT={{kv_port}} \
{{ ceph_osd_docker_prepare_env }} \ {{ 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: with_together:
- "{{ ceph_osd_docker_devices }}" - "{{ ceph_osd_docker_devices }}"
- "{{ osd_prepared.results }}" - "{{ osd_prepared.results }}"

View File

@ -22,7 +22,7 @@ ExecStart=/usr/bin/docker run --rm --net=host --pid=host\
-e OSD_DEVICE=/dev/%i \ -e OSD_DEVICE=/dev/%i \
{{ ceph_osd_docker_extra_env }} \ {{ ceph_osd_docker_extra_env }} \
--name={{ ansible_hostname }}-osd-dev%i \ --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 ExecStop=-/usr/bin/docker stop {{ ansible_hostname }}-osd-dev%i
Restart=always Restart=always
RestartSec=10s RestartSec=10s

View File

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

View File

@ -1,6 +1,6 @@
--- ---
- name: check if a cluster is already running - 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 register: ceph_health
changed_when: false changed_when: false
failed_when: false failed_when: false
@ -39,10 +39,6 @@
- ntp_service_enabled - ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml" - 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: dirs_permissions.yml
- include: fetch_configs.yml - include: fetch_configs.yml

View File

@ -17,7 +17,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
--privileged \ --privileged \
-e CEPH_DAEMON=RBD_MIRROR \ -e CEPH_DAEMON=RBD_MIRROR \
--name={{ ansible_hostname }} \ --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 }} ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
Restart=always Restart=always
RestartSec=10s RestartSec=10s

View File

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

View File

@ -29,10 +29,6 @@
- ntp_service_enabled - ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml" - 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: dirs_permissions.yml
- include: fetch_configs.yml - include: fetch_configs.yml
- include: start_docker_restapi.yml - include: start_docker_restapi.yml

View File

@ -1,7 +1,7 @@
--- ---
- name: run the ceph rest api docker image - name: run the ceph rest api docker image
docker: 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" name: "{{ ansible_hostname }}-ceph-restapi"
net: host net: host
expose: "{{ ceph_restapi_port }}" expose: "{{ ceph_restapi_port }}"

View File

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

View File

@ -1,6 +1,6 @@
--- ---
- name: check if a cluster is already running - 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 register: ceph_health
changed_when: false changed_when: false
failed_when: false failed_when: false
@ -41,10 +41,6 @@
- ntp_service_enabled - ntp_service_enabled
- include: "{{ playbook_dir }}/roles/ceph-common/tasks/docker/fetch_image.yml" - 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 - include: dirs_permissions.yml
# NOTE (jimcurtis): dirs_permissions.yml must precede fetch_configs.yml # NOTE (jimcurtis): dirs_permissions.yml must precede fetch_configs.yml
# because it creates the directories needed by the latter. # 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 \ -e CEPH_DAEMON=RGW \
{{ ceph_rgw_docker_extra_env }} \ {{ ceph_rgw_docker_extra_env }} \
--name={{ ansible_hostname }} \ --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 }} ExecStopPost=-/usr/bin/docker stop {{ ansible_hostname }}
Restart=always Restart=always
RestartSec=10s RestartSec=10s