[Network Deployment 9.0.5.24 or
later]

Configuring static clusters for managed Liberty servers

You can configure static clusters for managed Liberty servers with the administrative console or wsadmin scripting.

A cluster enables you to manage a group of application servers as a single unit, and distribute client requests among the application servers that are members of the cluster. A static cluster is started and stopped manually, unlike a dynamic cluster that is started and stopped by an autonomically managed controller. Clusters consist of a single type of server. To learn about clusters and prerequisites for clusters, read Creating clusters in the WebSphere® Application Server Network Deployment 9.0.5 documentation.

Before you create a cluster, see Known issues and limitations in the IBM Modernized Runtime Extension for Java (MoRE) documentation.

Creating static clusters for managed Liberty server members with the console

Use the Create a new cluster wizard in the administrative console to create a static cluster and add managed Liberty servers as cluster members.

  1. In the administrative console, click Servers > Clusters > WebSphere application server clusters > New. The Create a new cluster wizard starts.

  2. On the Step 1: Enter basic cluster information page, specify a name for the cluster and then click Next.

  3. On the Step 2: Create first cluster member page, specify a name for the first cluster member, select a node, select a basis for the member, and then click Next.

    For the basis for the first cluster member, select one of the following options.

    • Create a member from the default managed Liberty server template.
    • Create a member by using an existing managed Liberty server as a server template.
    • Create a member by converting an existing managed Liberty server.

    You cannot create an empty cluster and use it for managed Liberty servers. For a list of console page changes, see Settings in MoRE.

  4. On the Step 3: Create additional cluster members page, add other wanted members and then click Next. You can also add members later after the cluster is created.

  5. On the Summary page, verify the cluster, member server, clone template, and clone basis selections, and then click Finish.

  6. Save the changes to your administrative configuration. When you save the changes, select to sync the changes to the repository.

    The cluster is shown in the list of clusters on the WebSphere application server clusters page. Click the cluster name to see details in the cluster settings.

    For a list of changes to the pages, see Settings in MoRE.

After you create a cluster, you can start, stop, and otherwise administer it. For information about administering clusters with the console, see Balancing workloads in the Network Deployment 9.0.5 documentation.

Creating static clusters for managed Liberty server members with wsadmin scripting

Use the wsadmin AdminTask.createCluster command to create a cluster with the MANAGED_LIBERTY_SERVER cluster type and then add a cluster member with the wsadmin AdminTask.createClusterMember command. Or, convert an existing managed Liberty server into a cluster and member with the AdminTask.createCluster -convertServer option.

  1. Start the wsadmin tool.

    wsadmin -lang jython
  2. Create a static cluster with a managed Liberty server as a cluster member.
    • Create a cluster and then add a cluster member.
      1. Create a cluster. Run the AdminTask.createCluster command with the MANAGED_LIBERTY_SERVER cluster type.

        AdminTask.createCluster(['-clusterConfig', ['-clusterName', 'cluster1',
         '-clusterType', 'MANAGED_LIBERTY_SERVER']])

        The MANAGED_LIBERTY_SERVER cluster type is available in Network Deployment 9.0.5.24 and later. For information about changes to wsadmin commands, see Scripting commands in MoRE.

      2. Add a managed Liberty server as a cluster member. Run the AdminTask.createClusterMember command with nodeName and memberName.

        AdminTask.createClusterMember(['-clusterName', 'cluster1',
         '-memberConfig', ['-memberNode','node1', '-memberName', 'member1']])
    • Convert a managed Liberty server as the first member into a cluster. Run the AdminTask.createCluster command with the -convertServer option and with the nodeName and the existing managed Liberty server.
      AdminTask.createCluster(['-clusterConfig', ['-clusterName', 'cluster1'],
       '-convertServer', ['-serverNode', 'node1', '-serverName', 'mls1']])

    For command option descriptions, see ClusterConfigCommands command group for the AdminTask object in the Network Deployment 9.0.5 documentation.

  3. Save the changes to your administrative configuration.

    AdminConfig.save()
  4. Synchronize the node.

    Use the syncNode script to synchronize the node as shown in the following example.

    AdminNodeManagement.syncNode('node1')

    Alternatively, use the syncActiveNodes script to synchronize the node as shown in the following example.

    AdminNodeManagement.syncActiveNodes()

After you create a cluster, confirm that your cluster is in the list of clusters and start the cluster. For more information, see Starting clusters using scripting in the Network Deployment 9.0.5 documentation.