Merge pull request #951 from ceph/fix-docker-cluster-name

Fix docker cluster name
pull/956/head
Leseb 2016-08-24 09:44:40 +02:00 committed by GitHub
commit e017386645
24 changed files with 75 additions and 74 deletions

6
Vagrantfile vendored
View File

@ -75,13 +75,15 @@ ansible_provision = proc do |ansible|
rbd_mirror_containerized_deployment: 'true',
ceph_mon_docker_interface: ETH,
ceph_mon_docker_subnet: "#{SUBNET}.0/24",
ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK,OSD_JOURNAL_SIZE=100",
ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE,OSD_JOURNAL_SIZE=100",
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
ceph_osd_docker_devices: settings['disks'],
# Note that OSVM is defaulted to false above
ceph_docker_on_openstack: OSVM,
ceph_rgw_civetweb_port: 8080
ceph_rgw_civetweb_port: 8080,
generate_fsid: 'true',
journal_size: 100,
}
else
ansible.extra_vars = {

View File

@ -145,7 +145,7 @@ dummy:
#ceph_osd_docker_username: ceph
#ceph_osd_docker_imagename: daemon
#ceph_osd_docker_image_tag: latest
#ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK" # comma separated variables
#ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE" # comma separated variables
#ceph_osd_docker_devices:
# - /dev/sdb
#ceph_docker_on_openstack: false

View File

@ -1,3 +1,3 @@
# {{ ansible_managed }}
#!/bin/sh
exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n client.radosgw.{{ ansible_hostname }}
exec /usr/bin/radosgw -c /etc/ceph/{{ cluster }}.conf -n client.radosgw.{{ ansible_hostname }}

View File

@ -2,13 +2,13 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/ceph.conf
- /etc/ceph/monmap
- /etc/ceph/ceph.mon.keyring
- /var/lib/ceph/bootstrap-osd/ceph.keyring
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
- /var/lib/ceph/bootstrap-mds/ceph.keyring
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/monmap-{{ cluster }}
- /etc/ceph/{{ cluster }}.mon.keyring
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- name: stat for ceph config and keys
stat:

View File

@ -4,9 +4,9 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.conf
- /etc/ceph/ceph.client.admin.keyring
- /var/lib/ceph/bootstrap-mds/ceph.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- name: stat for ceph config and keys
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}

View File

@ -2,13 +2,13 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/ceph.conf
- /etc/ceph/monmap
- /etc/ceph/ceph.mon.keyring
- /var/lib/ceph/bootstrap-osd/ceph.keyring
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
- /var/lib/ceph/bootstrap-mds/ceph.keyring
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/monmap-{{ cluster }}
- /etc/ceph/{{ cluster }}.mon.keyring
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- name: stat for ceph config and keys
stat:

View File

@ -25,7 +25,7 @@
action: config_template
args:
src: "{{ playbook_dir }}/roles/ceph-common/templates/ceph.conf.j2"
dest: /etc/ceph/ceph.conf
dest: "/etc/ceph/{{ cluster }}.conf"
owner: "root"
group: "root"
mode: "0644"

View File

@ -2,13 +2,13 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.conf
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/monmap
- /etc/ceph/ceph.mon.keyring
- /var/lib/ceph/bootstrap-osd/ceph.keyring
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
- /var/lib/ceph/bootstrap-mds/ceph.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /etc/ceph/monmap-{{ cluster }}
- /etc/ceph/{{ cluster }}.mon.keyring
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- name: stat for ceph config and keys
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}

View File

@ -48,7 +48,6 @@
# let the first mon create configs and keyrings
- include: create_configs.yml
when:
- inventory_hostname == groups.mons[0]
- not mon_containerized_default_ceph_conf_with_kv
- include: fetch_configs.yml

View File

@ -26,7 +26,7 @@
KV_IP: "{{kv_endpoint}}"
KV_PORT: "{{kv_port}}"
volumes:
- /etc/ceph/ceph.conf:/etc/ceph/ceph.defaults
- /etc/ceph/"{{ cluster }}".conf:/etc/ceph/ceph.defaults
run_once: true
when:
- inventory_hostname == groups.mons[0]
@ -74,7 +74,7 @@
- name: wait for ceph.conf exists
wait_for:
path: /etc/ceph/ceph.conf
path: "/etc/ceph/{{ cluster }}.conf"
when: ansible_os_family == 'RedHat'
- name: run the ceph monitor docker image

View File

@ -2,10 +2,10 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/ceph.conf
- /etc/ceph/monmap
- /etc/ceph/ceph.mon.keyring
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/monmap-{{ cluster }}
- /etc/ceph/{{ cluster }}.mon.keyring
- /etc/ganesha/ganesha.conf
- name: stat for ceph config and keys

View File

