Node group configuration scripts


The scripting library provides multiple script procedures to automate your server configurations. Use the information in this topic to use scripts that query, configure, and manage the node configurations. We can run each script individually, or combine procedures to create custom automation scripts for the environment.

Use node groups to define groups of nodes can host members of the same cluster. An application that is deployed to a cluster must be capable of running on any of the cluster members. The node that hosts each of the cluster members must be configured with software and settings that are necessary to support the application.

By organizing nodes that satisfy the application requirements into a node group, you establish an administrative policy that governs which nodes can be used together to form a cluster. Those who define the cell configuration and those who create server clusters can operate with more independence from one another. All node management script procedures are located in...

WAS_HOME/scriptLibraries/system/V70

Use the following script procedures to query, configure, and manage your node configurations:

 

addNodeGroupMember

This script adds a node to a node group that exists in the configuration. To run the script, specify the name of the node and the node group, as defined in the following table:


Table 1. addNodeGroupMember argument descriptions

Argument Description
nodeName Logical name for the node group member. A node group member is a node. The name must be unique within the cell. A node group member name typically is identical to the host name for the computer.
nodeGroupName Logical name for the node group. The name must be unique within the cell. The name can start with a number.

Syntax

AdminNodeManagement.addNodeGroupMember(nodeName, discoveryProtocol)

Example usage

AdminNodeManagement.addNodeGroupMember("myNode", "myNodeGroup")

 

checkIfNodeExists

This script displays whether the node of interest exists in a specific node group. To run the script, specify the node group and node arguments, as defined in the following table:


Table 2. checkIfNodeExists argument descriptions

Argument Description
nodeGroupName Name of the node group to query.
nodeName Name of the node to query.

Syntax

AdminNodeManagement.checkIfNodeExists(nodeGroupName, nodeName)

Example usage

AdminNodeManagement.checkIfNodeExists("myNodeGroup", "myNode")

 

checkIfNodeGroupExists

This script displays whether a specific node group exists in the configuration. To run the script, specify the name of the node group, as defined in the following table:


Table 3. checkIfNodeGroupExists argument description

Argument Description
nodeGroupName Name of the node group to query.

Syntax

AdminNodeManagement.checkIfNodeGroupExists(nodeGroupName)

Example usage

AdminNodeManagement.checkIfNodeGroupExists("myNodeGroup")

 

createNodeGroup

This script creates a new node group in the configuration. To run the script, specify the name of the node group, as defined in the following table:


Table 4. createNodeGroup argument description

Argument Description
nodeGroupName Name of the node group to create.

Syntax

AdminNodeManagement.createNodeGroup("nodeGroupName")

Example usage

AdminNodeManagement.createNodeGroup("myNodeGroup")

 

createNodeGroupProperty

This script assigns custom properties to the node group of interest. To run the script, specify the name of the node, as defined in the following table:


Table 5. createNodeGroupProperty argument descriptions

Argument Description
nodeGroupName Name of the node of interest.
customPropertyName Name, or key, for the property. Each property name must be unique. If the same name is used for multiple properties, the value specified for the first property that has that name is used. Do not start the property names with was. because this prefix is reserved for properties that are predefined in the appserver.
customPropertyValue Value to assign to the custom property name.
customPropertyDesc Optionally specifies a description for the custom property to create.
isPropertyRequired Optionally specifies whether the custom property is required in the configuration. Specify true to set the custom property as required in the configuration.

Syntax

AdminNodeManagement.createNodeGroupProperty(nodeGroupName, customPropertyName, customPropertyValue, customPropertyDesc, isPropertyRequired)

Example usage

AdminNodeGroupManagement.createNodeGroupProperty("myNodeGroup", "myProp", "myPropValue", "this is my prop", "true")

 

deleteNodeGroup

This script deletes a node group from the configuration. To run the script, specify the node group name, as defined in the following table:


Table 6. deleteNodeGroup argument description

Argument Description
nodeGroupName Name of the node group to delete.

Syntax

AdminNodeManagement.deleteNodeGroup(nodeGroupName)

Example usage

AdminNodeManagement.deleteNodeGroup("myNodeGroup")

 

