Skip to content

Creating Run time Instances

Angel Tcholtchev edited this page Dec 20, 2017 · 6 revisions

Creating Run-time Instances

Some products like Integration Server, Universal Messaging, My webMethods Server, Apama, Broker, support multiple instances. When you install these products using Command Central you don't get instances created. You have an opportunity to create a fully customized instance based on the environment instance configuration.

To find out what products support instance management you can use the following CC CLI command:

#to get node aliases
sagcc list instances
 
#to get product on a particular SPM node that support instance management
sagcc list instances <nodeAlias> supportedproducts

Product instance management requires corresponding product SPM Plugin. Ensure you have required plugin(s) installed along with the products

Providing Licenses

Licenses are configuration items that are a have some special handling. Some products ship with default evaluation licenses, some products don't. Some products can run without a license for some time, say 30 minutes, some don't even start. Some products support license update via Command Central after the instance has been created, some don't.

To make things simpler and consistent lets provide licenses before we create our instances.

Licenses can be packaged with the template and then placed into the target location under the target installation directory. Most products expects license files under certain locations and will use them when instances are created and default instances are started. Consult products documentation for details.

Here are some examples for quick reference

Product                 Default license file location                   Instance license
Integration Server	n/a	                                        yes
Universal Messaging	UniversalMessaging/server/templates/licence.xml	yes (in 9.10+)
Terracotta	        Terracotta/terracotta-license.key	        n/a
Broker	                n/a	                                        not supported
My webMethods Server	n/a	                                        n/a

For the tutorial purposes we will need a valid IS and UM instances that will be imported into Command Central and then distributed. In case you don't have them present just skip the license instructions in the template itself.

To use the licenses:

  1. In Command Central Web UI, from the upper navigation menu, go to the Licensing TAB. In the Key table below, use the upper right + sign to import new License into the Command Central. Note the aliases that you've assigned to those two template as you'll use them later in the templates.
  2. Configure the template to the referenced licenses on the target node installation licenses: section with <targetFilePath> : <sourceLicenseAlias> pairs

The template fragment to handle licenses looks like this:

templates:                                         # TEMPLATES definition
  is:                                              # template alias
    licenses:                                      # copy lincense from the license repository to a template location
         "IntegrationServer/config/licenseKey.xml": ${is.license.key.alias}
    products:                                      # product list to install
      integrationServer:                           # Integration Server productId
    fixes: ${is.fixes}                             # fixes to install
  um:                                              # template alias
    licenses:                                      # copy lincense from the license repository to a template location
          "UniversalMessaging/server/templates/licence.xml": ${um.license.key.alias}
    products:                                      # product list to install
      NUMRealmServer:                              # Universal Messaging productId
    fixes: ${um.fixes}                             # fixes to install

Where the license aliases are already parametrized. This will copy a license from the composite template to the target SPM node, so that the license can be used when creating runtime instances of the products.

Defining Run-time Instances

  1. Open template/tutorial/template.yaml in the text editor.
  2. Add inst1: under integrationServer: product with three required instance properties.
  3. Repeat for NUMRealmServer:, but use UM specific instance properties instead.
  4. On the instance level we specify the license file that we've set up to be copied on the SPM node in the last step.

Please refer to Command Central Documentation for more details how to create instances http://documentation.softwareag.com/webmethods/wmsuites/wmsuite10-1/SysReqs_Installation_and_Upgrade/compendium/index.html#page/install-upgrade-webhelp%2Fre-composite_template_def_inline_templates.html%23

The template should looks like this:

alias: tutorial
description: How to install and update main products
version: 0.7
changes:
  - 0.1 Initial draft
  - 0.2 Added input parameters
  - 0.3 Added local node bootstrap
  - 0.4 Added products/plugins installation
  - 0.5 Added fix installation
  - 0.6 Added main products and fix installation
  - 0.7 Added licenses and runtime instances
 
