Red Hat Training
A Red Hat training course is available for Red Hat OpenStack Platform
Chapter 3. Create the Environment File
The environment file contains the settings for each back end that you want to define, and other relevant settings. For more information about environment files, see Environment Files in the Advanced Overcloud Customization guide.
The following sample environment file defines two NetApp back ends: netapp1 and netapp2:
/home/stack/templates/custom-env.yaml
parameter_defaults: # 1 CinderEnableIscsiBackend: false CinderEnableRbdBackend: false CinderEnableNfsBackend: false NovaEnableRbdBackend: false GlanceBackend: file # 2 ControllerExtraConfig: # 3 cinder::config::cinder_config: netapp1/volume_driver: # 4 value: cinder.volume.drivers.netapp.common.NetAppDriver netapp1/netapp_storage_family: value: ontap_7mode netapp1/netapp_storage_protocol: value: iscsi netapp1/netapp_server_hostname: value: 10.35.64.11 netapp1/netapp_server_port: value: 80 netapp1/netapp_login: value: root netapp1/netapp_password: value: p@$$w0rd netapp1/volume_backend_name: value: netapp1 netapp2/volume_driver: # 5 value: cinder.volume.drivers.netapp.common.NetAppDriver # 6 netapp2/netapp_storage_family: value: ontap_7mode netapp2/netapp_storage_protocol: value: iscsi netapp2/netapp_server_hostname: value: 10.35.64.11 netapp2/netapp_server_port: value: 80 netapp2/netapp_login: value: root netapp2/netapp_password: value: p@$$w0rd netapp2/volume_backend_name: value: netapp2 cinder_user_enabled_backends: ['netapp1','netapp2'] # 7
- 1
- The following parameters are set to
false
, and thereby disable other back end types:-
CinderEnableIscsiBackend
: other iSCSI back ends. -
CinderEnableRbdBackend
: Red Hat Ceph. -
CinderEnableNfsBackend
: NFS. -
NovaEnableRbdBackend
: ephemeral Red Hat Ceph storage.
-
- 2
- The GlanceBackend parameter sets what the Image service should use to store images. The following values are supported:
-
file
: store images on/var/lib/glance/images
on each Controller node. -
swift
: use the Object Storage service for image storage. -
cinder
: use the Block Storage service for image storage.
-
- 3
ControllerExtraConfig
defines custom settings that will be applied to all Controller nodes. Thecinder::config::cinder_config
class means the settings should be applied to the Block Storage (cinder
) service. This, in turn, means that the back end settings will ultimately end in the/etc/cinder/cinder.conf
file of each Controller node.- 4
- The
netapp1/volume_driver
andnetapp2/volume_driver
settings follow the section/setting syntax. With the Block Storage service, each back end is defined in its own section in/etc/cinder/cinder.conf
. Each setting that uses thenetapp1
prefix will be defined in a new[netapp1]
back end section. - 5
- Likewise,
netapp2
settings are defined in a separate[netapp2]
section. - 6
- The
value
prefix configures the preceding setting. - 7
- The
cinder_user_enabled_backends
class sets and enables custom back ends. As the name implies, this class should only be used for user-enabled back ends; specifically, those defined in thecinder::config::cinder_config
class.Do not use
cinder_user_enabled_backends
to list back ends you can enable natively through Director. These include Red Hat Ceph, NFS, and single back ends for supported NetApp or Dell appliances. For example, if you are also enabling a Red Hat Ceph back end, do not list it incinder_user_enabled_backends
; rather, enable it usingCinderEnableRbdBackend: true
.
For more information on defining a Red Hat Ceph back end for OpenStack Block Storage, see Deploying an Overcloud with Containerized Red Hat Ceph.
Deploy the Configured Back Ends describes how to use the environment file /home/stack/templates/custom-env.yaml to orchestrate the custom back end’s deployment. To see the resulting /etc/cinder/cinder.conf
settings from /home/stack/templates/custom-env.yaml
, see Section A.2, “Resulting Configuration from Sample Environment File”.