Command Central 10.5 | Using Micro Templates | Exporting an Installed Product Instance to a Micro Template
 
Exporting an Installed Product Instance to a Micro Template
You can export a product instance, which is installed in an installation managed by Command Central, to a run-time micro template. Command Central generates a template with the product instance data, imports the generated template automatically, and creates a layer type definition for the template in the local Command Central installation. You can use the layer definition for the template to create a layer for the product instance in an existing stack.
In the Command Central web user interface, you access the Export wizard from the Overview page of a product instance by selecting the Export runtime option. By default, Command Central generates a template that includes the following data about the product instance:
*Instance properties
*Fixes
*Inline templates for the products hosted on the instance and their configurations
*Configurations of the product instance
If you do not want to include some of the product instance data, clear the checkbox for that data. For example, clear the Include Instance checkbox to indicate that the properties of the product instance should not get included in the generated template.
Note that the sections and parameters included in the generated template will depend on the release version of the installation from which you export the product instance. For details about the template that Command Central generates based on the selected instance data and the release version of the product instance, see the "Usage Notes" in sagcc exec templates composite generate.
By default, if you choose to include configurations, Command Central exports all configuration instances for all configuration types from the selected product instance and its child run-time components. In the Select Configuration Types step of the wizard, you can select which configuration types for the product instance and its child run-time components to include in the generated template.
You can view the exported template in the Templates view of the Command Central web user interface. If you want to modify the template, you can download and edit it in a text editor, and then re-import the template in Command Central.
Considerations when Exporting Configurations
If you choose to export the configuration settings of a product instance to a template, you must consider the following:
*You cannot apply an exported template with configurations on the same Platform Manager installation from which you exported the configurations. Software AG recommends using one virtual machine for the Platform Manager installation with the product instance that you want to export and another virtual machine for the Platform Manager installation in which to apply the exported template with configurations.
*If any of the configurations use full file paths, you must review the generated template and parameterize the configurations that include full file paths.
Example
The log4j.configurationFile property in the following COMMON-SYSPROPS configuration uses a full installation directory path that gets exported as follows:
COMMON-SYSPROPS:
COMMON-SYSPROPS:
osgi.install.area: '"%OSGI_INSTALL_AREA%"'
log4j.configurationFile.stripquotes: 'TRUE'
osgi.install.area.stripquotes: 'TRUE'
log4j.configurationFile: '"/home/vmtest/sag/profiles/CTP/configuration/logging/log4j2.properties"'
java.io.tmpdir.stripquotes: 'TRUE'
You can replace the hardcoded installation directory with a parameter:
log4j.configurationFile: '"${install.dir}/profiles/CTP/configuration/logging/log4j2.properties"'
And add the install.dir parameter in the environments: default: section of the template definition:
environments:
default:
install.dir: /home/vmtest/sag
...
If you replace all hardcoded full file paths in the exported template with parameters, you can apply the template on another machine and in a different installation directory from the source installation directory. If you do not replace the full file paths in the exported template, you must apply the template on another machine and in the same installation directory as the source installation.