environments:
  default:
    install.dir:  ${}                              # SPM installation directory
    spm.port:     8192                             # SPM connection port
    spm.alias:    dev${spm.port}                   # SPM alias
    product.repo: ${}                              # Product repo          
    fix.repo:     ${}                              # Fixes repository
    spm.fixes:    ALL                              # Default list of fixes to install
    is.fixes:     ALL                              # Set of IS fixes
    um.fixes:     ALL                              # Set of UM fixes
    is.license.key.alias: ${}                      # Alias for IS license key
    um.license.key.alias: ${}                      # Alias for UM license key  
 
layers:                                            # LAYERS definition
  management:                                      # management layer with SPMs
    productRepo: ${product.repo}                   # product repository for this layer
    fixRepo:     ${fix.repo}                       # fix repository for this layer
    templates:   [plugins]                         # templates to apply to this layer
  messaging:
    productRepo: ${product.repo}                   # product repository for this layer
    fixRepo:     ${fix.repo}                       # fix repository for this layer
    templates:   [um]                              # templates to apply to this layer
  integration:
    productRepo: ${product.repo}                   # product repository for this layer
    fixRepo:     ${fix.repo}                       # fix repository for this layer
    templates:   [is]                              # templates to apply to this layer
 
 
templates:                                         # TEMPLATES definition
  plugins:                                         # template alias
    products:                                      # product list to install
      ISspm:                                       # Platform Manager Plug-Ins / IS
      NUMspm:                                      # Platform Manager Plug-Ins / UM
    fixes: ${spm.fixes}                            # fixes to install
  is:                                              # template alias
    licenses:                                      # copy lincense from the license repository to a template location
         "IntegrationServer/config/licenseKey.xml": ${is.license.key.alias}
    products:                                      # product list to install
      integrationServer:                           # Integration Server productId
        inst1:                                     # instance name to create or update
          primary.port:     5551
          diagnostic.port:  5552
          jmx.port:         5553
          license.file: IntegrationServer/config/licenseKey.xml
 
    fixes: ${is.fixes}                             # fixes to install
  um:                                              # template alias
    licenses:                                      # copy lincense from the license repository to a template location
          "UniversalMessaging/server/templates/licence.xml": ${um.license.key.alias}
    products:                                      # product list to install
      NUMRealmServer:                              # Universal Messaging productId
        inst1:                                     # instance name to create or update
          instance.port:    9001
          instance.ip:      localhost
          runtimeComponentId: Universal-Messaging-${instance.name}
          license.file: UniversalMessaging/server/templates/licence.xml
    fixes: ${um.fixes}                             # fixes to install
 
nodes:                                             # NODES definition
 default:                                          # defaults for any environment type
   default:                                        # default node definition
     port: ${spm.port}                             # SPM connection HTTP/S port
     secure: false                                 # do not use SSL port
     bootstrapInfo:
       installDir: ${install.dir}                  # installation directory
       installer:  ${cc.installer}                 # cc installer that can be found in cc_home/profiles/CCE/data/installers    
 
   ${spm.alias}:                                   # definition for specific nodeAlias
     host: localhost                               # Use localhost
 
 
provision:                                         # PROVISIONing mapping of layers to nodes
  default:                                         # default environment type
    management: ${spm.alias}                       # management layer is single node

Go to the environment/default/env.properties and add is.license.key.alias= and um.license.key.alias= to point the respective aliases in the command central license repository.

# Defaults for windows
#cc.installer=
#install.dir=C\:\\Users\\${user.name}\\dev\\${spm.alias}
 
# Defaults for linux
#cc.installer=
#install.dir=/home/${user.name}/dev/${spm.alias}
 
# Defaults for mac
#cc.installer=
#install.dir=/Users/${user.name}/dev/${spm.alias}o
 
product.repo=
fix.repo=
 
is.license.key.alias=
um.license.key.alias=
 
#temporary limitation to avoid fix validation.
skip.fix.dep.validation=true

The new elements are the two license key alias variables!

