Module - ceph_spec_bootstrap

This module provides for the following ansible plugin:

  • ceph_spec_bootstrap

Module Documentation

The ceph_spec_bootstrap module uses information from both the composed services in TripleO roles and the deployed hosts file ('openstack overcloud node provision' output), or just the inventory file (tripleo-ansible-inventory output) to determine what Ceph services should run on what hosts and generate a valid Ceph spec. This allows the desired end state defined in TripleO to be translated into an end state defined in Ceph orchestrator. The intention is to use this module when bootstraping a new Ceph cluster.

Options

deployed_metalsmith

The absolute path to a file like deployed_metal.yaml, as genereated by 'openstack overcloud node provision --output deployed_metal.yaml'. This file is used to map which ceph_service_types map to which deployed hosts. Use this option if you have deployed servers with metalsmith but do not yet have an inventory genereated from the overcloud in Heat. Either tripleo_ansible_inventory xor deployed_metalsmith must be used (not both).

tripleo_ansible_inventory

The absolute path to an Ansible inventory genereated by running the tripleo-ansible-inventory command. This file is used to map which ceph_service_types map to which deployed hosts. Use this option if you already have an inventory genereated from the overcloud in Heat. Either tripleo_ansible_inventory xor deployed_metalsmith must be used (not both).

new_ceph_spec

The absolute path to a new file which will be created by the module and contain the resultant Ceph specification. If not provided, defaults to /home/stack/ceph_spec.yaml.

ceph_service_types

List of Ceph services being deployed on overcloud. All service names must be a valid service_type as described in the Ceph Orchestrator CLI service spec documentation. If not provided, defaults to ['mon', 'mgr', 'osd'], which are presently the only supported service types this module supports.

tripleo_roles

The absolute path to the TripleO roles file. Only necessary if deployed_metalsmith is used. If not provided then defaults to /usr/share/openstack-tripleo-heat-templates/roles_data.yaml. This file is used to map which ceph_service_types map to which roles. E.g. all roles with OS::TripleO::Services::CephOSD will get the Ceph service_type 'osd'. This paramter is ignored if tripleo_ansible_inventory is used.

osd_spec

A valid osd service specification. If not passed defaults to using all available data devices (data_devices all true).

fqdn

When true, the "hostname" and "hosts" in the generated Ceph spec will have their fully qualified domain name. This paramter defaults to false and only has an effect when tripleo_ansible_inventory is used.

Authors

John Fulton (fultonj)

Example Tasks

- name: make spec from 'openstack overcloud node provision' output
  ceph_spec_bootstrap:
    new_ceph_spec: '{{ playbook_dir }}/ceph_spec.yaml'
    deployed_metalsmith: ~/overcloud-baremetal-deployed.yaml
- name: make spec from tripleo-ansible-inventory output
  ceph_spec_bootstrap:
    new_ceph_spec: '{{ playbook_dir }}/ceph_spec.yaml'
    tripleo_ansible_inventory: ~/config-download/overcloud/tripleo-ansible-inventory.yaml
- name: make spec from inventory with FQDNs and custom osd_spec
  ceph_spec_bootstrap:
    new_ceph_spec: '{{ playbook_dir }}/ceph_spec.yaml'
    tripleo_ansible_inventory: ~/config-download/overcloud/tripleo-ansible-inventory.yaml
    fqdn: true
    osd_spec:
      data_devices:
        paths:
        - /dev/ceph_vg/ceph_lv_data
- name: make spec with only Ceph mons and managers
  ceph_spec_bootstrap:
    new_ceph_spec: '{{ playbook_dir }}/ceph_spec.yaml'
    deployed_metalsmith: ~/overcloud-baremetal-deployed.yaml
    ceph_service_types:
    - mon
    - mgr
- name: make spec with composed roles/ HDDs for data/ SSDs for db
  ceph_spec_bootstrap:
    new_ceph_spec: '{{ playbook_dir }}/ceph_spec.yaml'
    deployed_metalsmith: ~/overcloud-baremetal-deployed.yaml
    tripleo_roles: ~/templates/custom_roles_data.yaml
    osd_spec:
      data_devices:
        rotational: 1
      db_devices:
        rotational: 0