Creating clusters using scripting

Use the wsadmin tool 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.

Before you begin

There are multiple ways to complete this task. This topic uses the AdminConfig object to create clusters in your environment. Alternatively, you can use the ClusterConfigCommands command group for the AdminTask object or the createCluster script in the AdminClusterManagement script library to create and configure clusters.

Procedure

  1. 啟動 wsadmin Scripting 工具。
  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, as the following example demonstrates:
    • Using Jacl:
      set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
    • Using 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.

    • Using Jacl:
      $AdminConfig convertToCluster $server myCluster1
    • Using Jython:
      AdminConfig.convertToCluster(server, 'myCluster1')
    Example output:
    myCluster1(cells/mycell/cluster/myCluster1|cluster.xml#ClusterMember_1)
  4. 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()

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 11:19
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_createcluster
檔名:txml_createcluster.html