Automation and Template-based Provisioning : Using Composite Templates : Understanding the Composite Template Definition : Migration
Migration
You can define an optional migration section in which you specify custom options and migration details for an environment. When you do not include a migration section in a composite template that you intend to use to migrate an environment, Command Central uses the default migration settings as described in How Command Central Processes a Composite Template. The migration section can include one or more of the following subsections:
options
Migration options to prepare the source nodes for migration. Following is a list of the options that you can customize:
snapshot
Creates a snapshot template with products, fixes, configuration, and files from each source node. The snapshot template does not include product instances. The products instances are created by the product migration utilities. The default value for source installations of release 9.5 or higher is true.
Syntax:
snapshot:
  execute: {true | false}
pause
Pauses all source run-time components. The default value is true.
Syntax:
pause:
  execute: {true | false}
Note:  
Command Central requests of all run-time components to pause, but a component processes this request only when it supports the pause operation. For example, Integration Server goes into Quiesce mode, instead of pausing.
shutdown
Stops all source run-time components. This option also shuts down Platform Manager by running the shutdown.sh/bat script remotely through the remoteAccess service. You can set the shutdown option to false only when migrating to a different host on a Unix operating system. For all other types of migration, the default value is true.
Important:  
To execute the shut-down operation successfully, Command Central must access the remote operating system through an SSH connection.
Syntax:
shutdown:
  execute: {true | false}
backup
Creates a backup of the source installation directory on the same host machine and transfers the backup archive to Command Central. Note that this step is skipped automatically when migrating on the same host. The backup operation is executed only when you set execute=true, which is the default value.
Important:  
To execute the back-up operation successfully, Command Central must access the remote operating system through an SSH connection.
When migrating to a different host, in the sourcePath parameter you specify the location in which to create an archive of the installation on the source node and in the targetPath parameter - the location to which to transfer the archive on the target node.
If you do not specify a value for sourcePath or targetPath, Command Central uses as default location:
user.home/migration_source_templateAlias_nodeAlias
where user.home is the home directory of the user on the source or target machine respectively, templateAlias is the alias of the composite template, and nodeAlias is the alias of the source installation.
You can specify which files to exclude from the backup in the excludes option. The default value for the excludes options is [“*.log”,“*.jar”,“*.zip”]. The output of the backup operation is an archive.
Syntax:
backup:
  execute: {true | false}
sourcePath: user.home/migration_source_templateAlias_nodeAlias
targetPath: user.home/migration_source_templateAlias_nodeAlias
  excludes: [“*.log”,
“*.jar”,“*.zip”]
rename
Renames the source installation directory to migration_source_installDir, where installDir is the name of the source installation directory. The rename operation is executed only when migrating on the same host and installation directory (overinstall) or if you set execute=true.
Syntax:
rename:
  execute: {true | false}
  targetPath: <the path goes here>
 migration_source_installDir
source
A list of the source nodes that host each layer. The source nodes are defined in source/environment.type/layerAlias subsections. For example, the source nodes for an “is” layer in a “cluster” environment are defined in the migration/source/cluster/is section.
nodes
Details about the source nodes, such as host, port, and bootstrap information.
Example
In the following composite template snippet, the “cluster” environment has a single “is” layer. The target migration nodes are identified from the “provision/cluster/is” section and the source migration nodes from the “migration/source/cluster/is” section. The source and target nodes use the same “is1” and “is2” hosts. Because the “migration/nodes” section does not have any properties, the source nodes map to the Platform Manager port “8093” and the “/opt/sag/test” installation directory, defined in the nodes/default section. The migrate operation creates a snapshot template with the products, fixes, configuration, and files for each source node, but does not create a backup archive. All run-time components, including Platform Manager are shut down before starting the migration process and the source installation directory is renamed to “migration_source_cc910”.
environments:
    default:
      install.dir: /opt/sag/test
      db.url: “jdbc:wm:sqlserver://dbhost1:1433;databaseName=db1”
      db.username: user1
      db.password: pass1
    cluster:
      is.hosts: [is1,is2]
     
layers:
    default:
      productRepo: webMethods-9.10-mirror
      fixRepo: Empower-9.10-mirror
    is:
      templates: [spm-tuneup,is-server]
    
templates:
    spm-tuneup:
      fixes: [wMFix.SPM.Core,wMFix.PIEspm]
    is-server:
      fixes: [wMFix.integrationServer.Core]
      products:
        integrationServer:
          is_inst1:
           primary.port: 5555
           db.url: ${db.url}
           db-username: ${db.username}
           db-password: ${db.password}
    
migration:
    options:
      snapshot:
        execute: true
      pause:
        execute: true
      backup:
        execute: true
        excludes: [“*.jar”,“*.log”]
      shutdown:
        execute: true
      rename:
        targetPath: /opt/sag/cc910
    source:
      cluster:
        is: [is1,is2]
    nodes:
    
provision:
    cluster:
      is: [is1,is2]
    
nodes:
    default:
      default:
        port: 8093
        secure: true
        bootstrapInfo:
          installDir: ${install.dir}
          repoName: cc-all-9.10-release-lnxamd64
Custom migration settings for product instances
You can specify custom migration settings for a product instance defined in a templates/templateId/products/productIdinstance_name section in the composite template definition. You must include the custom migration settings in properties files, named in the following format:
migrate_srcVersion-destVersion_sbs.dat
for example, migrate_9.8.0-9.10.0_sbs.dat
Add the .dat files in the composite template archive in the migration/productId directory.
If an inline template defined in the composite template includes only the product, but does not define any instances for that product, the settings in the .dat file under the directory with this product ID are applied for the product, but not for specific instances of the product. If the inline template includes the product and its instances, the settings in the .dat file for this product ID are applied for all instances defined for that product in the inline template.
Important:  
Note that on the Platform Manager side, the custom migration settings will be ignored if the migration source and target versions are different from the versions specified in the name of the custom migration settings file.
Example
In the following example, the product with ID “MwsProgramFiles” has a single instance with name “mws_inst1”. To use custom migration settings for “mws_inst1”, create a properties file with name “migrate_9.9.0-9.10.0_sbs.dat” in the migration/MwsProgramFiles directory. When applying the composite template, the custom migration settings from the file are applied for the “mws_inst1”.
templates
    mws-server:
      fixes:
      products:
        MwsProgramFiles:
         mws_inst1:
          http.port: 8585
          db.url: ${db.url}
          db.username: ${db.username}
          db.password: ${db.password}
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback