Starting clusters using scripting

You can use scripting and the wsadmin tool to start clusters in an application server.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

About this task

Perform the following steps to start a cluster:

Procedure

  1. Identify the ClusterMgr MBean and assign it to the clusterMgr variable.
    • Using Jacl:
      set clusterMgr [$AdminControl completeObjectName cell=mycell,type=ClusterMgr,*]
    • Using Jython:
      clusterMgr = AdminControl.completeObjectName('cell=mycell,type=ClusterMgr,*')
      print clusterMgr
    This command returns the ClusterMgr MBean.
    Example output:
    WebSphere:cell=mycell,name=ClusterMgr,mbeanIdentifier=ClusterMgr,
    type=ClusterMgr,process=dmgr
  2. Refresh the list of clusters.
    • Using Jacl:
      $AdminControl invoke $clusterMgr retrieveClusters
    • Using Jython:
      AdminControl.invoke(clusterMgr, 'retrieveClusters')
    This command calls the retrieveClusters operation on the ClusterMgr MBean.
  3. Identify the Cluster MBean and assign it to the cluster variable.
    • Using Jacl:
      set cluster [$AdminControl completeObjectName cell=mycell,type=Cluster,name=cluster1,*]
    • Using Jython:
      cluster = AdminControl.completeObjectName('cell=mycell,type=Cluster,name=cluster1,*')
      print cluster
    This command returns the Cluster MBean.
    Example output:
    WebSphere:cell=mycell,name=cluster1,mbeanIdentifier=Cluster,type=Cluster,process=cluster1
  4. Start or RippleStart the cluster.
    • To start a cluster, use the following example. These commands invoke the start operation on the cluster MBean:
      • Using Jacl:
        $AdminControl invoke $cluster start
      • Using Jython:
        AdminControl.invoke(cluster, 'start')
    • Use the following example to RippleStart a cluster. RippleStart combines stopping and starting operations. It first stops and then restarts each member of the cluster. For example, your cluster contains 3 cluster members named server_1, server_2 and server_3. When you click RippleStart, server_1 stops and restarts, then server_2 stops and restarts, and finally server_3 stops and restarts. Use the RippleStart option instead of manually stopping and then starting all of the application servers in the cluster. The following commands invoke the rippleStart operation on the cluster MBean:
      • Using Jacl:
        $AdminControl invoke $cluster rippleStart
      • Using Jython:
        AdminControl.invoke(cluster, 'rippleStart')



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 12:02:36 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-zos&topic=txml_startcluster
File name: txml_startcluster.html