Chapter 4. Create the Environment File

The environment file contains the settings for each back end you want to define. It also contains other settings relevant to the deployment of a custom back end. For more information about environment files, see Environment Files (in the Advanced Overcloud Customization guide).

In addition, the environment file will also register the heat template you created earlier in Chapter 3, Prepare the Heat Template. In doing so, the installation and echo commands defined in that template will be carried out on the appropriate nodes.

The following sample environment file contains all the necessary sections for defining an ETERNUS device as a Block Storage back end. It also creates the back end definitions for each corresponding XML file orchestrated in Section 3.1, “Create Driver Definitions for Each Back End” and Section 3.2, “Sample Completed Heat Template”:

eternusbackend-env.yaml

parameters: # 1
  CinderEnableIscsiBackend: false
  CinderEnableRbdBackend: false
  CinderEnableNfsBackend: false
  NovaEnableRbdBackend: false
  GlanceBackend: file # 2

resource_registry:
  OS::TripleO::NodeExtraConfig: /home/stack/templates/eternus-temp.yaml  # 3

parameter_defaults:
  controllerExtraConfig: # 4
    cinder::config::cinder_config:
        FJFC/volume_driver: # 5
            value: cinder.volume.drivers.fujitsu.eternus_dx_fc.FJDXFCDriver
        FJFC/cinder_eternus_config_file: # 6
            value: /etc/cinder/eternus-fc.xml
        FJFC/volume_backend_name: # 7
            value: FJFC
        FJISCSI/volume_driver: # 8
            value: cinder.volume.drivers.fujitsu.eternus_dx_iscsi.FJDXISCSIDriver
        FJISCSI/cinder_eternus_config_file:
            value: /etc/cinder/eternus-iscsi.xml
        FJISCSI/volume_backend_name:
            value: FJISCSI
    cinder_user_enabled_backends: [FJFC,FJISCSI] # 9

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
NodeExtraConfig defines custom settings that will be applied to all nodes before the core Puppet configuration. This ensures that by the time the Block Storage service is deployed on the overcloud:
  • The Controller node already has the pywbem package installed, and
  • The XML configuration files for each back end are already created.
4
controllerExtraConfig defines custom settings that will be applied to all controller nodes. The cinder::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 node.
5
The FJFC/ string creates a back end definition named FJFC, and the following parameter will be declared under that back end definition. The volume_driver parameter sets the specific ETERNUS driver for the back end; in this case, cinder.volume.drivers.fujitsu.eternus_dx_fc.FJDXFCDriver sets the fibre channel driver.
6
The cinder_eternus_config_file sets the path to the XML configuration file that the driver should use for the back end. The creation of /etc/cinder/eternus-fc.xml is orchestrated through the heat template (namely, /home/stack/templates/eternus-temp.yaml).
7
The volume_backend_name is the name that the Block Storage service should use to enable the back end.
8
The FJISCSI/ string creates a new back end definition, in the same manner as FJFC earlier.
9
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 the cinder::config::cinder_config class.

After creating the environment file, you can now deploy your configuration. See Chapter 5, Deploy the Configured Back Ends for details on how to use the environment file /home/stack/templates/eternusbackend-env.yaml for this purpose.