deleteNodeGroupMember

This script removes a node from a specific node group in the configuration. To run the script, specify the node group name and node name arguments, as defined in the following table:


Table 7. deleteNodeGroupMember argument descriptions

Argument Description
nodeGroupName Name of the node group of interest.
nodeName Name of the node to remove from the node group.

Syntax

AdminNodeManagement.deleteNodeGroupMember(nodeGroupName, nodeName)

Example usage

AdminNodeManagement.deleteNodeGroupMember("myNodeGroup", "myNode")

 

deleteNodeGroupProperty

This script removes a specific custom property from a node group. To run the script, specify the node group name and property name arguments, as defined in the following table:


Table 8. deleteNodeGroupProperty argument descriptions

Argument Description
nodeGroupName Name of the node group of interest.
customPropertyName Name of the custom property to remove from the node group configuration.

Syntax

AdminNodeManagement.deleteNodeGroupProperty(nodeGroupName, customPropertyName)

Example usage

AdminNodeManagement.deleteNodeGroupProperty("myNodeGroup", "myProp")

 

help

This script displays the script procedures that the AdminNodeGroupManagement script library supports. To display detailed help for a specific script, specify the name of the script of interest, as defined in the following table:


Table 9. help argument description

Argument Description
script Name of the script of interest.

Syntax

AdminServerManagement.help(script)

Example usage

AdminServerManagement.help("modifyNodeGroupProperty")

 

listNodeGroups

This script displays the node groups that exist in the configuration. If we specify the name of a specific node, the script returns the name of the node group to which the node belongs.


Table 10. listNodeGroups argument description

Argument Description
nodeName Optionally specifies the name of the node to use to query the node groups.

Syntax

AdminNodeManagement.listNodeGroups()

Example usage

AdminNodeManagement.listNodeGroups()

 

listNodeGroupMembers

This script lists the name of each node configured within a specific node group. To run the script, specify the node group argument, as defined in the following table:


Table 11. listNodeGroupMembers argument description

Argument Description
nodeGroupName Name of the node group of interest.

Syntax

AdminNodeManagement.listNodeGroupMembers(nodeGroupName)

Example usage

AdminNodeManagement.listNodeGroupMembers("myNodeGroup")

 

listNodeGroupProperties

This script lists the custom properties that are configured within a specific node group. To run the script, specify the node group argument, as defined in the following table:


Table 12. listNodeGroupProperties argument description

Argument Description
nodeGroupName Name of the node group of interest.

Syntax

AdminNodeManagement.listNodeGroupProperties(nodeGroupName)

Example usage

AdminNodeManagement.listNodeGroupProperties("myNodeGroup")

 

modifyNodeGroup

This script modifies the short name and description of a node group. To run the script, specify the node group, short name and description arguments, as defined in the following table:


Table 13. modifyNodeGroup argument descriptions

Argument Description
nodeGroupName Name of the node group of interest.
shortName Short name of the node group of interest.
description Description of the node group.

Syntax

AdminNodeManagement.listNodeGroupProperties(nodeGroupName, shortName, description)

Example usage

AdminNodeManagement.listNodeGroupProperties("myNodeGroup", "NG1", "my first node group")

 

modifyNodeGroupProperty

This script modifies the value of a custom property assigned to a node group. To run the script, specify the node group, custom property, custom property value, custom property description, and whether the property is required, as defined in the following table:


Table 14. modifyNodeGroupProperty argument descriptions

Argument Description
nodeGroupName Name of the node group of interest.
customPropertyName Name of the custom property to modify.
customPropertyValue Optionally specifies a new value for the custom property of interest.
customPropertyDescription Optionally specifies a description for the custom property.
isPropertyRequired Optionally specifies whether the custom property is required.

Syntax

AdminNodeManagement.modifyNodeGroupProperty(nodeGroupName, customPropertyName, customPropertyValue, customPropertyDescription, isPropertyRequired)

Example usage

AdminNodeManagement.modifyNodeGroupProperty("myNodeGroup", "customProp", "newValue", "new description of property", "false")




 

Related tasks


Use the script library to automate the application serving environment

 

Related


Server settings configuration scripts
Node administration scripts