Software AG Command Central 10.2 | Automation and Template-based Provisioning | Using Composite Templates | Understanding the Composite Template Definition | Templates
 
Templates
You define inline templates in the templates section. The templates included in this section are identified by a unique template alias. In the templates section, you can include the following optional sections:
products
A list of IDs for the products that you want to install. You can list the product IDs using the sagcc list repository products content command or by selecting the Show ID Column check box when viewing the contents of a product repository in the web user interface.
Example syntax
products:
productID:
instanceName:
${node.host}: value
${node.alias}: value
${src.node.host}: value
configuration:
runtimeComponentID:
CONFIG-TYPE:
CONFIG-TYPE-instance1:
config_setting1: value
config_setting2: value
You can also use a reference variable for instanceName:
${instance.name}:
Note that when a product does not support multiple instances the instance name is default:
In the templates/templateId/products/productId/instanceName sections, you can include the following context parameters:
*${node.host}:
Resolves to the host of the node on which the template is provisioned.
*${node.alias}:
Resolves to the alias of the node on which the template is provisioned.
*${src.node.host}:
When environment.mode=MIGRATION, resolves to the host of the source node for the migration. For details about the migration settings you can specify for a product instance defined under instanceName, see Migration Settings for Product Instances.
Based on the type of data that each configuration setting supports, you can specify the values in the configuration settings parameters in one of the following formats:
*YAML
*JSON
*XML
*multi-line plain text
*variable
For details about the supported formats for each COMMON-* configuration type, see Format of COMMON-* Configuration Types in the Template Definition.
fixes and support patches
Use the fixes: section to specify a list of IDs for the fixes that you want to install. Command Central installs the latest available version of each fix and its dependencies from the fix repository defined in the template. You can find the fix IDs and the exact version number of a fix using the sagcc list repository fixes content or by selecting the Show Fix Name Column check box when viewing the contents of a fix repository in the web user interface. For example:
fixes: [wMFix.Product1Fix, wMFixProduct2Fix]
You can include the exact version number of a fix in the following format wMFix.productFixID_major.minor.service.fix-build. For example:
fixes: [wMFix.Product1Fix_10.2.0.0001-0001, wMFix.Product2Fix_10.2.0.0003-0123]
If the fixes: list is empty, Command Central does not install any fixes:
fixes: []
The fixes: section functions differently, based on the version of the template DSL.
Template DSL version 1.0
With template DSL version 1.0, support patches are listed in the fixes: section, for example:
fixes: [wMFix.Product1Fix, wMFix.Product2Fix, patchKey1, patchKey2]
If you set the fixes: section to ALL, Command Central installs all the latest fixes required for the products in the installation:
fixes: ALL
If you include the patches: section, the template validation fails.
The following example shows how the fixes: section functions with template DSL version 1.0:
*If "product1" and "product2" are not installed, Command Central installs "product1" and "product2" from the "repoProducts" repository.
*Command Central installs "wMFix.fix1_v1", "wMFix.fix2_v3", "cdkey1", and "cdkey2" with their dependencies, in the order in which they are listed, from the "repoFixes" repository . Command Central uninstall automatically all support patches that prevent installing the fixes from the list.
*Command Central creates "product2_Instance" for "product2 " (if the instance does not exist).
*Command Central re-installs the fixes and patches required for the product2 instance (the fixes are installed before the patches). However, Command Central cannot uninstall the support patches that prevent re-installing the official fixes required for the product2 instance, which might cause the template execution to fail.
alias: sagTemplate
dslVersion: "1.0"


layers:
layer1:
productRepo: repoProducts
fixRepo: repoFixes
templates: template1
templates:
template1:
fixes: [wMFix.fix1_v1, wMFix.fix2_v3, cdkey1, cdkey2]
products:
product1:
product2:
product2_Instance:
Template DSL version 1.1
Important: Beginning with template DSL version 1.1, you cannot list support patches in the fixes: section.
If you specify ALL, Command Central installs all the latest fixes required for the products defined in the inline template:
fixes: ALL
Use the patches: section to specify a list of support patches that you want to install in addition to the installed fixes. Software AG strongly recommends that you do not install support patches in a production environment.
patches: [patchKey1, patchKey2] #Support patches get installed
#in the order in which they are listed.
If the patches: list is empty, Command Central does not install support patches.
patches: []
Command Central automatically uninstalls all existing support patches that prevent the installation of fixes or support patches defined in the fixes: and patches: sections. Any other support patches that do not get in the way of installing the fixes and support patches listed in the inline template, remain unchanged.
If you specify a list of fixes: and a list of patches:, the fixes get installed before the support patches.
Examples:
*In the following example:
*If "product1" and "product2" are not installed, Command Central installs "product1" and "product2" from the "repoProducts" repository.
*Command Central installs "wMFix.fix1_v1", "wMFix.fix2_v3", "cdkey1", and "cdkey2" with their dependencies, in the order in which they are listed, from the "repoFixes" repository. Command Central uninstall automatically all support patches that prevent installing the fixes from the list.
*Command Central creates "product2_Instance" for "product2 " (if the instance does not exist).
*Command Central re-installs the fixes and patches required for the product2 instance (the fixes are installed before the patches). Command Central also automatically uninstalls all support patches that prevent re-installing the official fixes required for the product2 instance.
alias: sagTemplate
dslVersion: "1.1"


