mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #349 from ceph/fix-docker-mds
Re-arrange docker invocation and fix bootstrap mdspull/350/head
commit
510e2c174f
|
@ -11,3 +11,4 @@ dummy:
|
|||
#ceph_containerized_deployment: false
|
||||
#ceph_mds_docker_username: ceph
|
||||
#ceph_mds_docker_imagename: daemon
|
||||
#ceph_mds_docker_extra_envs: "MDS_NAME={{ ansible_hostname }}" # comma separated variables
|
||||
|
|
|
@ -11,3 +11,4 @@ cephx: true
|
|||
ceph_containerized_deployment: false
|
||||
ceph_mds_docker_username: ceph
|
||||
ceph_mds_docker_imagename: daemon
|
||||
ceph_mds_docker_extra_envs: "MDS_NAME={{ ansible_hostname }}" # comma separated variables
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
# NOTE (leseb): the mds container needs the admin key
|
||||
# so it can create the mds pools for cephfs
|
||||
- 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
|
||||
|
||||
- name: stat for ceph config and keys
|
||||
local_action: stat path={{ item }}
|
||||
with_items: ceph_config_keys
|
||||
changed_when: false
|
||||
sudo: false
|
||||
ignore_errors: true
|
||||
register: statconfig
|
||||
|
||||
- name: try to fetch ceph config and keys
|
||||
copy: >
|
||||
src=fetch/docker_mon_files/{{ item.0 }}
|
||||
dest={{ item.0 }}
|
||||
owner=root
|
||||
group=root
|
||||
mode=644
|
||||
with_together:
|
||||
- ceph_config_keys
|
||||
- statconfig.results
|
||||
when: item.1.stat.exists == true
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- include: pre_requisite.yml
|
||||
- include: fetch_configs.yml
|
||||
- include: start_docker_mds.yml
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
- name: create mds bootstrap directory
|
||||
file: >
|
||||
path=/var/lib/ceph/bootstrap-mds
|
||||
state=directory
|
||||
|
||||
# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
|
||||
- name: install docker-py
|
||||
pip: >
|
||||
name=docker-py
|
||||
version=1.1.0
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- name: run the ceph medata docker image
|
||||
docker: >
|
||||
image="{{ ceph_mds_docker_username }}/{{ ceph_mds_docker_imagename }}"
|
||||
name=ceph-{{ ansible_hostname }}-mds
|
||||
net=host
|
||||
state=running
|
||||
env="CEPHFS_CREATE=1,{{ ceph_osd_docker_extra_env }}"
|
||||
volumes="/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph"
|
|
@ -2,5 +2,5 @@
|
|||
- include: pre_requisite.yml
|
||||
when: not ceph_containerized_deployment
|
||||
|
||||
- include: docker.yml
|
||||
- include: ./docker/main.yml
|
||||
when: ceph_containerized_deployment
|
||||
|
|
Loading…
Reference in New Issue