What is a Composite Template?
With Command Central, you can use composite templates to create new environments and update or upgrade existing environments.
At the core of a composite template is the template definition. The template definition describes the target state of the environment that you want to install or modify, and Command Central calculates how to achieve the target state, based on the data in the composite template. The template definition is designed with the typical Software AG product environments in mind and takes into considerations the requirements specific for different types of environments, such as which components should be installed and how the components communicate with the system infrastructure or with each other.
The template definition can also include shell actions executed at different phases during the template application process, which enable Command Central to automate an even wider range of provisioning operations.
A composite template is very similar an application and to the concept of infrastructure as code in that it goes through several development stages:
1. Designing and creating
You design the state of the environment that you want to create in the composite template definition by defining a set of environment properties for which you can specify values or use the default values provided in the template. For example, you can specify which products to include in a composite template or the number of nodes on which to apply the template. You also include the following elements in the composite template definition:
Define repositories, layers, templates, installations, and provisioning maps.
Specify actions on demand that
Command Central executes when applying the composite template, for example migrate a product that does not have a migration utility.
Reference repositories and external files, such as license key, product, or fix image files.
2. Packaging
If the composite template that you designed does not include references to external files, the composite template is defined in a single YAML template definition file. If the composite template included references to external files, the composite template is packaged in a zip archive, which consists of a YAML template definition file, named template.yaml, and the external files referenced in the template definition.
In the Software AG_directory \profiles\CCE\data\templates\composite directory you can find:
A reference template that shows and explains how to define the structure of a composite template definition.
Default composite templates that contain samples of composite template definitions for different product environments. The template.yaml file for each default composite template also contains information about the input parameters that you can customize and examples of
Command Central command line tool commands that you can execute for the template.
3. Importing and applying
After you create a composite template, you should store it in a version control system and test or modify the template as required. To use the composite template, you must import it in
Command Central and apply the template on the target machines. You import and apply composite templates using the composite templates commands of the
Command Central command line tool. You can determine how you want apply the template using the apply composite template command arguments, for example with the
environment.type command argument you can select which of the environments defined in the template to apply on the target hosts. For more information about how to use the composite templates commands, see
sagcc exec templates composite import and
sagcc exec templates composite apply.