Search

Appendix A. Sample Environment File: Creating a Ceph Cluster

download PDF

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

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
  ExtraConfig:
    ceph::profile::params::osds: // 7
      '/dev/sdc':
        journal: '/dev/sdb'
      '/dev/sdd':
        journal: '/dev/sdb'
    CephPools: // 8
      volumes:
        size: 5
        pg_num: 128
        pgp_num: 128

1
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).
2
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.
3
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.
4
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”.
5
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”.
6
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.
7
The ceph::profile::params::osds:: section defines a custom disk layout, as described in Section 2.7, “Mapping the Ceph Storage Node Disk Layout”.
8
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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.