Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Cluster servers with wsadmin scripting


Modify cluster member templates using wsadmin.sh

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

A copy of the first cluster member that you create is stored in the cluster scope as a template. We can 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 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 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 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 V7 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 you 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 you make a configuration change to the template, you should make the same configuration change to existing cluster members.

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


Procedure

  1. Start wsadmin.sh.

  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]
      
      

      ### 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}}
      
      

      ### Jython

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

  4. Save the configuration changes. See the topic about saving configuration changes with wsadmin.sh for more information.

  5. Synchronize the node. See the topic about synchronizing nodes using the wsadmin scripting tool for more information.


Create cluster members using scripting
Use the wsadmin scripting AdminConfig object for scripted administration
Saving configuration changes with wsadmin.sh
Synchronize nodes using wsadmin.sh


Related


Cluster configuration scripts
Commands for the AdminConfig object using wsadmin.sh
Cluster member templates collection
Proxy cluster member templates collection

+

Search Tips   |   Advanced Search