You can configure dynamic 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. Clusters
consist of a single type of server. A dynamic cluster can be started and stopped by an
autonomically managed controller when the operational mode is set to supervised or
automatic, unlike a static cluster that is started and stopped
manually. Currently, the operational mode is manual for dynamic clusters for
managed Liberty servers.
Before you create a cluster, see Known issues and
limitations in the IBM® Modernized Runtime Extension for Java™ (MoRE) documentation. To learn about prerequisites for
dynamic clusters, see Creating dynamic clusters in the WebSphere® Application Server Network Deployment 9.0.5 documentation.
Creating dynamic clusters for managed Liberty server members with the console
Use the Create a new dynamic cluster wizard in the administrative console to
create a dynamic cluster and add managed Liberty
servers as cluster members.
-
In the administrative console, click . The
Create a new dynamic cluster wizard starts.
-
On the Step 1: Select a dynamic cluster server type page, select the
Managed Liberty server dynamic cluster server type and then click
Next.
-
On the Step 2: Select the membership method page, choose whether to define cluster
member automatically or manually and then click Next.
- Automatically define cluster members with rules
-
To create a policy that defines which servers join the dynamic cluster, select
Automatically define cluster members with rules and specify a name in the
Dynamic cluster name field.
The Prefer local enabled and Create a replication domain for
this cluster settings are not available for managed Liberty servers.
- Manually define cluster members
-
To specify the servers that join the dynamic cluster, select Manually define cluster
members.
Use this option to convert an existing static cluster
for managed Liberty servers to a dynamic
cluster.
After creating a dynamic cluster with manually defined members, you can use the
Add or Remove buttons on the Dynamic cluster members page to change cluster membership.
-
On the Step 3: Define dynamic cluster members page, the method that
you use to define members depends on your selection in the previous step. After you define members,
click Next.
-
If you selected Automatically define cluster members with rules, use the
subexpression builder to create a membership policy that defines the nodes on which to place cluster
instance. The created expression is compared to all the nodes in the cell, selecting any nodes for
which the subexpression is true.
Click Preview membership to see which MoRE-enabled nodes are eligible for deploying the managed
Liberty server dynamic cluster with your defined
membership policy.
-
If you selected Manually define cluster members, select the managed Liberty server to convert from an existing static
cluster to a dynamic cluster.
-
On the
Step 4: Select a dynamic cluster template page, choose a template.
-
To create a cluster member from a template, select the
default-managed-liberty-server template.
-
To create a cluster member by using an existing server as a template, select a managed Liberty server. For this option, only cluster members
on MoRE-enabled nodes are available.
-
On the Step 5: Specify dynamic cluster specific properties page,
change the default selections as wanted and then click Next. Use the
selections to configure the dynamic cluster properties as follows.
-
Define the minimum number of cluster instances. The default minimum number of instances is one
instance and the maximum default is no limit on instances. If a minimum value is excessive,
performance degradation might occur.
-
Define the maximum number of cluster instances. The default value has no limit on the number of
cluster instances.
-
Determine whether to enable vertical stacking. When you configure vertical stacking, more than
one dynamic cluster instance can start on the same node.
-
Specify an isolation preference for the dynamic cluster.
-
On the Summary page, verify the dynamic cluster name, server type,
server template, property selections, and member nodes, and then click
Finish.
Save the changes to your administrative configuration. When you save the changes, select to
sync the changes to the repository.
The cluster is shown with the Managed Liberty
server server type on the Dynamic clusters page. Click the cluster name to see details in the dynamic 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. You can start and
stop cluster members on the Dynamic cluster member collection page. For information about
administering clusters with the console, see Balancing workloads in the Network Deployment 9.0.5
documentation.
Creating dynamic clusters for managed Liberty server members with wsadmin scripting
You can create a dynamic cluster in two ways:
- Use the wsadmin AdminTask.createDynamicCluster command to create a dynamic
cluster with the
MANAGED_LIBERTY_SERVER cluster type.
- Convert an existing managed Liberty server
static cluster into a dynamic cluster with the
AdminTask.createDynamicClusterFromStaticCluster command.
For information about dynamic cluster commands, see Intelligent Management: dynamic cluster administrative tasks in the Network Deployment 9.0.5 documentation. For information about
command properties and options that don't apply for managed Liberty servers, see AdminTask.createDynamicCluster and other dynamic cluster commands.
-
Start the wsadmin tool.
wsadmin -lang jython
-
Create a dynamic cluster.
-
Run the wsadmin AdminTask.createDynamicCluster command. Specify a cluster name
for dcName, set the operational mode to manual,
and set serverType to MANAGED_LIBERTY_SERVER.
AdminTask.createDynamicCluster('dcName','[-membershipPolicy "node_nodegroup = \'DefaultNodeGroup\'"
-dynamicClusterProperties
"[[operationalMode manual][minInstances 0][maxInstances -1][numVerticalInstances 2][serverInactivityTime 1440][serverType MANAGED_LIBERTY_SERVER]]"
-clusterProperties "[[templateName default]]"]')
-
Create a dynamic cluster from a static cluster.
- Create a static cluster with the
MANAGED_LIBERTY_SERVER cluster type and add a managed Liberty server as a cluster member.
- Run the AdminTask.createDynamicClusterFromStaticCluster command. Specify a
managed Liberty server for
clusterName.AdminTask.createDynamicClusterFromStaticCluster('clusterName')
-
Save the changes to your administrative configuration.
AdminConfig.save()
-
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 dynamic cluster, confirm that your cluster is in the list of dynamic clusters
and start the cluster. For more information, see Starting clusters using scripting in the Network Deployment 9.0.5 documentation.