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).

/home/stack/templates/storage-environment.yaml

parameter_defaults: // 1
  CinderBackupBackend: ceph // 2
  ExtraConfig:
    ceph::profile::params::osds: // 3
      '/dev/sdc':
        journal: '/dev/sdb'
      '/dev/sdd':
        journal: '/dev/sdb'
    CephPools: // 4
      volumes:
        size: 5
        pg_num: 128
        pgp_num: 128
  ControllerCount: 3 // 5
  OvercloudControlFlavor: control
  ComputeCount: 3
  OvercloudComputeFlavor: compute
  CephStorageCount: 3
  OvercloudCephStorageFlavor: ceph-storage
  CephMonCount: 3
  OvercloudCephMonFlavor: ceph-mon
  CephMdsCount: 3
  OvercloudCephMdsFlavor: ceph-mds
  NeutronNetworkType: vxlan // 6

1
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”.
2
If you are deploying the Ceph Object Gateway, you can use Ceph Object Storage (ceph-rgw) as a backup target. To configure this, set CinderBackupBackend to swift. See Section 2.9, “Deploy the Ceph Object Gateway” for details.
3
The ceph::profile::params::osds:: section defines a custom disk layout, as described in Section 2.7, “Mapping the Ceph Storage Node Disk Layout”.
4
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.
5
For each role, the *Count parameters assign a number of nodes while the Overcloud*Flavor parameters assign a flavor. For example, ControllerCount: 3 assigns 3 nodes to the Controller role, and OvercloudControlFlavor: control sets each of those roles to use the control flavor. See Section 2.13, “Assigning Nodes and Flavors to Roles” for details.
Note

The CephMonCount, CephMdsCount, OvercloudCephMonFlavor, and OvercloudCephMdsFlavor parameters (along with the ceph-mon and ceph-mds flavors) will only be valid if you created a custom CephMON and CephMds role, as described in Section 2.4, “Deploying Other Ceph Services on Dedicated Nodes”.

6
NeutronNetworkType: sets the network type that the neutron service should use (in this case, vxlan).