AdminClusterManagement
AdminClusterManagement:
wsadmin scripting used:
./wsadmin.sh -lang jython
>AdminClusterManagement.createClusterMember("CLUSTER1", "localhostNode02", "server1")
>AdminConfig.save()
Create Cluster Without member
Syntax:
>AdminClusterManagement.createClusterWithoutMember(clusterName)
Example usage
>AdminClusterManagement.createClusterWithoutMember("myCluster")
Create Cluster Member:
Syntax:
>AdminClusterManagement.createClusterMember(clusterName, nodeName, newMemberName)
Example usage
>AdminClusterManagement.createClusterMember("myCluster", "myNode", "clusterMember1")
Create Cluster with First Member
Syntax:
>AdminClusterManagement.createClusterWithFirstMember(clusterName, clusterType, nodeName, serverName)
Example usage
>AdminClusterManagement.createClusterWithFirstMember("myCluster", "APPLICATION_SERVER", "myNode", "myServer")
Delete Cluster member
Syntax:
>AdminClusterManagement.deleteClusterMember(clusterName, nodeName, clusterMemberName)
Example usage
>AdminClusterManagement.deleteClusterMember("myCluster", "myNode", "clusterMember1")
Delete Cluster
Syntax:
>AdminClusterManagement.deleteCluster(clusterName)
Example usage
>AdminClusterManagement.deleteCluster("myCluster")
==============================================
rippleStartSingleCluster
startAllClusters
startSingleCluster
Use the following script procedures to stop cluster processes in your environment:
immediateStopSingleCluster
stopAllClusters
stopSingleCluster
rippleStartSingleCluster
This script stops and restarts the cluster members within a specific cluster configuration.
Syntax
AdminClusterManagement.rippleStartSingleCluster(clusterName)
Example usage
AdminClusterManagement.rippleStartSingleCluster("myCluster")
startAllClusters
This script starts each cluster within a cell configuration.
Syntax
AdminClusterManagement.startAllClusters()
Example usage
AdminClusterManagement.startAllClusters()
startSingleCluster
This script starts a specific cluster in your configuration.
Syntax
AdminClusterManagement.startSingleCluster(clusterName)
Example usage
AdminClusterManagement.startSingleCluster("myCluster")
immediateStopAllRunningClusters
This script stops the server cluster members for each active cluster within a specific cell. The server ignores any current or pending tasks. When the stop operation begins, the cluster state changes to partially stopped. After all servers stop, the cluster state becomes stopped.
Syntax
AdminClusterManagement.immediateStopAllRunningClusters()
Example usage
AdminClusterManagement.immediateStopAllRunningClusters()
immediateStopSingleCluster
This script stops the server cluster members for a specific cluster within a cell. The server ignores any current or pending tasks. When the stop operation begins, the cluster state changes to partially stopped. After all servers stop, the cluster state becomes stopped.
Syntax
AdminClusterManagement.immediateStopSingleCluster(clusterName)
Example usage
AdminClusterManagement.immediateStopSingleCluster("myCluster")
stopAllClusters
This script stops the server cluster members of each active cluster within a specific cell. Each server stops so that the server can complete existing requests and allow failover to another member of the cluster. When the stop operation begins the cluster state changes to partially stopped. After all servers stop, the cluster state becomes stopped.
Syntax
AdminClusterManagement.stopAllClusters()
Example usage
AdminClusterManagement.stopAllClusters()
stopSingleCluster
This script stops the server cluster members of a specific active cluster within a cell. Each server stops so that the server can complete existing requests and allow failover to another member of the cluster. When the stop operation begins the cluster state changes to partially stopped. After all servers stop, the cluster state becomes stopped.
Syntax
AdminClusterManagement.stopSingleCluster(clusterName)
Example usage
AdminClusterManagement.stopSingleCluster("myCluster")
Cluster configuration scripts
The scripting library provides multiple script procedures to automate your application server configurations. Use the scripts in this topic to configure clusters with or without cluster members, using a template, and to remove clusters from your configuration. You can run each script individually, or combine procedures to create custom automation scripts.
The AdminClusterManagement script procedures are located in the app_server_root/scriptLibraries/server/V70 directory.
Use the following script procedures to configure clusters in your environment:
- createClusterMember
- createClusterWithFirstMember
- createClusterWithoutMember
- createFirstClusterMemberWithTemplate
- createFirstClusterMemberWithTemplateNodeServer
Use the following script procedures remove clusters and cluster members from your configuration:
createClusterMember
This script assigns a server cluster member to a specific cluster. When you create 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.
Table 1. createClusterMember argument descriptions. Run the script with the cluster name, node name, and new member name arguments. | |
Argument | Description |
clusterName | Specifies the name of the cluster to which the system adds the cluster member. |
nodeName | Specifies the name of the node on which the application server resides. |
newMemberName | Specifies the 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 application servers as a single unit, and distribute client requests among the application servers that are members of the cluster. Create a cluster to balance your client requests across multiple application servers and to provide a highly available environment for your applications.
Table 2. createClusterWithFirstMember argument descriptions. Run the script with the cluster name, cluster type, node name, and server name arguments. | |
Argument | Description |
clusterName | Specifies the name to assign to the new cluster. |
clusterType | Specifies the type of cluster to create. You can specify a value of APPLICATION_SERVER, GENERIC_SERVER, orWEB_SERVER. |
nodeName | Specifies the name of the node on which the cluster resides. |
serverName | Specifies the 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 your environment. Use clusters to manage a group of application servers as a single unit, and distribute client requests among the application servers that are members of the cluster. Create a cluster to balance your client requests across multiple application servers and to provide a highly available environment for your applications.
Table 3. createClusterWithoutMember argument descriptions. Run the script with the cluster name argument. | |
Argument | Description |
clusterName | Specifies the 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. You can create the first cluster member using any existing server as a template or a default server template. You can also create a first cluster member when you create the cluster by converting a server to a cluster. When you create 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
Table 4. createFirstClusterMemberWithTemplate argument descriptions. Run the script with the cluster name, node name, new member name, and template name arguments. | |
Argument | Description |
clusterName | Specifies the name of the cluster of interest. |
nodeName | Specifies the name of the node on which the application server resides. |
newMemberName | Specifies the name to assign to the cluster member. |
templateName | Specifies the 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 application server as a template to create a new cluster member in your configuration. When you create 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.
Table 5. createFirstClusterMemberWithTemplateNodeServer argument descriptions. Run the script with the cluster name, node name, new member name, template node name, and template server name arguments. | |
Argument | Description |
clusterName | Specifies the name of the cluster to which the system adds the cluster member. |
nodeName | Specifies the name of the node on which the application server resides. |
newMemberName | Specifies the name to assign to the cluster member. |
templateNodeName | Specifies the name of the node with an existing application server to use as the template when creating the new cluster member. |
templateServerName | Specifies the name of the existing application server 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 application servers that are referred to as cluster members. The script deletes the server cluster and each of its cluster members.
Table 6. deleteCluster argument description. Run the script with the cluster name argument. | |
Argument | Description |
clusterName | Specifies the name of the cluster to remove from your configuration. |
Syntax
AdminClusterManagement.deleteCluster(clusterName)
Example usage
AdminClusterManagement.deleteCluster("myCluster")
deleteClusterMember
This script removes a cluster member from your cluster configuration. A cluster member is a server that belongs to a cluster.
Table 7. deleteClusterMember argument descriptions. Run the script with the cluster name, node name, and server cluster member arguments. | |
Argument | Description |
clusterName | Specifies the name of the cluster from which to remove the cluster member. |
nodeName | Specifies the name of the node that is associated with the cluster member to delete. |
clusterMemberName | Specifies the name of the cluster member to remove from your configuration. |
Syntax
AdminClusterManagement.deleteClusterMember(clusterName, nodeName, clusterMemberName)
Example usage
AdminClusterManagement.deleteClusterMember("myCluster", "myNode", "clusterMember1")
Comments
Post a Comment