Implement ceph-mgr service

ceph-mgr service is mandatory in ceph luminous

Depends-On: I875f84012a92d4f8b9dcb212d917cf61167270b8
Change-Id: I9418bf40a4bc3dcfc07c8b2eae17cb5779f5b444
Implements: blueprint ceph-luminous
This commit is contained in:
Jeffrey Zhang 2017-12-05 16:12:54 +08:00
parent 960320cc78
commit 8acb775548
9 changed files with 73 additions and 0 deletions

View File

@ -290,6 +290,9 @@ neutron
neutron
# Ceph
[ceph-mgr:children]
ceph
[ceph-mon:children]
ceph

View File

@ -308,6 +308,9 @@ neutron
neutron
# Ceph
[ceph-mgr:children]
ceph
[ceph-mon:children]
ceph

View File

@ -12,6 +12,10 @@ ceph_mon_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker
ceph_mon_tag: "{{ ceph_tag }}"
ceph_mon_image_full: "{{ ceph_mon_image }}:{{ ceph_mon_tag }}"
ceph_mgr_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceph_install_type }}-ceph-mgr"
ceph_mgr_tag: "{{ ceph_tag }}"
ceph_mgr_image_full: "{{ ceph_mgr_image }}:{{ ceph_mgr_tag }}"
ceph_osd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ ceph_install_type }}-ceph-osd"
ceph_osd_tag: "{{ ceph_tag }}"
ceph_osd_image_full: "{{ ceph_osd_image }}:{{ ceph_osd_tag }}"

View File

@ -8,6 +8,7 @@
- "ceph-mon"
- "ceph-osd"
- "ceph-rgw"
- "ceph-mgr"
- name: Copying over config.json files for services
template:
@ -22,6 +23,8 @@
group: ceph-osd
- name: "ceph-rgw"
group: ceph-rgw
- name: "ceph-mgr"
group: "ceph-mgr"
- name: Copying over ceph.conf
vars:
@ -36,3 +39,4 @@
- "ceph-mon"
- "ceph-osd"
- "ceph-rgw"
- "ceph-mgr"

View File

@ -9,6 +9,9 @@
- include: start_mons.yml
when: inventory_hostname in groups['ceph-mon']
- include: start_mgrs.yml
when: inventory_hostname in groups['ceph-mgr']
- include: bootstrap_osds.yml
when: inventory_hostname in groups['ceph-osd']

View File

@ -19,3 +19,11 @@
common_options: "{{ docker_common_options }}"
image: "{{ ceph_rgw_image_full }}"
when: inventory_hostname in groups['ceph-rgw']
- name: Pulling ceph-mgr image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ ceph_mgr_image_full }}"
when:
- inventory_hostname in groups['ceph-mgr']

View File

@ -0,0 +1,27 @@
---
- name: Getting ceph mgr keyring
command: docker exec ceph_mon ceph auth get-or-create mgr.{{ inventory_hostname }} mon 'allow profile mgr' osd 'allow *' mds 'allow *'
register: ceph_mgr_keyring
run_once: true
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: false
with_items: "{{ groups['ceph-mgr'] }}"
- name: Pushing ceph mgr keyring to ceph-mgr
copy:
content: "{{ item.stdout }}\n"
dest: "{{ node_config_directory }}/ceph-mgr/ceph.mgr.{{ inventory_hostname }}.keyring"
when:
- inventory_hostname == item.item
with_items: "{{ ceph_mgr_keyring.results }}"
- name: Starting ceph-mgr container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ ceph_mgr_image_full }}"
name: "ceph_mgr"
volumes:
- "{{ node_config_directory }}/ceph-mgr/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"

View File

@ -0,0 +1,17 @@
{
"command": "/usr/bin/ceph-mgr -f -i {{ inventory_hostname }}",
"config_files": [
{
"source": "{{ container_config_directory }}/ceph.conf",
"dest": "/etc/ceph/ceph.conf",
"owner": "ceph",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/ceph.mgr.{{ inventory_hostname }}.keyring",
"dest": "/var/lib/ceph/mgr/ceph-{{ inventory_hostname }}/keyring",
"owner": "ceph",
"perm": "0600"
}
]
}

View File

@ -0,0 +1,4 @@
---
features:
- |
Implement ceph-mgr service