+

Search Tips   |   Advanced Search

Node group configuration scripts

The scripting library provides script procedures to automate the 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 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 app_server_root/scriptLibraries/system/V70 directory. Use the following script procedures to query, configure, and manage the 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:

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

AdminNodeGroupManagement.addNodeGroupMember(nodeName, discoveryProtocol)

Example usage

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

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

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:

Argument Description
nodeGroupName Name of the node group to query.

Syntax

AdminNodeGroupManagement.checkIfNodeGroupExists(nodeGroupName)

Example usage

AdminNodeGroupManagement.checkIfNodeGroupExists("myNodeGroup")


createNodeGroup

Create a New node group in the configuration.

To run the script, specify the name of the node group, as defined in the following table:

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:

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:

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:

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:

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

Syntax

AdminNodeGroupManagement.deleteNodeGroupProperty(nodeGroupName, customPropertyName)

Example usage

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

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.

Argument Description
nodeName Optional. 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 configured within a specific node group.

To run the script, specify the node group argument, as defined in the following table:

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 configured within a specific node group.

To run the script, specify the node group argument, as defined in the following table:

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:

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

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:

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
  • Server settings configuration scripts
  • Node administration scripts