+

Search Tips   |   Advanced Search

Cluster configuration scripts


The scripting library provides multiple script procedures to automate the appserver configurations. Use the scripts in this topic to configure clusters with or without cluster members, using a template, and to remove clusters from the configuration. We can run each script individually, or combine procedures to create custom automation scripts.

The AdminClusterManagement script procedures are located in...

WAS_HOME/scriptLibraries/server/V70

Use the following script procedures to configure clusters in the environment:

Use the following script procedures remove clusters and cluster members from the configuration:

 

createClusterMember

This script assigns a server cluster member to a specific cluster. By creating the first cluster member, a copy of that member is stored as part of the cluster data and becomes the template for all additional cluster members that you create.

To run the script, specify the cluster name, node name, and new member name arguments, as defined in the following table:
Argument Description
clusterName Name of the cluster to which the system adds the cluster member.
nodeName Name of the node on which the application server resides.
newMemberName Name to assign to the cluster member.

Syntax

AdminClusterManagement.createClusterMember(clusterName, nodeName, newMemberName)

Example usage

AdminClusterManagement.createClusterMember("myCluster", "myNode", "clusterMember1")

 

createClusterWithFirstMember

This script creates a new cluster configuration and adds the first cluster member to the cluster. Use clusters to manage a group of appservers as a single unit, and distribute client requests among the appservers that are members of the cluster. Create a cluster to balance the client requests across multiple appservers and to provide a highly available environment for the applications.

To run the script, specify the cluster name, cluster type, node name, and server name arguments, as defined in the following table:
Argument Description
clusterName Name to assign to the new cluster.
clusterType Type of cluster to create. We can specify a value of APPLICATION_SERVER, GENERIC_SERVER, or WEB_SERVER.
nodeName Name of the node on which the cluster resides.
serverName Name of the server to add to the cluster.

Syntax

AdminClusterManagement.createClusterWithFirstMember(clusterName, clusterType, nodeName, serverName)

Example usage

AdminClusterManagement.createClusterWithFirstMember("myCluster", "APPLICATION_SERVER", "myNode", "myServer")

 

createClusterWithoutMember

This script creates a new cluster configuration in the environment. Use clusters to manage a group of appservers as a single unit, and distribute client requests among the appservers that are members of the cluster. Create a cluster to balance the client requests across multiple application servers and to provide a highly available environment for the applications.

To run the script, specify the cluster name argument, as defined in the following table:
Argument Description
clusterName Name to assign to the new cluster.

Syntax

AdminClusterManagement.createClusterWithoutMember(clusterName)

Example usage

AdminClusterManagement.createClusterWithoutMember("myCluster")

 

createFirstClusterMemberWithTemplate

This script uses a template to add the first server cluster member to a specific cluster. 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 creating the cluster by converting a server to a cluster. By creating a first cluster member, the template of the cluster member is stored in the scope of the cluster. Additional cluster members are created using the cluster member template stored in the cluster scope

To run the script, specify the cluster name, node name, new member name, and template name arguments, as defined in the following table:
Argument Description
clusterName Name of the cluster of interest.
nodeName Name of the node on which the application server resides.
newMemberName Name to assign to the cluster member.
templateName Name of the template to use to create the cluster member.

Syntax

AdminClusterManagement.createFirstClusterMemberWithTemplate(clusterName, nodeName, newMemberName, templateName)

Example usage

AdminClusterManagement.createFirstClusterMemberWithTemplate("myCluster", "myNode", "myClusterMember", "default")

 

createFirstClusterMemberWithTemplateNodeServer

This script uses a node with an existing appserver as a template to create a new cluster member in the configuration. By creating the first cluster member, a copy of that member is stored as part of the cluster data and becomes the template for all additional cluster members that you create.

To run the script, specify the cluster name, node name, new member name, template node name, and template server name arguments, as defined in the following table:
Argument Description
clusterName Name of the cluster to which the system adds the cluster member.
nodeName Name of the node on which the application server resides.
newMemberName Name to assign to the cluster member.
templateNodeName Name of the node with an existing application server to use as the template when creating the new cluster member.
templateServerName Name of the existing appserver to use as the model when creating the new cluster member.

Syntax

AdminClusterManagement.createFirstClusterMemberWithTemplateNodeServer(clusterName, nodeName, newMemberName, newMemberName, templateNodeName, templateServerName)

Example usage

AdminClusterManagement.createFirstClusterMemberWithTemplateNodeServer("myCluster", "myNode", "newClusterMember", "myTemplateNode", "myTemplateServer")

 

deleteCluster

This script deletes the configuration of a server cluster. A server cluster consists of a group of appservers that are referred to as cluster members. The script deletes the server cluster and each of its cluster members.

To run the script, specify the cluster name argument, as defined in the following table:
Argument Description
clusterName Name of the cluster to remove from the configuration.

Syntax

AdminClusterManagement.deleteCluster(clusterName)

Example usage

AdminClusterManagement.deleteCluster("myCluster")

 

deleteClusterMember

This script removes a cluster member from the cluster configuration. A cluster member is a server that belongs to a cluster.

To run the script, specify the cluster name, node name, and server cluster member arguments, as defined in the following table:
Argument Description
clusterName Name of the cluster from which to remove the cluster member.
nodeName Name of the node that is associated with the cluster member to delete.
clusterMemberName Name of the cluster member to remove from the configuration.

Syntax

AdminClusterManagement.deleteClusterMember(clusterName, nodeName, clusterMemberName)

Example usage

AdminClusterManagement.deleteClusterMember("myCluster", "myNode", "clusterMember1")




 

Related tasks


Use the script library to automate the application serving environment
Automating server administration using the scripting library
Clustering servers with scripting
Balancing workloads

 

Related


Cluster query scripts
Cluster configuration scripts