Create clusters using scripting

 

Procedure

  1. Start wsadmin

  2. Identify the server to convert to a cluster and assign it to the server variable:

    Jacl:

    set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
    
    

    Jython

    server = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')
    

  3. Convert the existing server to a cluster by using the convertToCluster command passing in the existing server and the cluster name:

    Jacl:

    $AdminConfig convertToCluster $server myCluster1
    $AdminConfig save
    
    This command converts a cluster named myCluster with server1 as its member.

    Jython

    print AdminConfig.convertToCluster(server, 'myCluster1')
    

    Example output

    myCluster1(cells/mycell/cluster/myCluster1|cluster.xml#ClusterMember_1)
    

  4. In a network deployment environment only, synchronize the node.


 

See Also


AdminConfig object for scripted administration

 

See Also


Commands for the AdminConfig object