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

Configuring an ODR to dynamically update the web server plug-in configuration

In a topology with a web server which forwards requests to an on demand router (ODR), the ODR can be set to dynamically generate and update the web server plug-in configuration file plugin-cfg.xml. By configuring an ODR to dynamically update plugin-cfg.xml, you avoid manually updating the file during administrative actions, which can affect the content.

Before you begin

Consider the environment topology before configuring the plugin-cfg.xml generation; each ODR can generate a plugin-cfg.xml file which includes all URIs that it can handle. The generated plugin-cfg.xml file can be configured to: all, cell, node, and server. The configuration scope determines which ODRs are included in plugin-cfg.xml, and therefore, what ODRs a web server forwards requests to. By default, plugin-cfg.xml includes only running ODRs.
The plugin-cfg.xml configuration scope can be:
  • All: Includes all ODRs in the environment.
  • Cell: Includes all ODRs within the same cell as the ODR that generates plugin-cfg.xml.
  • Node: Includes all ODRs on the same node as the ODR that generates plugin-cfg.xml.
  • Server: Includes only the ODR that generates plugin-cfg.xml.

About this task

An ODR configured to generate plugin-cfg.xml must be running in order for dynamic updates to occur. If a single ODR is configured to generate the plugin-cfg.xml file, and that ODR is stopped, plugin-cfg.xml is not regenerated until the ODR is restarted. Therefore, run the plugin-cfg.xml file generator as a highly available service. For more information, read about generating the plug-in configuration in a high availability environment.

The plugin-cfg.xml file is generated by an ODR process. Therefore the file is generated on the file system that hosts the generating ODR. For all, cell, and node, WAS_HOME/profiles/profile_name/etc/ is the default directory where the ODR generates the plugin-cfg.xml file. The default directory for server is WAS_HOME/profiles/profile_name/etc/odr_name/. The default generation directory can be overridden by setting a Java™ virtual machine (JVM) system property on the generating ODR. To set the JVM system property, go to Servers > Server types > On demand routers > ODR_name > Java and process management > Process definition > Java Virtual Machine > Custom properties > New. Name the JVM system property ODCPluginXmlDir and enter a value that contains the absolute path to the generation directory.

Procedure

  1. In the administrative console, go to the On demand router settings page:
    • For stand-alone ODR processes, click Servers > Server types > On demand routers > ODR_name > On demand router properties > On demand router settings.
    • For a static cluster of ODR processes, click Servers > Clusters > On demand router clusters > ODR_static_cluster_name > On demand router properties > On demand router settings.
    • For a dynamic cluster of ODR processes, go to Servers > Clusters > Dynamic clusters > ODR_dynamic_cluster_name > Server template > > On demand router properties > On demand router settings.
  2. In the Proxy plugin configuration policy section, select the scope from the Generate plugin configuration drop-down list.
  3. Optional: In the Proxy plugin configuration policy section, define an absolute path to the script that you enter in the Plugin config change script text box.
    The defined script is invoked every time the plugin-cfg.xml is dynamically updated.
    Considerations when using the Plugin config change script text box:
    • You can define multiple scripts to run after the plugin-cfg.xml is generated. The delimiter used to separate the path to each scrip is a semi-colon ( ; ). The scripts run in the order they are defined:
      /tmp/executeFirst.sh;/bin/executeSecond.sh
    • To automatically propagate the generated plugin-cfg.xml file, use the autoPropagate keyword in the Plugin config change script text box.
      Examples:
      • autoPropagate,*:*:*
      • /tmp/executeFirst.sh;/bin/executeSecond.sh;autoPropagate,*:*:*
    • To automatically propagate the generated plugin-cfg.xml file using the propagatePluginCfg.py scrip, enter the script in the Plugin config change script text box.

      Examples:

      • /opt/WAS/bin/wsadmin.sh -f /opt/WAS/bin/propagatePluginCfg.py -lang jython https://myIHSHost:8192 
        ihsusr ihsusrPassword /tmp/plugin-cfg.xml /opt/HTTPServer/plugins/config/webserver1/plugin-cfg.xml
      • /tmp/executeFirst.sh;/bin/executeSecond.sh;/opt/WAS/bin/wsadmin.sh -f /opt/WAS/bin/propagatePluginCfg.py 
        -lang jython https://myIHSHost:8192 ihsusr ihsusrPassword /tmp/plugin-cfg.xml 
        /opt/HTTPServer/plugins/config/webserver1/plugin-cfg.xml
  4. Click Apply, and save and synchronize the changes.
  5. Restart the ODR for the changes to take effect.
    plugin-cfg.xml is generated every time the ODR starts, when there are administrative actions performed that impact what URIs the ODR handles, and when changes in the environment affect the content of the plugin-cfg.xml file.

Results

The ODR automatically updates the plugin-cfg.xml file when configuration changes occur.

What to do next

You can override the plugin-cfg.xml default attribute values automatically generated by the ODR. For more information, read about controlling the generation of the plugin-cfg.xml file.