Product-specific settings for pattern types and plug-ins
Multiple IBM® products support virtual application patterns. To support situations where requirements are different for each product, pattern types and plug-ins can contain product-specific conditions. If you are using pattern types and plug-ins that are provided by IBM to develop your own plug-ins and pattern types, you need to understand how this capability works.
The following examples show different situations where product-specific
configuration can be defined. The following products can be specified:
- IWD
- For IBM Workload Deployer V3.1.0.2 or later
- IPAS
- For IBM Cloud Pak System System
Configuration options for pattern types
- Installation
You can specify that a pattern type is only installed for a specific product in patterntype.json
In this example, the pattern type is only installed if the value ofproductsisIWD.{ "name" : "patterntype.hello", "shortname" : "ptype.hello", "version" : "2.0.0.1", "description" : "DESCRIPTION", "builder" : true, "prereqs":{ "foundation":"2.0.0.1" }, "requires":{ "products":["IWD"] }, }- Licensing
- IBM license IDs, license types, and the location of the license text are specified in
patterntype.jsonfor each product. The license text location is relative to the plug-in.- If a docroot value is not specified, the license text is in licenses/*.html.
- If a docroot value is specified, the license
text is in docroot/licenses/*.html. For example,
if you set
"docroot" : "iwddocs", then the license text is in iwddocs/licenses/*.html.
{ "name": "WAS CE Sample Pattern Type", "shortname": "wasce.ptype", "version": "1.1.0.1", "description": "IBM Workload Deployer Pattern Type for WAS CE Sample", "status": "", "prereqs": { "foundation": "2.0.1.2" }, "license": { "pid": "5725L29", "type": "PVU" }, "categories": [ ], "builder": true }
Configuration options for plug-ins
- Installation
You can specify that a plug-in is only installed for a specific product in config.json.
In this example,cachingis only installed if the value ofproductsisIPAS.{ "name":"caching", "version":"2.0.0.1", "patterntypes":{ "primary":{ "foundation":"2.0" } }, "requires":{ "products":["IPAS"] },- Plug-in configuration defaults
- In this example configuration of config.json, the settings for Cloud Pak System Software for Power® in
"defaults"override settings that are defined in"parms"."parms":{ "dbaas_standard":true, "environment":null }, "defaults":[ { "requires":{ "products":["IPAS"] }, "parms":{ "environment":"PROD" } } ], - Package definition
- You can define packages in config.json that
are specific to a product. The following example shows a package that
is specific to Cloud Pak System Software.
"packages": { "Hello": [ { "persistent":true, "requires" : { "arch" : "x86_64", "memory" : 128, "products" : ["IPAS"] }, "parts" : [ { "part" : "parts/hello.scripts.tgz" } ] } ] } - Interface customization
- You can make a user interface element available to a specific product only by specifying the product in the UI attribute definition in config_meta.json.
{ "id":"parms.environment", "label":"CONFIG_LABEL", "type":"string", "requires":{ "products":["IWD"] }, - Product name in lifecycle scripts
- To include the product name within a Python (.py) lifecycle script, add the following line:
maestro.system['product']