sagcc exec templates composite apply
Applies a composite template registered and available under the specified alias in a Command Central installation.
Syntax
Command Central syntax:
With input parameters:
sagcc exec templates composite apply template_alias
environment.mode={provision | migration | migrate}
param1=v1 param2=v2 [param3=v3...paramn=vn] [options]
With input properties file:
sagcc exec templates composite apply template_alias
{--input | -i} filename.properties [options]
Not supported on
Platform Manager.
Arguments and Options
Argument or Option | Description |
template_alias | Required. The alias for the template to apply. You can determine the template alias using the sagcc list templates composite command. |
environment.mode= {provision | migrate | migration}
| Optional for the provisioning operation, but required when migrating an environment. Indicates the type of operation the apply command will execute. Valid values: provision - the command installs a new environment migrate | migration - the command migrates an existing environment |
param1=v1 param2=v2 [param3=v3...paramn=vn]
| Required. The input parameters declared in the template_alias YAML file. |
{--input | -i} filename.properties | Required. A properties file that contains the input parameters declared in the template_alias YAML file |
[options] | Optional. The command allows all options supported by the Command Line Interface. For a description of the options, see Common Options. |
Usage Note
You can include both the
param1=v1 param2=v2 [param3=v3...paramn=vn] argument and an input properties file in the same command. The values of the input parameters from the argument will override the values of the same parameters specified in the properties file.
When applying a composite template on the local installation,
Command Central and
Platform Manager will restart and the apply composite template job does not show on the jobs list.
If one of the target nodes defined in a composite template is the localhost node,
Command Central does not get restarted during the composite template application on the local node.
When you include the
environment.mode=migrate parameter, the apply command migrates the environment, but does not create new product instances. The product instances get created by the product migration utilities as described in
Upgrading Software AG Products.
When applying a composite template, the main composite template apply job returns DONE status even when a sub-job in the composite template that
Command Central applies fails. However, the main composite template apply job also returns
customStatus=WARNING to indicate that a sub-job has failed.
Examples When Executing on Command Central
The composite template with alias “myTemplate” is already imported in a
Command Central installation. The template provisions an environment with type “dev” and installs a Platform Manager with alias “dev2” and port “7292” in the specified installation directory:
sagcc exec templates composite apply myTemplate environment.type=dev
spm.alias=dev2 spm.port=7292 install.dir=C:\dev\nodes\dev2
To apply a template with alias “myTemplate”, which is already imported in a
Command Central installation, using the input parameters specified in the “mydevenv.properties” file:
sagcc exec templates composite apply myTemplate -i mydevenv.properties
The composite template with alias “myTemplate” does not include a migration section and uses default migration settings. The template is applied on the “is1” and “is3” hosts:
sagcc exec templates composite myTemplate environment.mode=migrate
hosts=[is1,is3]
Because “myTemplate” uses default migration settings, the apply command renames the source installation directory and applies the source ports and database defined in the template to the target environment.
The “myTemplate” composite template uses default migration settings and is applied on the “is1” and “is3” hosts. The apply command migrates “myTemplate” from the “/opt/sag98” source directory to the “/opt/sag910” target installation directory:
sagcc exec templates composite myTemplate environment.mode=migrate
hosts=[is1,is3] src.install.dir=/opt/sag98 install.dir=/opt/sag910