Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
You can also use the AdminTask object to perform this task. For more about using the AdminTask object to create cluster members, see the Commands for AdminTask object article. To create cluster members using the AdminConfig object, perform the following steps:
set cluster [$AdminConfig getid /ServerCluster:myCluster1/]
cluster = AdminConfig.getid('/ServerCluster:myCluster1/') print cluster
Example output:
myCluster1(cells/mycell/cluster/myCluster1|cluster.xml#ServerCluster_1)
set node [$AdminConfig getid /Node:mynode/]
node = AdminConfig.getid('/Node:mynode/') print node
Example output:
mynode(cells/mycell/nodes/mynode|node.xml#Node_1)
set serverTemplate [$AdminConfig listTemplates Server]
serverTemplate = AdminConfig.listTemplates('Server') print serverTemplate
Example output:
server1(templates/default/nodes/servers/server1|server.xml#Server_1)
$AdminConfig createClusterMember $cluster $node {{memberName clusterMember1}}
AdminConfig.createClusterMember(cluster, node, [['memberName', 'clusterMember1']])
$AdminConfig createClusterMember $cluster $node {{memberName clusterMember1}} $serverTemplate
print AdminConfig.createClusterMember(cluster, node, [['memberName', 'clusterMember1']], serverTemplate)
Example output:
clusterMember1(cells/mycell/clusters/myCluster1|cluster.xml$ClusterMember_2)
Related concepts
AdminConfig object for scripted administration
Related reference
Commands for the AdminConfig object