WebSphere Application Server Network Deployment, Version 6.1
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results

Modifying cluster member templates using scripting

You can create cluster members using the AdminConfig object and scripting.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

About this task

A copy of the first cluster member that you create is stored in the cluster scope as a template. You can create the first cluster member using any existing server as a template or a default server template. You can also create a first cluster member when you create the cluster by converting a server to a cluster. When you 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 WebSphere Application Server version. A heterogeneous cluster spans nodes of different WebSphere Application Server versions. Since a cluster can contain members from nodes that run on different versions of WebSphere Application Server, one template will be stored for each version of the WebSphere Application Server node that is configured as a cluster member. The cluster member template will not exist for a given node version until you create a first member in a node of the same version. For example, if a cluster contains several V6.1 nodes and several V6 nodes, there will be one cluster member template for the V6.1 node and one for the V6 node, such as the following:
  • The $WAS_HOME/config/clusters/clusterName/servers/V6.1MemberTemplate template will be used as the template for any member that is created in a V6.1 node.
  • The $WAS_HOME/config/clusters/clusterName/servers/V6MemberTemplate template will be used as the template for any member that is created in a V6 node.
  • The $WAS_HOME/config/clusters/clusterName/servers/V5MemberTemplate template will be used as the template for any member that is created in a V5 node.

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

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

Procedure

  1. Obtain the cluster template under the cluster scope. For example, the following example obtains the version 6.1 cluster member template for the cluster1 cluster:
    • Using Jacl:

      set c [$AdminConfig listTemplates Server cluster1/servers/V6.1]
      
      puts [$AdminConfig showall $c]
      

      Using Jython:

      c = AdminConfig.listTemplates('Server','cluster1/servers/V6.1')
      
      print AdminConfig.showall(c)
      
  2. Modify the attributes of the template. For example:
    • Using Jacl:

      $AdminConfig modify $c {{attrName attrVal}}
      

      Using Jython:

      AdminConfig.modify(c, [[attrName, attrval]])
      
  3. Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.
  4. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.



In this information ...


IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

IBM Suggests
Task topic    

Terms of Use | Feedback

Last updated: Feb 25, 2009 9:32:38 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.multiplatform.doc/info/ae/ae/txml_membertemplate.html