Software AG Command Central 10.2 | Automation and Template-based Provisioning | Developing Composite Templates | Managing Database Components Using a Composite Template
 
Managing Database Components Using a Composite Template
 
Supported Database Component Configurator Parameters
Database Actions in the Sample Composite Templates
You can add a database section with database configuration actions in a layer, defined in a composite template definition. When applying the composite template with a database layer, Command Central executes one of the following actions, based on the value of the environment.mode parameter in the apply composite template command:
*When environment.mode=provision, Command Central creates the database components defined in the database layer
*When environment.mode=migration, Command Central upgrades the database components defined in the database layer
Note that the layer in which you include database configuration actions must map to a local or remote Platform Manager node that meets the following requirements:
*The remote Platform Manager node is of release 9.10 or higher.
*The Database Component Configurator is installed on the node, which is usually the case for the local Platform Manager node. You can ensure that the Database Component Configurator is installed by adding an inline template in the composite template definition that will install the Database Component Configurator.
The databases layer typically includes one or more dbAction sections, where dbAction is the name of the action, for example esb_db. Each dbAction section contains the parameters, listed in the mapping table in Supported Database Component Configurator Parameters with the following modifications:
This CLI parameter...
is defined in the composite template as...
product
products
component
components
In each dbAction section, you can specify only the components parameter, only the products parameter, or both parameters. If you specify only the components parameter, the database action is executed for the database components with the specified code, for example:
components: [STR]
will execute the action for the database component with code STR.
When you have included both the components and products parameters, Command Central processes first the components parameter and then the products parameter. You must specify a separate version parameter for the components and products actions, because the components (supported by the Database Component Configurator) and the products use different version numbering.
If version: latest, you can use the same version parameter for the components and products included in a single dbAction section.
You can list several values in the components or products parameters. The values in a list are processed in the order they are specified. For example:
products: [IS,TN]
will execute first the database action for Integration Server and then for Trading Networks.
Examples
*To define an “esb_db” action in the databases layer for the database components of the products with IDs “IS” and “TN”, which will get executed on the SQL server at URL “jdbc:wm:sqlserver://DBserver:1433”, for the database user with name “webmuser” and password “webmpass”:
layers
    databases:
      esb_db
        description: create db components for IS and TN
        products: [IS,TN]
        db.type: sqlserver
        db.url: “jdbc:wm:sqlserver://DBserver:1433;databaseName=TESTDB”
        db.username: webmuser
        db.password: webmpass
*In the following template snippet, the databases layer includes a “dbc-components” action and a “dbc-products” actions. The parameters included in “dbc-components” and “dbc-products” use by reference the values of the database connection and schema parameters, defined in the environments/default section. The “dbc-components” action will get executed for the database storage component “STR”, and the “dbc-products” action will get executed for the products with IDs “IS”, “BPM”, and “MWS”. Note that the version parameter for each action refers to a different version parameter in the environments/default section. The “dbc-components” action uses the value of the db.component.version parameter, and the “dbc-products” action uses the value of the db.product.version parameter.
environments:
    default:
      db.type:     sqlserver
      db.host:     DBserver
      db.port:     1433
      db.name:     TESTDB
      db.username: webmuser
      db.password: webmpass
      db.url:      “jdbc:wm:sqlserver://DBserver:1433;databaseName=TESTDB”
      db.admin.user:     adminuser  
      db.admin.password: adminpass
      db.components:     [STR]  
      db.products:       [IS,BPM,MWS]  
      db.component.version: latest  
      db.product.version:   9.10.0.0  
...
layers:
    databases:
      dbc-components:
        components:     ${db.components}
        version:     ${db.component.version}
        db.type:     ${db.type}
        db.url:      ${db.url}
        db.username: ${db.username}
        db.password: ${db.password}
        db.name:     ${db.name}
        db.admin.username:   ${db.admin.username}
        db.admin.password:   ${db.admin.password}
 
      dbc-products:
        producst: ${db.products}
        version: ${db.product.version}
        db.type:     ${db.type}
        db.url:      ${db.url}
        db.username: ${db.username}
        db.password: ${db.password}
        db.name:     ${db.name}

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release