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
 
sagcc exec templates composite generate
Based on the input arguments that you include, the command can:
*Generate a run-time micro template from an installed product instance.
*Generate an infrastructure micro template from the Platform Manager instance in an installation.
*Export the database for the products in an installation to a database micro template.
*Generate a migration template from an installed product instance.
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.
After you run the command, you can monitor the progress of the template generation job from the Jobs view in the Command Central web user interface.
Syntax
*Command Central syntax:
*Export an installed product instance to a run-time micro template
sagcc exec templates composite generate alias=templateAlias nodeAlias=nodeAlias
runtimeComponentId=runtimeComponentId [parameterize={true | false}]
[paramPrefix=paramPrefix] [options=CONFIGURATION] [options=INSTANCES] [options=PRODUCTS]
[options=FIXES] [options=INFRASTRUCTURE] [overwrite={true | false}] [createLayerType={true | false}]
*Export the Platform Manager instance in an installation to an infrastructure micro template
sagcc exec templates composite generate alias=templateAlias nodeAlias=nodeAlias
options=INFRASTRUCTURE [parameterize={true | false}] [paramPrefix=paramPrefix]
[overwrite={true | false}] [createLayerType={true | false}]
*Export the database for the products in an installation to a database micro template
sagcc exec templates composite generate alias=templateAlias nodeAlias=nodeAlias
options=DATABASE db.url=JDBC_URL db.username=username
db.password=password db.type=type [overwrite={true|false}]
[dbUseComponentsLatestVersion={true|false}] [createLayerType={true|false}]
-s local_CCE_URL
*Not supported on Platform Manager.
Arguments and Options for Exporting an Instance to a Run-time Template
Argument or Option
Description
alias=templateAlias
Required. The alias name of the run-time micro template to generate.
nodeAlias=nodeAlias
Required. The alias name of the installation on which the product instance is installed.
runtimeComponentId=runtimeComponentId
Required. The ID of the product instance for which to generate the template.
[parameterize={true|false}]
Optional. Specifies whether to parameterize the exported configurations. Valid values:
*true - parameterize the configurations
*false - (default) do not parameterize the configurations
[paramPrefix]
Optional. Use only when parameterize=true. Specifies a prefix to be added to the exported parameter names.
[options=CONFIGURATION]
[options=INSTANCES]
[options=PRODUCTS]
[options=FIXES]
Optional. Include one or more of the options arguments to specify what information about the product instance you want to include in the templates: section of the generated template:
*CONFIGURATION - Includes the configuration for the product instance (and its child run-time components)
*INSTANCES - Includes the instance properties
*PRODUCTS - Includes a list of product inline templates in the templates:templateAlias:products: section. The command determines which products get included in the list based on the version of the source installation.
*FIXES - Includes a templates:templateAlias:fixes: section. Only with DSL "1.1", if the source product instance has been updated with patches, this option also includes a templates:templateAlias:patches: section. Based on the version of the source installation, the generated template will differ as described in the options=FIXES usage note.
For details about the options arguments, see the Usage Notes.
[options=INFRASTRUCTURE]
Optional. For details about using the argument when exporting a product instance, see the "Usage Notes for Exporting a Platform Manager Instance".
[overwrite={true|false}]
Required when you execute the command to update 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
[createLayerType={true|false}]
Optional. Specifies whether to create a new RUNTIME 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.
*true (default) - create a new layer definition
*false - do not create a new layer definition
Arguments and Options for Exporting Platform Manager to an Infrastructure Template
Argument or Option
Description
alias=templateAlias
Required. The alias name of the infrastructure micro template to generate.
nodeAlias=nodeAlias
Required. The alias name of the installation from which you export Platform Manager.
options=INFRASTRUCTURE
Required. Exports all data for the Platform Manager instance, such as Platform Manager components, product plugins, fixes, and configurations. You can also filter which Platform Manager data to include in the generated infrastructure template as described in the "Usage Notes for Exporting a Platform Manager Instance".
[parameterize={true|false}]
Optional. Specifies whether to parameterize the exported configurations. Valid values:
*true - parameterize the configurations
*false - (default) do not parameterize the configurations
Note that the cc.installer and credentials keys properties are parameterized in the generated template, even when parameterize=false, because they are required parameters.
[paramPrefix]
Optional. Use only when parameterize=true. Specifies a prefix to be added to the exported parameter names.
[overwrite={true|false}]
Required when you execute the command to update 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
[createLayerType={true|false}]
Optional. Specifies whether to create a new INFRASTRUCTURE 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.
*true (default) - create a new layer definition
*false - do not create a new layer definition
Arguments and Options for Exporting a Database to a Database Template
Argument or Option
Description
alias=templateAlias
Required. The alias name of the database micro template to generate.
nodeAlias=nodeAlias
Required. The alias name of the installation, from which to export the database.
options=DATABASE
Required. Exports the database for the products in the installation to a database template. For more details about how to use the generated database template, see Managing Database Components Using a Template.
db.url=JDBC_URL
Required. The JDBC URL to use to connect to the database.
db.username=username
Required. The name of a user account that has access to the database.
db.password=password
Required. The password of the user account you specified in db.username.
db.type=type
Required. The type of the database to which you want to connect, such as oracle, sqlserver, or mysql. For a list of supported database types, see System Requirements for Software AG Products.
[overwrite={true|false}]
Required when you execute the command to update 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
[dbUseComponentsLatestVersion={true|false}]
Optional. Indicates whether to export the database components and schemas with the latest version. Valid values:
*true (default) - export the database components and schemas with the latest version
*false - export the database components and schemas with the release version of the source installation
[createLayerType={true|false}]
Optional. Specifies whether to create a new DATABASE 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.
*true (default) - create a new layer definition
*false - do not create a new layer definition
-s
Specify the URL of the local Command Central. For details about this option see server.
General Usage Notes
*All exported passwords are encrypted. For details about encrypting passwords, see Encrypting Passwords in Templates.
*The command allows all common options supported by the Command Line Interface. For a description of the options, see Common Options.
Usage Notes for Exporting a Product Instance
*If you run the command without the products, instances, fixes, and configuration options, the generated template includes all the information about the product instance: instance properties, fixes, configurations, and inline templates for the products hosted on the instance and their configurations.
*When using options=CONFIGURATION, the command exports all configurations for the specified product instance, including the configurations for its child run-time components, if any. To select and extract only specific configurations, use the sagcc exec templates composite generate input command.
*When using options=PRODUCTS and options=INSTANCES, the generated template includes the following template snippet:
environments:
default:
repo.product: ${} # Parameter for the product repository from
# which to install products
layers:
product-template-layer:
templates: product-instance-template
productRepo: ${repo.product} # Placeholder parameter for the product repository
templates:
product-instance-template:
products:
product1:
product2:
product3:
instanceProperty1: instancePropertyValue1
instanceProperty2: instancePropertyValue2
*When using options=FIXES, the generated template depends on the version of the source installation.
If the source installation is version 10.5 and higher, the command generates a template with fixes and patches parameters that list the fixes installed on the source installation. When applying the template snippet from the following example, Command Central will install the same fixes (and patches) as the ones installed on the source installation:
dslVersion: "1.1" # Added only when exporting a list of patches.
environments:
default:
fixes: [fix1, fix2, fix3]
patches: [patch1, patch2] # Supported only in DSL "1.1" and higher.
repo.fix: ${} # Parameter for the fix repository from
# which to install fixes.
layers:
product-template-layer:
templates: product-instance-template
fixRepo: ${repo.fix} # Placeholder parameter for the fix repository.
provision:
default:
product-template-layer: ${nodes}
templates:
product-instance-template:
fixes: ${fixes} # А fixes section in the inline template of
# the product instance that refers to the
# "fixes" parameter.
patches: ${patches} # А patches section in the inline template
# of the product instance that refers to the
# "patches" parameter.
If the source installation is version 10.4 and lower, the command generates a template with the fixes: ALL parameter. When applying the template snippet from the following example, Command Central will install all fixes available for the product instance in the fix repository:
environments: 
default:   
prefix.fixes: ALL # Parameter that indicates to install all fixes
# for the product instance.
    repo.fix: ${} # Parameter for the fix repository from which
# to install fixes.
layers:
product-template-layer:   
templates: product-instance-template   
fixRepo: ${repo.fix} # Placeholder parameter for the fix repository.
provision:  
default:   
product-template-layer: ${nodes}
templates: 
product-instance-template:   
fixes: ${prefix.fixes} # А fixes section in the inline template of the product
# instance that refers to the "prefix.fixes" parameter.
*Command Central always extracts license keys and paths to file locations, which cannot be resolved from the Software AG installation directory, as parameters with required values, for example:
environments:
default: 
instance.license.key: ${}
instance.data.dir: ${}
You must provide the required values for such parameters when creating a layer using the layer definition of the generated template. If you apply the generated template with the apply composite templates command, specify the values in a properties file or as parameters in the apply composite templates command.
*When using options=PRODUCTS, the list of product inline templates in the generated template 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).
*When generating the run-time micro template, Command Central does not extract files that the product instance uses.
Usage Notes for Exporting a Platform Manager Instance
*When you specify only the options=INFRASTRUCTURE argument, Command Central exports all data for the Platform Manager instance. You can use options=PRODUCTS, options=FIXES, and options=CONFIGURATION to determine what information about Platform Manager you want to include in the templates: section of the generated template.
*options=PRODUCTS Includes a list of the Platform Manager components and any installed product plugins in the templates:templateAlias:products: section.
*options=FIXES Includes a templates:templateAlias:fixes: section
*options=CONFIGURATION Includes all configuration instances of all configuration types for the Platform Manager instance. You can filter which configurations to include in the generated template using the sagcc exec templates composite generate input command.
*When exporting a Platform Manager instance with products, the generated template includes Platform Manager plugins only if the installation contains Platform Manager plugins that are not part of a runtime instance. For example, if the installation contains a Platform Manager plugin for Integration Server but no Integration Server runtime instances, then Command Central lists the plugin in the products: section of the infrastructure template. Command Central lists all other Platform Manager plugins in the runtime template for the respective product.
*After exporting a Platform Manager instance with fixes, you must check the version of the Command Central boostrapper that you will specify in the cc.installer: ${} parameter in the generated template. If you specify a bootstrapper that contains fixes with a higher version than the ones listed in the generated template, the fixes from the bootstrapper will get installed and will replace the ones from the template.
Usage Note for Exporting an Instance to a Migration Template
When you include the options=INFRASTRUCTURE argument, Command Central generates a migration template that you can use to migrate the product instance. The generated template includes a nodes: section with the infrastructure data of the Platform Manager node, on which the product instance is installed.
For example, to generate a migration template with alias "IS-default-migration" for the "OSGI-IS_default" product instance, installed in the local Platform Manager installation:
sagcc exec templates composite generate alias=IS-default-migration
nodeAlias=local runtimeComponentId=OSGI-IS_default
options=INFRASTRUCTURE options=INSTANCES options=PRODUCTS
Usage Note for Exporting a Database
Note that the generated database template does not include the database storage component. Before you apply the database template in an installation or use it to create a database layer in a product stack, you must ensure that the database storage component for the database is already created.
Examples of Exporting a Product Instance to a Template
To extract all configurations for the "OSGI-IS_default" run-time component, installed in the "local" installation, to a template with alias "is-config" and use the "is" prefix for the parameters in the generated template. If a template with the specified alias exists, the generated template will overwrite it.
sagcc exec templates composite generate alias=is-config nodeAlias=local parameterize=true
paramPrefix=is options=CONFIGURATION runtimeComponentId=OSGI-IS_default overwrite=true
To extract all instance properties and configurations for the "OSGI-IS_default" product instance, installed in the "local" installation, to a template with alias "is-config".
sagcc exec templates composite generate alias=is-config nodeAlias=local options=INSTANCES
options=CONFIGURATION runtimeComponentId=OSGI-IS_default
To generate a template with all the information about the "OSGI-IS_default" product instance, installed in the "local" installation, to a template with alias "is-config".
sagcc exec templates composite generate alias=is-config nodeAlias=local
runtimeComponentId=OSGI-IS_default
Examples of Exporting a Platform Manager Instance to a Template
To extract and parameterize all configurations for the local Platform Manager, to a template with alias "SPM-infra". If a template with the specified alias exists, the generated template will overwrite it.
sagcc exec templates composite generate alias=SPM-infra nodeAlias=local
parameterize=true options=INFRASTRUCTURE options=CONFIGURATION overwrite=true
Example of Exporting a Database to a Template
To export the database components and schemas for the products in the installation with alias "sag1" to a database template with alias "db-template1", using the database connection details for the database with name "myDatabase" and type "sqlserver":
sagcc exec templates composite generate alias=db-template1 nodeAlias=sag1 options=DATABASE
db.url="jdbc:wm:Sqlserver://rubicon:1433;databaseName=myDatabase"
db.username=myDbUser db.password=myDbUser_password db.type=sqlserver overwrite=true
dbUseComponentsLatestVersion=false -s http://localhost:8090
The generated database template is automatically imported into the local Command Central installation and will overwrite any imported template with the same template alias. The database components and schemas will get exported with the version of the source installation.