[AIX Solaris HP-UX Linux Windows][z/OS]

Generating the plug-in configuration in a high availability environment

In a high availability environment, you can configure the web server to generate the plug-in configuration. By doing so, you ensure that the configuration is generated by one process in the cell, regardless of other processes that might not be available.

Before you begin

  • Establish your high availability environment. For more information, read about setting up a high availability environment.
  • Using the high availability plugin-cfg generation service does not automatically disable the on demand router (ODR) plugin-cfg generation, if it is enabled. The two services are independent. It is redundant to enable both services; when you enable the high availability plugin-cfg generation service, disable any previously configured ODR plugin-cfg generation. For more information, read about configuring an ODR to dynamically update the web server plug-in configuration.
  • If you enable Intelligent Management for a web server, do not use the option to dynamically generate the plugin-cfg.xml file for that web server. Dynamically generating the plugin-cfg.xml file overwrites the Intelligent Management settings in the plugin-cfg.xml file.

About this task

  • Define a set of custom properties at the cell level for each plugin-cfg.xml file that you want to generate. The custom properties are formatted as ODCPluginCfg<property>_<definitionID>=value, where <property> is one of the following elements:
    • OdrList
    • OutputPath
    • UpdateScript
    • OdrClusterList
    • Disabled
    .The <definitionID> variable is the name of the configuration that you choose. As a result, properties ending in the same <definitionID> variable define a single unique generation definition within the high availability plug-in configuration generation service. The <definitionID> serves as the mechanism to collect the specified properties into a unique plugin-cfg.xml file that serves as the single unique generation definition.
    Valid usage example of the <definitionID> variable when specifying the same ODCPluginCfg<property>
    • ODCPluginCfgOdrList_1=ABC
    • ODCPluginCfgOdrList_2=XYZ
    • ODCPluginCfgOutputPath_1=EFG
    • ODCPluginCfgOutputPath_2=HIJ
    Invalid usage example of the <definitionID> variable when specifying the same ODCPluginCfg<property>
    • ODCPluginCfgOdrList_1=ABC
    • ODCPluginCfgOdrList_1=XYZ
    • ODCPluginCfgOutputPath_1=EFG
    • ODCPluginCfgOutputPath_1=HIJ
    Note here in the invalid case that the specifications for the ODCPluginCfg<property> collide because of using the same value for the <definitionID>.
Note: The ODCPluginCfgUpdateScript_<definitionID> value can be set with the same options as the values in the Plugin config change script text box. For more information, read about configuring an ODR to dynamically update the web server plug-in configuration.
  • To generate HAPluginCfgGeneration definitions on demand:
    1. Disable automatic generation. Set the cell custom property ODCPluginCfgDisabled_<definitionID> to true.
    2. To generate a new plug-in, run this command:
      <WAS_HOME>/bin/wsadmin.sh -lang jython -f <WAS_HOME>/bin/manageODC.py generateHAPluginCfgs
      <generationDefinitionIDs> <nodeName> <serverName>
      where:
      generationDefinitionIDs
      is a list of HAPluginCfgGeneration IDs separated by commas of the form ODCPluginCfg_<definitionID>.
      nodeName
      is the name of the node that performs the generation.
      serverName
      is the process name that performs the generation. Any Intelligent Management augmented process can generate the HAPluginCfgs configuration on demand, except for XDAGENT processes. For example:
      <WAS_HOME>/bin/wsadmin.sh -lang jython -f <WAS_HOME>/bin/manageODC.py generateHAPluginCfgs
      ODCPluginCfg_1,ODCPluginCfg_2 dmgrNodeName dmgr
  • To limit how often the HAPluginCfgGeneration definitions are regenerated, set the cell custom property ODCPluginCfgMinGenerationDelay with a value that represents the time in minutes between possible generations. For example:
    ODCPluginCfgMinGenerationDelay = 10
    The configured HAPluginCfgGeneration definitions are regenerated every 10 minutes at the most. If the generator receives notification to rebuild the pluginCfgs, it delays the generation of pluginCfgs written within the last 10 minutes.
  • To limit how often an ODR generated plugin-cfg.xml file is regenerated, set the JVM property com.ibm.ws.odr.plugincfg.minGenerationDelay to a value that represents the time in minutes between possible generations and then cycle the ODR.
  • By default, the configured static runtime weight value is used to include stopped ODR processes in a generated plugin-cfg.xml file.
  • To include stopped ODR processes in a generated plugin-cfg.xml file based on the current runtime weight value (always 0), configure the following settings:
    • For the HAPluginCfgGenerator, set the cell custom property ODCPluginCfgOdrIncludeStoppedStatic to false.
    • For ODR generated plugin-cfg.xml files, set the JVM property com.ibm.ws.odr.plugincfg.odrIncludeStoppedStatic to false, and then cycle the ODR.

