Installer 10.15 | Complete Installation and Upgrade Information for Software AG Products | Command Central | Using the Command Line Interface | Template Commands | sagcc exec templates composite generate input
 
sagcc exec templates composite generate input
Generates a template using input parameters, specified in a template metadata file. Based on the template metadata file, the command can generate:
*A run-time micro template from an installed product instance.
*An infrastructure micro template from the Platform Manager instance in an installation.
*A product instance template containing a nodes: section.
The command can help you when you want to filter which configuration properties of the product instance and its child run-time components to extract in the template.
Command Central imports the generated template automatically and creates a layer type definition for the template in the local Command Central installation. You can use this layer type definition to create a layer for the product instance in an existing product stack. See the sagcc create stacks layers command.
Syntax
*Command Central syntax:
sagcc exec templates composite generate {--input | -i} filename.xml [options]
*Not supported on Platform Manager.
Arguments and Option
Argument or Option
Description
{--input | -i}
Required. Specifies a template metadata file in XML format. For information about the structure and contents of the input metadata file, see Usage Notes. For more information about the {--input | -i} option, see input.
[options]
Optional. The command allows all options supported by the Command Line Interface. For a description of the options, see Common Options.
Usage Notes
*The input file with the template metadata for generating an infrastructure or a runtime template uses the following XML schema:
*To specify that all configurations that are defined in the <configurations> element will be added in the generated template.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<generateCompositeTemplate>
<alias>templateAlias</alias>
<nodeAlias>exportInstallationAlias</nodeAlias>
<runtimeComponentId>runtimeComponentId</runtimeComponentId>
<infrastructure>
<includeHostname>true</includeHostname>
</infrastructure>
<instances/>
<products/>
<fixes/>
<configurations>
<runtimeComponent id="runtimecomponentId1">
<configurationInstanceId>configurationInstanceId1</configurationInstanceId>
<configurationInstanceId>configurationInstanceId2</configurationInstanceId>
...
<configurationTypeId>configurationTypeId1</configurationTypeId>
<configurationTypeId>configurationTypeId2</configurationTypeId>
...
</runtimeComponent>
<runtimeComponent id="runtimeComponentId2">
<configurationInstanceId>configurationInstanceId1</configurationInstanceId>
...
</runtimeComponent>
...
</configurations>
<parameterize>true</parameterize>
<paramPrefix>paramPrefix</paramPrefix>
<overwrite>true</overwrite>
</generateCompositeTemplate>
*To specify which configurations to exclude from the generated template, set exclude="true" attribute of the <configurations> element. All configurations for the specified run-time components will be added in the template, except the configurations listed in the <configurations> element of the template metadata file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<generateCompositeTemplate>
<alias>templateAlias</alias>
<nodeAlias>exportInstallationAlias</nodeAlias>
<runtimeComponentId>runtimeComponentId</runtimeComponentId>
<infrastructure>
<includeHostname>true</includeHostname>
</infrastructure>
<instances/>
<products/>
<fixes/>
<configurations exclude="true">
<runtimeComponent id="runtimecomponentId1">
<configurationInstanceId>configurationInstanceId1</configurationInstanceId>
<configurationInstanceId>configurationInstanceId2</configurationInstanceId>
...
<configurationTypeId>configurationTypeId1</configurationTypeId>
<configurationTypeId>configurationTypeId2</configurationTypeId>
...
</runtimeComponent>
<runtimeComponent id="runtimeComponentId2">
<configurationInstanceId>configurationInstanceId1</configurationInstanceId>
...
</runtimeComponent>
...
</configurations>
<parameterize>true</parameterize>
<paramPrefix>paramPrefix</paramPrefix>
<overwrite>true</overwrite>
</generateCompositeTemplate>
The following table describes the parameters in the template metadata file:
Parameter
Description
templateAlias
The alias name of the run-time micro template to generate.
nodeAlias
The alias name of the installation in which the parent product instance is installed.
runtimeComponentId
The ID of the parent product instance, from which to extract configurations. By default, if you do not include any child run-time components, only the configurations for the parent product instance will be extracted.
infrastructure
Required when the <runtimeComponentId> is "OSGI-SPM" or is not specified. If you omit the <infrastructure> element, the command generates a runtime micro template.
includeHostname
Optional. Includes the hostname of the Platform Manager node, from which you export Platform Manager.
instances
Includes the instance properties of the specified product instance.
products
Includes a list of product inline templates in the generated template. The list of products depends on the version of the source installation:
*For installations version 10.4 or higher, the command adds inline templates only for the products hosted on the product instance.
*For installations version 10.3 or lower, the command adds inline templates for all products from the source installation (not only the products hosted on the product instance).
fixes
Adds a templates:templateAlias:fixes: section. Only with DSL "1.1", if the source product instance has been updated with patches, it also adds a templates:templateAlias:patches: section. Based on the version of the source installation, the generated template will differ as follows:
*10.5 and higher, adds fixes and patches parameters that list the fixes and patches installed on the source product instance.
*10.4 and lower, adds a fixes: ALL parameter that indicates to install all fixes available for the product instance in the fix repository.
configurations
Includes the configurations of the product instance and all its child run-time components.
exclude="true"
Optional. Specifies that the generated template will contain all configurations for the specified run-time components, except for the configurations listed in the template metadata file. Valid values:
*true - exclude the configurations listed in the <configurations> element
*false - (default) do not exclude the configurations
id="runtimeComponentId"
Optional. Specifies the IDs of the run-time components for which you want to export configurations. You can specify the ID of the parent run-time component, or one of its child components. You can list multiple run-time components.
configurationInstanceId
Optional. The ID of a specific configuration instance to be exported for the specified run-time component. You can list multiple configuration instances. If you do not specify any configuration instance IDs for a particular run-time component, all configurations for this run-time component will be exported.
Note:
If exclude="true" the specified configuration instances will be excluded from the template.
configurationTypeId
Optional. Specifies that all configurations with this type ID must be included in the template. You can list multiple configuration type IDs.
Note:
If exclude="true", all configurations with the specified configuration types will be excluded from the template.
parameterize
Optional. Specifies whether to parameterize the exported configurations. Valid values:
*true - parameterize the configurations
*false - (default) do not parameterize the configurations
paramPrefix
Optional. Specifies a prefix to be added to the exported parameter names. Use this parameter only when parameterize is set to true.
createLayerType
Optional. Specifies whether to create a new layer type definition that references the generated template. The alias of the new layer type definition uses the alias of the generated template, for example if the template alias is my-template, the layer definition alias is MY-TEMPLATE. Valid values:
*true (default) - create a new layer definition
*false - do not create a new layer definition
overwrite
Optional. Use only when updating a template. Specifies whether to overwrite an existing template with the same alias name. Valid values:
*true - overwrite the template
*false - (default) do not overwrite the template
Example Metadata File for Exporting a Platform Manager Instance to an Infrastructure Template
Use the following template metadata file to generate an infrastructure micro template named "spm-infra," which contains the hostname of the Platform Manager node, where the "COMMON-MEMORY" configuration instance will be exported, configurations will be parameterized, and if a template with the same name already exists, it will be overwritten:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<generateCompositeTemplate>
<alias>spm-infra</alias>
<nodeAlias>local</nodeAlias>
<runtimeComponentId>OSGI-SPM</runtimeComponentId>
<parameterize>true</parameterize>
<infrastructure>
<includeHostname>true</includeHostname>
</infrastructure>
<configurations>
<configurationTypeId>COMMON-MEMORY</configurationTypeId>
</configurations>
<overwrite>false</overwrite>
</generateCompositeTemplate>
Example Metadata File for Generating an Integration Server Template
Use the following template metadata file to generate a template named "is-config," which contains all typical Integration Server configurations from the "OSGI-IS_default" Integration Server run-time component in the "local" installation, where configurations will be parameterized, the "is" prefix will be added in front of each exported parameter, and if a template with the same name already exists, it will be overwritten:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<generateCompositeTemplate>
<alias>is-config</alias>
<nodeAlias>local</nodeAlias>
<runtimeComponentId>OSGI-IS_default</runtimeComponentId>
<configurations exclude="true">
<runtimeComponent id="OSGI-IS_default">
<configurationTypeId>COMMON-CONFIGURATION-TYPE-METADATA</configurationTypeId>
</runtimeComponent>
<runtimeComponent id="integrationServer-default">
<configurationTypeId>COMMON-CONFIGURATION-TYPE-METADATA</configurationTypeId>
</runtimeComponent>
</configurations>
<parameterize>true</parameterize>
<paramPrefix>is</paramPrefix>
<overwrite>true</overwrite>
</generateCompositeTemplate>
Example Metadata File for Generating an Integration Server Template with a Nodes Section
Use the following template metadata file to generate a template named "is-config," which contains a nodes: section, all typical Integration Server configurations from the "OSGI-IS_default" Integration Server run-time component in the "local" installation, where configurations will be parameterized, the "is" prefix will be added in front of each exported parameter, and if a template with the same name already exists, it will be overwritten:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<generateCompositeTemplate>
<alias>is-config</alias>
<nodeAlias>local</nodeAlias>
<runtimeComponentId>OSGI-IS_default</runtimeComponentId>
<infrastructure>
<includeHostname>true</includeHostname>
</infrastructure>
<configurations exclude="true">
<runtimeComponent id="OSGI-IS_default">
<configurationTypeId>COMMON-CONFIGURATION-TYPE-METADATA</configurationTypeId>
</runtimeComponent>
<runtimeComponent id="integrationServer-default">
<configurationTypeId>COMMON-CONFIGURATION-TYPE-METADATA</configurationTypeId>
</runtimeComponent>
</configurations>
<parameterize>true</parameterize>
<paramPrefix>is</paramPrefix>
<overwrite>true</overwrite>
</generateCompositeTemplate>
Example When Executing on Command Central
To generate a template using the properties, defined in the "my-is-config.xml" template metadata file:
sagcc exec templates composite generate -i my-is-config.xml