Heat Template
OpenStack Heat templates are used for orchestration of cloud applications.
Heat orchestration templates are written in YAML.
Murano applications are associated with Heat Orchestration Templates.
The Heat Orchestration format is as follows.
x
heat_template_version<version date in yyyy-mm-dd format>description #a description of the template #add at least one meaningful line that describes what the user can do with the templateparameter_groups #a declaration of input parameter groups and order #specify how the input parameters should be grouped and the order in which the parameters must be provided. #section is optional and can be omitted when it is not required.parameters #declaration of input parameters #input parameters that have to be provided when instantiating the template #the section is optional and can be omitted when no input is required #use of parameterized values instead of hard-coded values makes the template reusable. #default values for input parameters can be providedresources #declaration of template resources #the resources section is required and must contain at least one resource definition.outputs #declaration of output parameters #output parameters available to users once the template has been instantiated. #the section is optional and can be omitted when no output values are required. #use the section to provide output to users.conditions #declaration of conditions #include statements that can be used to restrict when a resource is created or when a property is definedFollowing is an example of a Heat Orchestration Template.
heat_template_version2015-10-15description The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server.parameters image typestring descriptionA Linux image with the apt-get or yum commands available constraintscustom_constraintglance.image key_name typestring descriptionSSH public key used by the server constraintscustom_constraintnova.keypair flavor typestring descriptionflavor used by the server constraintscustom_constraintnova.flavor network typestring descriptionNetwork used by the server constraintscustom_constraintnova.networkresources apache_http_server typeOSNovaServer properties flavor get_paramflavor image get_paramimage key_name get_paramkey_name networksnetwork get_paramnetwork config_drivetrue user_data_formatRAW user_data #!/bin/bash echo "Starting cloud-init Apache installation" apt-get update apt-get -y install apache2outputs name descriptionName of the apache http server instance value get_attrapache_http_server name first_address descriptionFirst IP address of the instance value get_attrapache_http_server first_address Refer to OpenStack’s Heat Orchestration Template (HOT) Guide for a detailed explanation about the structure of a Heat template.
Was this page helpful?