|
Question |
The Information Center documents steps for creating a
cluster member using wsadmin scripting. However, it is not obvious how to
use any existing server as a server template. |
|
Cause |
How to create a cluster member using wsadmin
scripting |
|
Answer |
1. Start wsadmin
2. Set cluster [$AdminConfig getid /ServerCluster:testCluster/]
Note: testCluster is the name of an existing cluster on the machine
Output of the above command is:
testCluster(cells/ajayws2Network/clusters/testCluster:cluster.xml#testCluster)
3. Set the node where the cluster member will be created:
set node [$AdminConfig getid /Node:ajayws2/]
Output of the above command is:
ajayws2(cells/ajayws2Network/nodes/ajayws2:node.xml#Node_1)
4. Get the cluster member template - example uses myServer as a template:
set testTemplate [$AdminConfig getid /Node:ajayws2/Server:myServer/]
Output of the above command is:
myServer(cells/ajayws2Network/nodes/ajayws2/servers/myServer:server.xml#Server_1)
5. Create the cluster member:
$AdminConfig createClusterMember $cluster $node {{memberName testMember1}}
testTemplate
Output of the above command is:
testMember1(cells/ajayws2Network/clusters/testCluster:cluster.xml#ClusterMember_1135701687906)
6. Save the configuration:
$AdminConfig save |
|