layers:
layer1:
productRepo: repoProducts
fixRepo: repoFixes
templates: template1
templates:
template1:
fixes: [wMFix.fix1_v1, wMFix.fix2_v3]
patches: [cdkey1, cdkey2]
products:
product1:
product2:
product2_Instance:
*In the following example:
*If "product1" and "product2" are not installed, Command Central installs "product1" and "product2" from the "repoProducts" repository.
*Command Central installs only the fixes in the "repoFixes" repository that are required for "product1" and "product2" (with all their dependencies), but does not install fixes for any other products that already exist in the same installation with "product1" and "product2".
*Command Central creates "product2_Instance" for "product2 " (if the instance does not exist).
*Command Central re-installs the fixes and patches required for the product2 instance (the fixes are installed before the patches). Command Central also automatically uninstalls all support patches that prevent re-installing the official fixes required for the product2 instance.
alias: sagTemplate
dslVersion: "1.1"


layers:
layer1:
productRepo: repoProducts
fixRepo: repoFixes
templates: template1
templates:
template1:
fixes: ALL
patches: []
products:
product1:
product2:
product2_Instance:
When the template is executed for a second time with the same fix repository, if "repoFixes" does not include new fixes, the template does not make any changes to the installed support patches and leaves them as is. If "repoFixes" contains a new set of official fixes for "product1" and "product2" and their dependencies, the template installs this new set of fixes and uninstalls the support patches that prevent the installation of the fixes.
files
A map of files that Command Central will copy to the target installation. For example:
target/file1: “src/file”
where target is the path to the directory to which to copy the file and scr is the path to the source directory from which to get the file. The target path is always relative to the target installation directory and the source path is relative to the root folder of the composite template.
licenses
A map of license key aliases that Command Central uses to copy the license key file assigned to a specific license key alias to the target location. For example:
"target/licenseKey1": "${alias}"
where target is the path to the directory to which to copy the license key file and “alias” is the license key alias. The "${alias}" value is not case-sensitive and you can use wildcard characters, for example:
"target/licenseKey": "*_<productCode>_<majorVersion>.*_${os.platform}"
You refer to the license key file by an alias, which you can define in:
*the Licensing view of the Command Central web user interface
*an environment properties file
*the CLI license-tools keys commands
*an argument of the sagcc exec templates composite apply command
Reference parameters for node aliases
You can refer to a node alias from an inline template in the templates section using one of the following parameters by reference:
Note: The parameters in the table are supported with DLS version 1.1.
Parameter
Description
${node.alias.prefix}
Use only when the mapping policy for node alias is set to INDEX. The prefix of the node alias. When policy HOST or EXISTING, the value of this parameter is empty.
${nodes[i]}
The node aliases of the infrastructure layer with an index number, for example ${nodes[1]}. The parameter includes all node aliases for the entire environment, not just for the layer in which the inline template gets included.
${hosts[i]}
The hosts of the infrastructure layer with an index number, for example ${hosts[1]} The parameter includes all hosts for the entire environment, not just for the layer in which the inline template gets included.
${nodes.count}
The number of nodes on which to apply the template, for example 3. The value is 1 or higher, although 0 is also a valid value.
${node.index}
The index number of the node in the entire environment. The value starts at 1 and goes as high as ${nodes.count}.
${myLayer.nodes[i]}
The node alias of myLayer with a node index number, for example ${um.nodes[1]}.
${myLayer.hosts[i]}
The node alias of myLayer with the host index number, for example ${um.hosts[1]}.
${myLayer.nodes.count}
The number of nodes in myLayer. The value starts at 1 and goes as high as ${nodes.count}.
${myLayer.node.index}
The index number of the node in myLayer. The value starts at 1 and goes as high as ${myLayer.nodes.count}.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release