diff --git a/etc/openstack_deploy/conf.d/ceph.yml.aio b/etc/openstack_deploy/conf.d/ceph.yml.aio index 1e7ad3ad56..8695b4d0dc 100644 --- a/etc/openstack_deploy/conf.d/ceph.yml.aio +++ b/etc/openstack_deploy/conf.d/ceph.yml.aio @@ -12,3 +12,11 @@ ceph-osd_hosts: ceph-rgw_hosts: aio1: ip: 172.29.236.100 + +ceph-mds_hosts: + aio1: + ip: 172.29.236.100 + +ceph-nfs_hosts: + aio1: + ip: 172.29.236.100 diff --git a/inventory/env.d/ceph.yml b/inventory/env.d/ceph.yml index 4ec1b7c541..d31f562ed2 100644 --- a/inventory/env.d/ceph.yml +++ b/inventory/env.d/ceph.yml @@ -23,6 +23,12 @@ component_skel: ceph-rgw: belongs_to: - ceph_all + ceph-mds: + belongs_to: + - ceph_all + ceph-nfs: + belongs_to: + - ceph_all container_skel: ceph-mon_container: @@ -42,6 +48,16 @@ container_skel: - ceph-rgw_containers contains: - ceph-rgw + ceph-mds_container: + belongs_to: + - ceph-mds_containers + contains: + - ceph-mds + ceph-nfs_container: + belongs_to: + - ceph-nfs_containers + contains: + - ceph-nfs physical_skel: ceph-mon_containers: @@ -62,3 +78,15 @@ physical_skel: ceph-rgw_hosts: belongs_to: - hosts + ceph-mds_containers: + belongs_to: + - all_containers + ceph-mds_hosts: + belongs_to: + - hosts + ceph-nfs_containers: + belongs_to: + - all_containers + ceph-nfs_hosts: + belongs_to: + - hosts diff --git a/inventory/group_vars/all/ceph.yml b/inventory/group_vars/all/ceph.yml index 7448914881..c726cb5cd0 100644 --- a/inventory/group_vars/all/ceph.yml +++ b/inventory/group_vars/all/ceph.yml @@ -20,6 +20,8 @@ mon_group_name: ceph-mon mgr_group_name: "{{ mon_group_name }}" osd_group_name: ceph-osd rgw_group_name: ceph-rgw +mds_group_name: ceph-mds +nfs_group_name: nfss ceph_origin: "{{ (ansible_pkg_mgr == 'zypper') | ternary('distro', 'repository') }}" ceph_repository: community # The _stable_release var is used by both the OSA ceph_client role and the diff --git a/playbooks/ceph-install.yml b/playbooks/ceph-install.yml index 23a9ec42a8..ac64b1ff44 100644 --- a/playbooks/ceph-install.yml +++ b/playbooks/ceph-install.yml @@ -161,3 +161,47 @@ tags: - ceph - ceph-osd + +- name: Install ceph metadata servers + hosts: ceph-mds + user: root + vars_files: + - "defaults/{{ install_method }}_install.yml" + - "defaults/ceph_ansible.yml" + pre_tasks: + - name: Gather ceph-mon facts + action: setup + delegate_to: "{{ item }}" + delegate_facts: yes + with_items: "{{ groups[mon_group_name] }}" + when: + - inventory_hostname == ansible_play_hosts[0] + tags: + - ceph-mon-facts + - ceph-mds + roles: + - role: ceph-defaults + tags: + - skip_ansible_lint + - role: ceph-facts + tags: + - skip_ansible_lint + - role: ceph-handler + tags: + - skip_ansible_lint + - role: ceph-common + tags: + - skip_ansible_lint + - role: ceph-config + tags: + - skip_ansible_lint + - role: ceph-mds + tags: + - skip_ansible_lint + - role: "system_crontab_coordination" + tags: + - "system-crontab-coordination" + vars: + is_metal: "{{ properties.is_metal|default(false) }}" + tags: + - ceph-mds diff --git a/playbooks/ceph-nfs-install.yml b/playbooks/ceph-nfs-install.yml new file mode 100644 index 0000000000..49e3d4ee5a --- /dev/null +++ b/playbooks/ceph-nfs-install.yml @@ -0,0 +1,57 @@ +--- +# Copyright 2019, VEXXHOST, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Install nfs-ganesha server + hosts: ceph-nfs + user: root + vars_files: + - "defaults/{{ install_method }}_install.yml" + - "defaults/ceph_ansible.yml" + pre_tasks: + - name: Gather ceph-mon facts + action: setup + delegate_to: "{{ item }}" + delegate_facts: yes + with_items: "{{ groups[mon_group_name] }}" + when: + - inventory_hostname == ansible_play_hosts[0] + tags: + - ceph-mon-facts + - ceph-nfs + # NOTE(noonedeadpunk) drop this once https://github.com/ceph/ceph-ansible/pull/4959 will be merged + - name: Create ganesha log dir + file: + path: /var/log/ganesha + owner: root + group: root + mode: 0755 + state: directory + roles: + - role: ceph-defaults + tags: + - skip_ansible_lint + - role: ceph-facts + tags: + - skip_ansible_lint + - role: ceph-handler + tags: + - skip_ansible_lint + - role: ceph-nfs + tags: + - skip_ansible_lint + vars: + is_metal: "{{ properties.is_metal|default(false) }}" + tags: + - ceph-nfs diff --git a/tests/test_inventory.py b/tests/test_inventory.py index c7f1d82e61..c4ea2ec508 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -160,6 +160,11 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase): 'ceph-mon_container', 'ceph-mon_hosts', 'ceph-mon', + 'ceph-mds', + 'ceph-mds_all', + 'ceph-mds_containers', + 'ceph-mds_container', + 'ceph-mds_hosts', 'ceph-osd_all', 'ceph-osd_containers', 'ceph-osd_container', @@ -170,6 +175,11 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase): 'ceph-rgw_container', 'ceph-rgw_hosts', 'ceph-rgw', + 'ceph-nfs', + 'ceph-nfs_all', + 'ceph-nfs_containers', + 'ceph-nfs_container', + 'ceph-nfs_hosts', 'cinder_all', 'cinder_api', 'cinder_api_container',