If you don't have license flies for IS and/or UM, you can comment out license to reference those license files. UM will be functional with the default evaluation license but IS instance only runs for 30 minutes without the license, then shuts down!

Reimport and rerun the template with the known antcc commnad

[user@linuxbox tutorial]$ ant up
...
BUILD SUCCESSFUL
Total time: ....

When the job successfully completes the Web UI will show two new instances under Instances tab, up and running and having your licenses applied.

If you had not achieving the goals of this tutorial stage, just use the following command to checkout everything that needed to be done so far. Make a note about your modifications of environment/default/env.properties because the version that you'll check out will overwrite them.

[user@linuxbox tutorial]$ git checkout stage-07 -f
Switched to branch 'stage-07'

Instance Parameters Reference

Each product support different instance parameters. Consult documentation on supported properties for each product by searching for sagcc create instances command. Below is a quick reference for IS, UM and MWS.

anyTemplateAlias:
  products:
    integrationServer:                           # Integration Server productId
      <instance.name>:                           # REQUIRED: instance name
        primary.port:     <number>               # REQUIRED: primary port number
        diagnostic.port:  <number>               # REQUIRED: diagnostic port number
        jmx.port:         <number>               # REQUIRED: jmx port number
        install.service:  <true|false>           # if true, register Windows service
        license.file:     "<path/to/license>"    # license file location
        db.type: derby|sqlserver|oracle|db2      # derby by default
        db.url: "jdbc://... url"                 # REQUIRED for non-derby
        db.username: "<dbusername>"              # REQUIRED for non-derby
        db.password: "<dbpassword>"              # REQUIRED for non-derby
        db.alias: <CoreDBAlias>                  # by default the same as db.type
        package.list: "all | <pkg1>,<pkg2>"      # *= all packages (default)
  1. All parameters are only used for initial instance creation operation. Only package.list is also used for updating existing instance to provision newly installed packages.
  2. If license.file is not provided then IS instance will shutdown in 30 minutes
  3. For most applications db.type must not be derby
anyTemplateAlias:
  products:
    NUMRealmServer:                              # Universal Messaging Server
      <instance.name>:                           # REQUIRED: instance name
        instance.port:    <number>               # REQUIRED: instance port number
        instance.ip:      <ip or hostname>       # default all local addresses
        data.dir:         "/path/to/data"        # default /data folder
        license.file:     "<path/to/license>"    # license file location

Notes:

  1. All parameters are only used for initial instance creation operation. None of them are used for updating existing instance
  2. instance.name normally set to ${node.host} variable to ensure unique realm name for all instances in the cluster
  3. UM instance name MAY NOT contain dots. This means nodes.host MUST not be an IP address if used as instance.name. Alternatively use ${node.alias} and setup nodes with custom aliases that do not have dots in them.
  4. Use instance.ip only if you want the instance to be listening on this specific IP/hostname
  5. UM supports license.file parameter only in 9.10+. The default license comes from UniversalMessaging/server/templates/licence.xml location, if present.
anyTemplateAlias:
  products:
    MwsProgramFiles:                             # My webMethods Server productId
      <instance.name>:                           # REQUIRED: instance name
        node.name: <cluster node name>           # REQUIRED for cluster installation
        http.port:   <number>                    # REQUIRED: primary http port number
        https.port:  <number>                    # REQUIRED: primary https port number
        jmx.port:    <number>                    # REQUIRED: jmx port number
        debug.port:  <number>                    # java debug port number
        db.type: sqlserver|oracle|db2            # REQUIRED
        db.url: "jdbc://... url"                 # REQUIRED
        db.username: "<dbusername>"              # REQUIRED
        db.password: "<dbpassword>"              # REQUIRED

Important

  1. All parameters are used for instance creation operation. None are used for instance update operation
  2. node.name must be unique for each cluster instance and typically set to ${node.host} variable

Summary

Congratulations! You've created instances of the core products and applied licenses to them.

Clone this wiki locally