Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

Appendix A. Sample Environment File: Creating a Ceph Cluster

The following custom environment file uses many of the options described throughout Chapter 2, Creating an Overcloud with Ceph Storage Nodes. This sample does not include any commented-out options. For an overview on environment files, see Environment Files (from the Advanced Overcloud Customization guide).


resource_registry: // 1
  OS::TripleO::Services::CephMon: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-mon.yaml
  OS::TripleO::Services::CephOSD: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-osd.yaml
  OS::TripleO::Services::CephClient: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-client.yaml
  OS::TripleO::Services::CinderBackup: /usr/share/openstack-tripleo-heat-templates/puppet/services/pacemaker/cinder-backup.yaml  // 2
  OS::TripleO::Services::CephRgw: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-rgw.yaml  // 3
  OS::TripleO::Services::SwiftProxy: OS::Heat::None
  OS::TripleO::Services::SwiftStorage: OS::Heat::None
  OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None
  OS::TripleO::NodeUserData: /home/stack/templates/firstboot/wipe-disks.yaml // 4

parameter_defaults: // 5
  CinderEnableIscsiBackend: false
  CinderEnableRbdBackend: true
  CinderEnableNfsBackend: false
  NovaEnableRbdBackend: true
  GlanceBackend: rbd
  CinderBackupBackend: swift // 6
    ceph::profile::params::osds: // 7
        journal: '/dev/sdb'
        journal: '/dev/sdb'
    CephPools: // 8
        size: 5
        pg_num: 128
        pgp_num: 128

The resource_registry section defines resources linked to heat templates. The first three entries (CephMon, CephOSD, and CephClient) link the heat templates used to define the different components of the Ceph cluster (MON, OSD, and client).
The OS::TripleO::Services::CinderBackup entry calls the heat template required to deploy the Block Storage Backup service. You can set the backup target later on in the parameter_defaults section.
The OS::TripleO::Services::CephRgw entry calls the heat template required to deploy the Ceph Object Gateway, which in turn provides the means for OpenStack to use Ceph Object Storage. The following three lines disable the default Object Storage service (swift), as it will not be needed. See Section 2.8, “Deploy the Ceph Object Gateway” for details.
The OS::TripleO::NodeUserData: entry uses a template (/home/stack/templates/firstboot/wipe-disks.yaml) that checks all disks on Ceph Storage node and converts all of them (except the disk containing the root file system) to GPT using a custom script. For more details, see Section 2.10, “Formatting Ceph Storage Node Disks to GPT”.
The parameter_defaults section modifies the default values for parameters in all templates. Most of the entries listed here are described in Section 2.6, “Enabling Ceph Storage in the Overcloud”.
As you are deploying the Ceph Object Gateway, you can then use Ceph Object Storage as a backup target. To configure this, set CinderBackupBackend to swift. See Section 2.8, “Deploy the Ceph Object Gateway” for details.
The ceph::profile::params::osds:: section defines a custom disk layout, as described in Section 2.7, “Mapping the Ceph Storage Node Disk Layout”.
The CephPools section sets custom attributes for any Ceph pool. This example sets custom size, pg_num, and pgp_num attributes for the volumes pool. See Section 2.12.1, “Assigning Custom Attributes to Different Ceph Pools” for more details.