+

Search Tips   |   Advanced Search

 

ClusterConfigCommands command group for the AdminTask object

 

You can use the Jython or Jacl scripting languages to cluster servers using scripting. The commands and parameters in the ClusterConfigCommands group can be used to create and delete server clusters and groups of appservers known as cluster members. The ClusterConfigCommands command group for the AdminTask object includes the following commands:

 

createCluster

The createCluster command creates a new server cluster. A server cluster consists of a group of appservers that are referred to as cluster members. Optionally, a replication domain can be created for the new cluster, and an existing server can be included as the first cluster member.

Target object None

Parameters and return values

-clusterConfig

Specifies the configuration of the new server cluster. This command step is required. The following parameters can be specified for this step:

-clusterName

The name of the new server cluster. (Required)

-clusterType

The type of the server cluster that you are creating. The default type is APPLICATION_SERVER. Valid values for this parameter include: APPLICATION_SERVER, PROXY_SERVER, AND ONDEMAND_ROUTER. (Optional)

-preferLocal

Enables or disables node scoped routing optimization within this cluster. The value is true or false. It not specified, the default value is true. (Optional)

-convertServer

Specifies information about an existing appserver to convert to be the first member of the cluster. This command step is optional. The following parameters can be specified for this step:

-serverNode

The name of the node with the server to be converted to the first cluster member. You must also specify the serverName parameter. (Required)

-serverName

The name of the appserver to be converted to the first cluster member. You must also specify the serverNode parameter. (Required)

-memberWeight

The weight of the cluster member. The weight controls the amount of work directed to the appserver. If the weight is greater than the weight assigned to other cluster members, the server will receive a larger share of the workload. The value is a number between 0 and 100. If none is specified, the default is 2. (Optional)

-nodeGroup

The name of the node group which this cluster member"s node, and all future cluster members" nodes, must belong to. All cluster members must reside on nodes in the same node group. If specified, it must be one of the node groups which this member"s node belongs to. If not specified, the default value will be the first node group listed for this member"s node. (Optional)

-replicatorEntry

Specifies a replicator entry for the converted member will be created in the cluster"s replication domain. A replicator entry is used to provide HTTP session data replication. The value is true or false which indicates whether the replicator entry will be created. The default value is false. You can specify this parameter only if the createDomain parameter was set to true in the replicationDomain command step. (Optional)

Examples

Batch mode example usage:

Interactive mode example usage:

 

createClusterMember

The createClusterMember command creates a member of a server cluster. A cluster member is an appserver that belongs to a cluster. If this is the first member of the cluster, specify a template to use as the model for the cluster member. The template can be either a default server template, or an existing appserver.

The first cluster member is used as a template to create subsequent members in the cluster. When you create a first cluster member, the template of the cluster member is stored under the scope of the cluster. Since a cluster can contain members from nodes that run different versions of WAS,

one template will be stored for each version of the WAS node that is already configured as cluster members.

The cluster member template will not exist for a given version of node until a first member is created in any node of the same version. For example, if a cluster contains some V6.1 nodes and some V6.0.x nodes, there will be one cluster member template for the V6.1 node and one cluster member template for the V6.0.x node.

The following template will be used for members that are created for a V6.1 node: $WAS_HOME/config/templates/clusters/clusterName/servers/V6.1MemberTemplate.

The following template will be used for members that are created for a V6.0.x node: $WAS_HOME/config/templates/clusters/clusterName/servers/V6MemberTemplate.

The following template will be used for members that are created for a V5.x node: $WAS_HOME/config/clusters/clusterName/servers/V5MemberTemplate.

When you make a configuration change to members in a cluster, make the same configuration change to the template that is stored in the cluster scope that corresponds.

Target object cluster Object ID - The configuration object ID of the cluster to which the new member will belong. If you do not specify the configuration ID, specify the clusterName parameter. You can obtain the object name programmatically through Java using the WAS ConfigService API or through wsadmin scripting using the AdminConfig object.

Parameters and return values

-clusterName

The name of the cluster to which the new member will belong. If you do not specify this parameter, specify the cluster object ID in the command target.

-genUniquePorts

Generates unique port numbers for each HTTP transport defined in the server. The new server will not have HTTP transports which conflict with any other servers defined on the same node. The value is true or false. The default value is true .

-replicatorEntry

Specifies a replicator entry for the new cluster member will be created in the cluster"s replication domain. A replicator entry is used to provide HTTP session data replication. This command parameter is optional. The value is true or false which indicates whether the entry will be created. The default value is false. You can specify this parameter only if a replication domain has been created for the cluster.