@ -2,8 +2,8 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.conf
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /var/lib/ceph/radosgw/keyring
- name: stat for config and keys

View File

@ -49,7 +49,7 @@
- name: wait for ceph.conf exists
wait_for:
path: /etc/ceph/ceph.conf
path: "/etc/ceph/{{ cluster }}.conf"
when: is_atomic
- name: run the ceph NFS docker image

View File

@ -137,7 +137,7 @@ ceph_osd_docker_prepare_env: "OSD_FORCE_ZAP=1"
ceph_osd_docker_username: ceph
ceph_osd_docker_imagename: daemon
ceph_osd_docker_image_tag: latest
ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK" # comma separated variables
ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE" # comma separated variables
#ceph_osd_docker_devices:
# - /dev/sdb
ceph_docker_on_openstack: false

View File

@ -2,13 +2,13 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/ceph.conf
- /etc/ceph/monmap
- /etc/ceph/ceph.mon.keyring
- /var/lib/ceph/bootstrap-osd/ceph.keyring
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
- /var/lib/ceph/bootstrap-mds/ceph.keyring
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/monmap-{{ cluster }}
- /etc/ceph/{{ cluster }}.mon.keyring
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- name: stat for ceph config and keys
stat:

View File

@ -2,8 +2,8 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.conf
- /var/lib/ceph/bootstrap-osd/ceph.keyring
- /etc/ceph/{{ cluster }}.conf
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- name: wait for ceph.conf and keys
local_action: >

View File

@ -31,7 +31,7 @@
-v /etc/localtime:/etc/localtime:ro \
-e "OSD_DEVICE={{ item.0 }}" \
-e "{{ ceph_osd_docker_prepare_env }}" \
-e CEPH_DAEMON=osd_ceph_disk_prepare \
-e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \
"{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
with_together:
- ceph_osd_docker_devices
@ -52,7 +52,7 @@
-v /etc/localtime:/etc/localtime:ro \
-e "OSD_DEVICE={{ item.0 }}" \
-e "{{ ceph_osd_docker_prepare_env }}" \
-e CEPH_DAEMON=osd_ceph_disk_prepare \
-e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \
-e KV_TYPE={{kv_type}} \
-e KV_IP={{kv_endpoint}} \
-e KV_PORT={{kv_port}} \

View File

@ -2,13 +2,13 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/ceph.conf
- /etc/ceph/monmap
- /etc/ceph/ceph.mon.keyring
- /var/lib/ceph/bootstrap-osd/ceph.keyring
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
- /var/lib/ceph/bootstrap-mds/ceph.keyring
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/monmap-{{ cluster }}
- /etc/ceph/{{ cluster }}.mon.keyring
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- name: stat for ceph config and keys
stat:

View File

@ -4,8 +4,8 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.conf
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/{{ cluster }}.client.admin.keyring
- name: stat for ceph config and keys
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}

View File

@ -2,8 +2,8 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.conf
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/{{ cluster }}.client.admin.keyring
- name: stat for ceph config and keys
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}

View File

@ -2,13 +2,13 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.client.admin.keyring
- /etc/ceph/ceph.conf
- /etc/ceph/monmap
- /etc/ceph/ceph.mon.keyring
- /var/lib/ceph/bootstrap-osd/ceph.keyring
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
- /var/lib/ceph/bootstrap-mds/ceph.keyring
- /etc/ceph/{{ cluster }}.client.admin.keyring
- /etc/ceph/{{ cluster }}.conf
- /etc/ceph/monmap-{{ cluster }}
- /etc/ceph/{{ cluster }}.mon.keyring
- /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring
- name: stat for ceph config and keys
stat:

View File

@ -2,8 +2,8 @@
- name: set config and keys paths
set_fact:
ceph_config_keys:
- /etc/ceph/ceph.conf
- /var/lib/ceph/bootstrap-rgw/ceph.keyring
- /etc/ceph/{{ cluster }}.conf
- /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring
- name: stat for ceph config and keys
local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}

View File

@ -21,7 +21,7 @@
- name: delete zone from rgw stanza in ceph.conf
lineinfile:
dest: /etc/ceph/ceph.conf
dest: "/etc/ceph/{{ cluster }}.conf"
regexp: "rgw_zone = {{ rgw_zonegroup }}-{{ rgw_zone }}"
state: absent
when: "rgw_zone is defined and rgw_zonegroup is defined"

View File

@ -18,7 +18,7 @@
# Continue with common tasks
- name: add zone to rgw stanza in ceph.conf
lineinfile:
dest: /etc/ceph/ceph.conf
dest: "/etc/ceph/{{ cluster }}.conf"
regexp: "{{ ansible_host }}"
insertafter: "^[client.rgw.{{ ansible_host }}]"
line: "rgw_zone = {{ rgw_zone }}"