Show Table of Contents
5.2. Environment Files
An environment file is a special type of template that provides customization for your Heat templates. This includes three key parts:
- Parameters - These are common settings you apply to a template's parameters. These are defined in the
parameters
section of an environment file. - Parameter Defaults - These parameters modify the default values for parameters in your templates. These are defined in the
parameter_defaults
section of an environment file. - Resource Registry - This section defines custom resource names, link to other Heat templates. This essentially provides a method to create custom resources that do not exist within the core resource collection. These are defined in the
resource_registry
section of an environment file.
Here is an example of a basic environment file:
resource_registry: OS::Nova::Server::MyServer: myserver.yaml parameter_defaults: NetworkName: my_network parameters: MyIP: 192.168.0.1
This creates a new resource type called
OS::Nova::Server::MyServer
. The myserver.yaml
file is a Heat template file that provides an implementation for this resource type that overrides any built-in ones.