-templateName

The name of an appserver template to use when creating the new cluster member. If you specify a template, you cannot specify the templateServerNode and templateServerName parameters to use an existing appserver as a template. You are required to specify either the templateName parameter, or the templateServerNode and templateServerName parameters in this step.

-templateServerNode

The name of the node with an existing appserver to use as the template when creating the new cluster member. If you specify the templateServerNode parameter, also specify the templateServerName parameter, and you cannot specify the templateName parameter. You are required to specify either the templateName parameter, or the templateServerNode and templateServerName parameters, in this step.

-templateServerName

The name of the existing appserver to use as the model when creating the new cluster member. If you specify the templateServerName parameter, also specify the templateServerNode parameter, and you cannot specify the templateName parameter. You are required to specify either the templateName parameter, or the templateServerNode and templateServerName parameters, in this command step.

-nodeGroup

The name of the node group which this cluster member"s node, and all future cluster members" nodes, must belong to. All cluster members must reside on nodes in the same node group. This parameter is optional. If specified, it must be one of the node groups which this member"s node belongs to. If not specified, the default value will be the first node group listed for this member"s node.

-coreGroup

The name of the core group this cluster member, and all future cluster members, must belong to. All cluster members must belong to the same core group. This parameter is optional. If not specified, the default value is the default core group defined in the cell.

Examples

Batch mode example usage:

First member creation using server and node for template:

AdminTask.createClusterMember('[-clusterName cluster1 -memberConfig 
[[node1 member1 "" "" true false]] -firstMember [["" node1 server1 "" ""]]]')
Second member creation:

AdminTask.createClusterMember('[-clusterName cluster1 -memberConfig [[node1 member2 "" "" true false]]]')

First member creation using server and node for template:

AdminTask.createClusterMember (['-clusterName', 'cluster1', 
'-memberConfig', [['node1', 'member1', "" "", 'true', 'false']], 
'-firstMember', [["", 'node1', 'server1', "" ""]]])
Second member creation:

AdminTask.createClusterMember (['-clusterName', 'cluster1', 
'-memberConfig', [['node1', 'member2', "" "", 'true', 'false']]])

Interactive mode example usage:

 

deleteCluster

The deleteCluster command deletes the configuration of a server cluster. A server cluster consists of a group of appservers that are referred to as cluster members. When a server cluster is deleted, all of its members are deleted.

Use the deleteClusterMember command to delete the configuration of an individual cluster member.

Target object cluster Object ID - The configuration object ID of the cluster to be deleted. If the cluster"s object ID is not specified, then the clusterName parameter must be specified. The object name can be obtained programmatically through Java using the WebSphere ConfigService API, or through wsadmin scripting using the AdminConfig object.

Parameters and return values

-clusterName

The name of the cluster to be deleted. If this parameter is not specified, then the cluster object ID must be specified in the command target.

Examples

Batch mode example usage:

Interactive mode example usage:

 

deleteClusterMember

The deleteClusterMember command deletes the configuration of a cluster member. A cluster member is an appserver that belongs to a server cluster.

Use the deleteCluster command to delete the configuration of a cluster.

Target object member Object ID - The configuration object ID of the cluster member to be deleted. If this is not specified, then the clusterName, memberNode and memberName parameters must be specified. The object name can be obtained programmatically via Java using the WebSphere ConfigService API, or via wsadmin scripting using the AdminConfig command.

Parameters and return values

-clusterName

The name of the cluster which the member to be deleted belongs to. If this parameter is specified, then the memberName and memberNode parameters must also be specified. If this is not specified, then the member object ID must be specified in the command target.

-memberName

The server name of the member to be deleted from the cluster. If this parameter is specified, then the clusterName and memberNode parameters must also be specified. If this is not specified, then the member object ID must be specified in the command target.

-memberNode

The name of the node having the cluster member to be deleted. If this parameter is specified, then the memberName and clusterName parameters must also be specified. If this is not specified, then the cluster member object ID must be specified in the command target.

-replicatorEntry

Specifies the removal of a replicator entry for this cluster member. This command step is optional. The following parameters can be specified for this step:

-deleteEntry

Delete the replicator entry having this cluster member"s name from the cluster"s replication domain. This parameter is optional. The value is true or false which indicates whether to delete the replicator entry. The default value is false.

Examples

Batch mode example usage:

Interactive mode example usage:




 

Related tasks


Use the AdminTask object for scripted administration

 

Related Reference


Commands for the AdminTask object

 

Reference topic