+

Search Tips   |   Advanced Search

Modify cluster member templates using wsadmin.sh

Use the AdminConfig object and the wsadmin tool to modify cluster member templates for application server, generic server, and proxy server clusters.

A copy of the first cluster member that we create is stored in the cluster scope as a template. Create the first cluster member using any existing server as a template or a default server template. We can also create a first cluster member when we create the cluster by converting a server to a cluster. When we create a first cluster member, the template of the cluster member is stored under the scope of the cluster. Additional cluster members are created using the cluster member template stored in the cluster scope.

A cluster can be either homogeneous or heterogeneous in nature. A homogeneous cluster spans nodes that are of the same product version. A heterogeneous cluster spans nodes of different products versions. Since a cluster can contain members from nodes that run on different versions of the product, one template will be stored for each version of the application server node configured as a cluster member. The cluster member template will not exist for a given node version until we create a first member in a node of the same version. For example, if a cluster contains several Version 7 nodes and several v6.1 nodes, there will be one cluster member template for the v7 nodes and one for the v6.1 nodes, such as the following:

Therefore, when we make a configuration change to cluster members, make the same configuration change to the template stored in the corresponding cluster scope in order to keep the template in sync with the existing members. Similarly, when we make a configuration change to the template, we should make the same configuration change to existing cluster members.

We can modify a cluster member template using the wsadmin tool similar to how we modify a server. We cannot modify a cluster member template using the administrative console. Perform the following steps to modify a cluster member template using the wsadmin tool:


Tasks

  1. Start the wsadmin scripting tool.
  2. Obtain the cluster template under the cluster scope. For example, the following example obtains the version 7 cluster member template for the cluster1 cluster:

    • Jacl:

      set c [$AdminConfig listTemplates Server cluster1/servers/V7]
      
      puts [$AdminConfig showall $c]
      

      Use Jython:

      c = AdminConfig.listTemplates('Server','cluster1/servers/V7')
      
      print AdminConfig.showall(c)
      

  3. Modify the attributes of the template. For example:

    • Jacl:

      $AdminConfig modify $c {{attrName attrVal}}
      

      Use Jython:

      AdminConfig.modify(c, [[attrName, attrVal]])
      

  4. Save the configuration changes.

  5. In a network deployment environment only, synchronize the node.

  • Create cluster members using scripting
  • wsadmin AdminConfig
  • Save wsadmin configuration changes
  • Synchronize nodes
  • Cluster configuration scripts
  • Commands for the AdminConfig object
  • Cluster member templates collection
  • Proxy cluster member templates collection