Example: Creating a cluster using wsadmin
An example creating a cluster using an existing server follows:
- Identify the server to convert to a cluster and assign it to the server variable:
Using Jacl:
set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
Using Jython:
server = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')
- Convert the existing server to a cluster by using the convertToCluster command passing in the existing server and the cluster name:
Using Jacl:
$AdminConfig convertToCluster $server myCluster1This command converts a cluster named myCluster with server1 as its member.
Using Jython:
print AdminConfig.convertToCluster(server, 'myCluster1')
An example of this output follows:
myCluster1(cells/mycell/cluster/myCluster1:cluster.xml#ClusterMember_1)
- Save the changes with the following command:
Using Jacl:
$AdminConfig save
Using Jython:
AdminConfig.save()