Network Deployment (Distributed operating systems), v8.0 > Reference > Jython script library


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 your 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 the WAS_HOME/scriptLibraries/system/V80 directory. 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:

addNodeGroupMember argument descriptions. Run the script to add a node group member.

Argument Description
nodeName Specifies a 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 Specifies a logical name for the node group. The name must be unique within the cell. The name can start with a number.

Syntax

AdminNodeGroupManagement.addNodeGroupMember(nodeName, discoveryProtocol)

Example usage

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


checkIfNodeExists

Display 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:

checkIfNodeExists argument descriptions. Run the script to see if a node exists in a node group.

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

Syntax

AdminNodeGroupManagement.checkIfNodeExists(nodeGroupName, nodeName)

Example usage

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


checkIfNodeGroupExists

Display 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:

checkIfNodeGroupExists argument description. Run the script to see if a node group exists.

Argument Description
nodeGroupName Name of the node group to query.

Syntax

AdminNodeGroupManagement.checkIfNodeGroupExists(nodeGroupName)

Example usage

AdminNodeGroupManagement.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:

createNodeGroup argument description. Run the script to create a node group.

Argument Description
nodeGroupName Name of the node group to create.

Syntax

AdminNodeGroupManagement.createNodeGroup("nodeGroupName")

Example usage

AdminNodeGroupManagement.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:

createNodeGroupProperty argument descriptions. Run the script to specify a node group property.

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 your property names with was. because this prefix is reserved for properties that are predefined in the application server.
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

AdminNodeGroupManagement.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:

deleteNodeGroup argument description. Run the script to delete a node group.

Argument Description
nodeGroupName Name of the node group to delete.

Syntax

AdminNodeGroupManagement.deleteNodeGroup(nodeGroupName)

Example usage

AdminNodeGroupManagement.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:

deleteNodeGroupMember argument descriptions. Run the script to delete a node group member.

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

Syntax

AdminNodeGroupManagement.deleteNodeGroupMember(nodeGroupName, nodeName)

Example usage

AdminNodeGroupManagement.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:

deleteNodeGroupProperty argument descriptions. Run the script to delete a node group property.

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

Syntax

AdminNodeGroupManagement.deleteNodeGroupProperty(nodeGroupName, customPropertyName)

Example usage

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


help

Display 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:

help argument description. Run the script to view help.

Argument Description
script Name of the script of interest.

Syntax

AdminServerManagement.help(script)

Example usage

AdminServerManagement.help("modifyNodeGroupProperty")


listNodeGroups

Display the node groups that exist in the configuration. If you 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. Run the script to list node groups.

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

Syntax

AdminNodeGroupManagement.listNodeGroups()

Example usage

AdminNodeGroupManagement.listNodeGroups()


listNodeGroupMembers

This script lists the name of each node that is 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. Run the script to see node group members.

Argument Description
nodeGroupName Name of the node group of interest.

Syntax

AdminNodeGroupManagement.listNodeGroupMembers(nodeGroupName)

Example usage

AdminNodeGroupManagement.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. Run the script to see node group properties.

Argument Description
nodeGroupName Name of the node group of interest.

Syntax

AdminNodeGroupManagement.listNodeGroupProperties(nodeGroupName)

Example usage

AdminNodeGroupManagement.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. Run the script to change a node group.

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

Syntax

AdminNodeGroupManagement.listNodeGroupProperties(nodeGroupName, shortName,
description)

Example usage

AdminNodeGroupManagement.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. Run the script to change a node group property.

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

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

Example usage

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

Use the script library to automate the application serving environment using wsadmin.sh


Related


Server settings configuration scripts
Node administration scripts

+

Search Tips   |   Advanced Search