Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Cluster servers with wsadmin scripting


Create clusters using scripting

Use wsadmin.sh to create application server, generic server, and proxy server clusters. A cluster is a set of servers that you manage together as a way to balance workload. There are multiple ways to complete this task. This topic uses the AdminConfig object to create clusters in the environment. Alternatively, you can use the ClusterConfigCommands command group or the createCluster script in the AdminClusterManagement script library to create and configure clusters.


Procedure

  1. Start wsadmin.sh.

  2. Identify the server to convert to a cluster.

    Determine the configuration ID of the server of interest 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.

    Use the convertToCluster command for the AdminConfig object to convert the existing server to a cluster. Specify the name of the server and the name to assign to the cluster, as the following example demonstrates.

      ### Jacl

      $AdminConfig convertToCluster $server myCluster1
      

      ### Jython

      AdminConfig.convertToCluster(server, 'myCluster1')
      

    Example output:

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

  4. Save the configuration changes.

    Save the configuration changes:

    AdminConfig.save()
    

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

    Use the syncActiveNodes script in the AdminNodeManagement script library to propagate the changes to all active nodes, as the following example demonstrates:

    AdminNodeManagement.syncActiveNodes()
    


Clusters and workload management
Create clusters
Use the wsadmin scripting AdminConfig object for scripted administration
Create a proxy server cluster


Related


Cluster configuration scripts
Commands for the AdminConfig object using wsadmin.sh

+

Search Tips   |   Advanced Search