Command Central 10.15 | Using the Command Line Interface | Template Commands | sagcc exec templates composite generate migration
 
sagcc exec templates composite generate migration
Generates a migration template that includes the infrastructure data of the sourcePlatform Manager nodes. You can generate migration templates for one of the following supported migration types:
*Overinstall: same installation directory, hosts, and ports
*Side-by-side: new installation directory, same hosts and ports
*Cross-host: new hosts, same ports. The installation directory can have the same or a new value.
You can also export infrastructure data to a generic migration template that you can use for any of the supported migration types.
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 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:
sagcc exec templates composite generate alias=templateAlias
nodeAlias=nodeAlias options=migration [migration.type={overinstall|sidebyside|crosshost|generic}]
[overwrite={true | false}] [options]
*Not supported on Platform Manager.
Arguments and Options
Argument or Option
Description
alias=templateAlias
Required. The alias name of the template to generate.
nodeAlias=nodeAlias
Required. The alias name of the installation from which to generate a template.
options=migration
Required. Exports all data for the Platform Manager node to a migration template. The template includes data about the Platform Manager components, product plugins, fixes, configurations, and includes the parameters required for migrating the Platform Manager node. The migration parameters will depend on the migration type you set in the command.
[migration.type={overinstall|sidebyside|crosshost|generic}]
Optional. The type of migration for which to generate a template. Valid values:
*overinstall
*sidebyside
*crosshost
*generic (default)
When you do not include this argument, the command exports the data to a generic template.
[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
[options]
Optional. The command allows all options supported by the Command Line Interface. For a description of the options, see Common Options.
Usage Notes
*You can generate a product instance template with a nodes: section and use it to migrate a product instance, as described in "Usage Notes for Exporting an Instance to a Migration Template" in sagcc exec templates composite generate.
*When migration.type=overinstall, the Platform Manager connection and bootstrap details for the source nodes get exported to the nodes: section of the template. When you use the migration template for overinstall upgrade, the source node details in the nodes: section (such as installation directory, ports, and credentials) are also used for the target nodes.
*When migration.type=sidebyside, the Platform Manager connection and bootstrap details for the source nodes get exported to the migration:nodes: section of the template and have the source. prefix. When you use the migration template for side-by-side upgrade, the details in the nodes: section of the template specify the installation directory, ports, and credentials for the target nodes. Note that the nodes.install.dir: ${} is a required parameter, because you must always specify a new directory for the target installation when running a side-by-side migration.
Example:
dslVersion: ${dsl.version}

environments:
default:
cc.installer: ${} # The file name of the Command Central bootstrap installer
# to bootstrap the target Platform Manager.
dsl.version: '1.2' # The version of the template DSL.
nodes.install.dir: ${} # The installation directory of the target Platform Manager node.
nodes.spm.credentials.key: ${} # The credentials alias for the target Platform Manager.
nodes.spm.is.secure.connection: true
nodes.spm.port: ${} # The port of the target Platform Manager.
nodes.ssh.login.credentials.key: ${} # The SSH login credentials alias for the remote target machine.
nodes.ssh.port: ${} # The SSH port of the remote target machine.
nodes.ssh.substitute.credentials.key: ${nodes.ssh.login.credentials.key}
source.nodes.install.dir: C:\sag\cc # The installation directory of the source Platform Manager node.
source.nodes.spm.credentials.key: ${} # The credentials alias to connect to the source Platform Manager.
source.nodes.spm.is.secure.connection: true
source.nodes.spm.port: 8093 # The port of the source Platform Manager.
source.nodes.ssh.login.credentials.key: ${} # The SSH login credentials alias for the remote source machine.
source.nodes.ssh.port: 22 # The SSH port of the remote source machine.
source.nodes.ssh.substitute.credentials.key: ${source.nodes.ssh.login.credentials.key}

...

migration: # The Platform Manager connection and bootstrap details for the source nodes.
nodes:
default:
default:
port: ${source.nodes.spm.port}
secure: ${source.nodes.spm.is.secure.connection}
credentials: ${source.nodes.spm.credentials.key}
bootstrapInfo:
installDir: ${source.nodes.install.dir}
port: ${source.nodes.ssh.port}
credentials: ${source.nodes.ssh.login.credentials.key}
substituteUserCredentials: ${source.nodes.ssh.substitute.credentials.key}

nodes: # The Platform Manager connection and bootstrap details for the target nodes.
default:
default:
port: ${nodes.spm.port}
secure: ${nodes.spm.is.secure.connection}
credentials: ${nodes.spm.credentials.key}
bootstrapInfo:
installer: ${cc.installer}
installDir: ${nodes.install.dir}
port: ${nodes.ssh.port}
credentials: ${nodes.ssh.login.credentials.key}
substituteUserCredentials: ${nodes.ssh.substitute.credentials.key}
*When migration.type=crosshost, the Platform Manager connection and bootstrap details for the source nodes get exported to the migration:nodes: section of the template and have the source. prefix. When you use the migration template for cross-host upgrade, the details in the nodes: section of the template specify the host, installation directory, ports, and credentials for the target nodes. Note that the nodes.local.host: ${} is a required parameter, because you must always specify a new host for the target installation when running a cross-host migration.
Example:
dslVersion: ${dsl.version}

environments:
default:
cc.installer: ${} # The file name of the Command Central bootstrap installer
# to bootstrap the target Platform Manager.
dsl.version: '1.2' # The version of the template DSL.
nodes.install.dir: ${} # The installation directory of the target Platform Manager node.
nodes.local.host: ${} # The name of the host, on which to install the target Platform Manager node.
nodes.spm.credentials.key: ${} # The credentials alias for the target Platform Manager.
nodes.spm.is.secure.connection: true
nodes.spm.port: ${} # The port of the target Platform Manager.
nodes.ssh.login.credentials.key: ${} # The SSH login credentials alias for the remote target machine.
nodes.ssh.port: ${} # The SSH port of the remote target machine.
nodes.ssh.substitute.credentials.key: ${nodes.ssh.login.credentials.key}
source.nodes.install.dir: C:\sag\cc # The installation directory of the source Platform Manager node.
source.nodes.local.host: localhost # The name of the host, on which the source Platform Manager is installed.
source.nodes.spm.credentials.key: ${} # The credentials alias to connect to the source Platform Manager.
source.nodes.spm.is.secure.connection: true
source.nodes.spm.port: 8093 # The port of the source Platform Manager.
source.nodes.ssh.login.credentials.key: ${} # The SSH login credentials alias for the remote source machine.
source.nodes.ssh.port: 22 # The SSH port of the remote source machine.
source.nodes.ssh.substitute.credentials.key: ${source.nodes.ssh.login.credentials.key}

...

migration: # The Platform Manager connection and bootstrap details for the source nodes.
nodes:
default:
local:
host: ${source.nodes.local.host}
default:
port: ${source.nodes.spm.port}
secure: ${source.nodes.spm.is.secure.connection}
credentials: ${source.nodes.spm.credentials.key}
bootstrapInfo:
installDir: ${source.nodes.install.dir}
port: ${source.nodes.ssh.port}
credentials: ${source.nodes.ssh.login.credentials.key}
substituteUserCredentials: ${source.nodes.ssh.substitute.credentials.key}

nodes: # The Platform Manager connection and bootstrap details for the target nodes.
default:
local:
host: ${nodes.local.host}
default:
port: ${nodes.spm.port}
secure: ${nodes.spm.is.secure.connection}
credentials: ${nodes.spm.credentials.key}
bootstrapInfo:
installer: ${cc.installer}
installDir: ${nodes.install.dir}
port: ${nodes.ssh.port}
credentials: ${nodes.ssh.login.credentials.key}
substituteUserCredentials: ${nodes.ssh.substitute.credentials.key}
*When migration.type=generic, the migration template includes both the nodes: and migration:nodes: section and the type of migration is determined by the values you specify for the parameters with the nodes. prefix. When applying a generic template, set the parameters for each migration type as follows:
*Overinstall: set the same host in the nodes.local.host: and source.nodes.local.host: parameters, and the same installation directory in the nodes.install.dir: and source.nodes.install.dir: parameters.
*Side-by-side: set the same host in thenodes.local.host: and source.nodes.local.host: parameters, but different installation directories in the nodes.install.dir: and source.nodes.install.dir: parameters.
*Cross-host: set different hosts in thenodes.local.host: and source.nodes.local.host: parameters.
Examples When Executing on Command Central
To export the infrastructure data for the local Platform Manager to a generic migration template with alias "local-migration-generic", which you can use for overinstall, side-by-side, or cross-host migration:
sagcc exec templates composite generate alias=local-migration-generic
nodeAlias=local options=migration
To export the infrastructure data for the local Platform Manager to a migration template with alias "local-migration-sidebyside", which you can use for side-by-side migration:
sagcc exec templates composite generate alias=local-migration-sidebyside
nodeAlias=local options=migration migration.type=sidebyside