Procedure

  1. In the administrative console, click System administration > Cell > Custom properties > New.
  2. Define the following custom properties:
    ODCPluginCfgOdrList_<definitionID>=cell1:node1:odr1,cell2:node2:*,[cell1:node3:odr3],[cell1:node4:odr4]
    This property specifies the ODRs that you want to include in the plugin-cfg.xml file. Use the asterisk (*) symbol as a valid wildcard for each path segment.odr1 and odr2 are marked as primary servers. odr3 and odr4 are marked as backup servers.
    ODCPluginCfgOutputPath_<definitionID>=/path/file_name.txt
    This property specifies the location in which the plugin-cfg.xml file is placed after the file is generated. Because you can generate the plug-in configuration on any node in the cell, you must ensure the output directory exists on each node.
    ODCPluginCfgUpdateScript_<definitionID>=/path/script <parameter1> <parameter2>
    This property defines the absolute path to your script and the arguments to be passed to your defined script. The defined script will be invoked each time a plugin-cfg.xml is generated.
    ODCPluginCfgOdrClusterList_<definitionID>=cell1:cluster1,cell1:cluster2,cell1:*,[cell1:cluster3],[cell1:cluster4]
    This property specifies a cluster of ODRs that you want to include in the plugin-cfg.xml file. Use the asterisk (*) symbol as a valid wildcard for each path segment.cluster1 and cluster2 are marked as primary servers. cluster3 and cluster4 are marked as backup servers.
    ODCPluginCfgDisabled_<definitionID>
    This property disables the generation of a particular configuration without disabling all the properties for that configuration. The default value is false.
    ODCPluginCfgOdrSessionIdCookie_<definitionID>
    Defines the name of the cookie used to maintain IBM® HTTP server/ODR affinity when using ODR cell affinity.
    ODCPluginCfgIHSConfigProperties_<definitionID>
    This property is used instead of configuring JVM properties (as is done during non-HA plugin-cfg.xml generation) to set IBM HTTP server specific configuration properties. The value of this property is a comma separated list of ATTRIBUTE_NAME=value pairs where ATTRIBUTE_NAME is the name of an attribute represented in the plugin-cfg.xml.

    For example, if a configuration name of 1 is being used, a cell property named ODCPluginCfgIHSConfigProperties_1 with a value of TrustedProxyEnable=true,LogLevel=INFO,CloneSeparatorChange=true,ServerIOTimeout=60 would be created to set the TrustedProxyEnable, LogeLevel, CloneSeparatorChange, and ServerIOTimeout attributes contained in the generated plugin-cfg.xml.

    ODCPluginCfgTrustedProxyList_<definitionID>=trustedproxy1,trustedproxy2
    This property is used to specify the trusted proxies that you want to include in the plugin-cfg.xml file.
    Important:
    • For all of the custom properties you specify as ODCPluginCfg<property>_<definitionID>=value, do not use the asterisk (*) symbol as part of the string value.

      For example, ODCPlugCfgOdrClusterList_1=My*Cell:node1 is invalid and similarly, ODCPluginCfgOutputPath_1=/temp*/plugin-cfg1.xml is invalid.

    • See Intelligent Management: controlling the generation of the plugin-cfg.xml file for the list of valid property names and values.

Example

Set the following cell custom properties to generate the plug-in configuration for a collection of ODRs that are not in an ODR cluster. Note that all properties end with _1, which ties them together into a single configuration.
Table 1. Custom properties used to generate a plug-in configuration for ODRs that are not in a cluster
Property name Property value Description

ODCPluginCfgOdrList_1

myCell:*:*

Generates a plug-in configuration that will route to all ODRs in the myCell cell.

ODCPluginCfgOutputPath_1

/tmp/plugin-cfg1.xml

Writes the generated plug-in configuration to the /tmp/plugin-cfg1.xml file.

ODCPluginCfgUpdateScript_1

/root/bin/pluginCfgUpdate1

The path to the script that will be invoked each time the /tmp/plugin-cfg1.xml file is updated.

Set the following custom properties to generate the plug-in configuration for a cluster of ODRs named myCell/myOdrCluster. Note that all properties end with _2, which ties them together into a single configuration.
Table 2. Custom properties used to generate the plug-in configuration for myCell/myOdrCluster
Property name Property value Description

ODCPluginCfgOdrClusterList_2

myCell:myOdrCluster

Generates a plug-in configuration that will route to all ODRs of the myOdrCluster cluster in the myCell cell.

ODCPluginCfgOutputPath_2

/tmp/plugin-cfg2.xml

Writes the generated plug-in configuration to the /tmp/plugin-cfg2.xml file.

ODCPluginCfgUpdateScript_2

/root/bin/pluginCfgUpdate2

The path to the script that is ran each time the /tmp/plugin-cfg2.xml file is updated.

ODCPluginCfgOdrIncludeStopped_2

true or false

Includes or excludes stopped ODRs.

What to do next

Because the generation of the plugin-cfg.xml file can occur on any node in the cell, you can determine the specific location in which the generation service is running:

In the administrative console, click Runtime operations > Component stability > Core components. Verify that HAPluginCfgGenerator is displayed in the table.