How to install WSO2 Carbon cluster management feature?

Charitha Kankanamge - WSO2 Technical lead/Manager for Quality Assurance guides you through the steps to install and configure cluster management feature in WSO2 Web Services Application Server.

Date: Tue, 22nd Dec, 2009
Level: Introductory
Reads: 1272 Comments: 0 | Login or register to post comments
Charitha Kankanamge
Manager QA
WSO2 Inc.
charithak's picture

Abstract

High availability and scalability are some of the major requirements expected from any enterprise-grade server product. WSO2 Carbon provides support for clustering hence you can achieve the advantage of mainitaining minimum down time of your servers as well as improving performance. In a clustered server setup, it is extremely important to group a set of nodes and manage them through a single point so that the maintainability is high and efficient. WSO2 Carbon cluster management feature is designed to provides users with these capabilities. It allows users to manage a cluster of WSO2 Carbon servers from a single host. This tutorial guides you through the steps to install and configure cluster management feature in WSO2 Web Services Application Server which is a member of WSO2 Carbon family of products.

Applies To

WSO2 Web Services Application Server 3.0.0 or later

 

Table of Contents

  • Setting up WSO2 Web Services Application Server cluster
  • Installing Cluster management feature
  • Managing Cluster

 

Introduction

Cluster management feature is not included by default in any of the WSO2 Carbon based products. Users are supposed to install it as an Equinox P2 feature in the nodes of a cluster. In this tutorial, we start from setting up a WSO2 Web Services Application Server cluster with 3 nodes placed in 2 node groups (application domains). Then, we install cluster management feature group in one node designated as Cluster Manager. We also install cluster management core feature group on two member nodes. Next, we will see how the node groups can be managed using cluster manager UI.

Setting up WSO2 Web Services Application Server cluster

Download the latest version of WSO2 Web Services Application Server from here. Create three directories called group-manager, group1 and group2. Copy the downloaded wso2wsas-3.X.zip in to those three directories and unzip each of them. Name these distributions appropriately as given below.

Since we are going to run these three instances in a single host we should specify different HTTP and HTTPS ports in all nodes. Edit conf/transports.xml files of each of the above directories to specify different HTTP and HTTPS ports.

Edit cluster-manager/wso2wsas-3.1.2-CM/conf/transports.xml

<transport name="http" class="org.wso2.carbon.server.transports.http.HttpTransport">
<parameter name="port">9764</parameter>

<transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
<parameter name="port">9444</parameter>

Edit group1/wso2wsas-3.1.2-node1/conf/transports.xml

<transport name="http" class="org.wso2.carbon.server.transports.http.HttpTransport">
<parameter name="port">9765</parameter>

<transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
<parameter name="port">9445</parameter>

Edit group2/wso2wsas-3.1.2-node2/conf/transports.xml

<transport name="http" class="org.wso2.carbon.server.transports.http.HttpTransport">
<parameter name="port">9766</parameter>

<transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
<parameter name="port">9446</parameter>

Now, we need to enable clustering in each of these nodes. In order to configure clustering we must update the axis2.xml files of each of the nodes appropriately. Lets update the cluster manager node first.

Cluster Manager

Open cluster-manager/wso2wsas-3.1.2-CM/conf/axis2.xml and locate clustering element and set enable attribute value to true.

<clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="true">

Specify a domain name for the cluster manager node.

<parameter name="domain">CMGroup</parameter>

If the node is designated as cluster manager, then the groupManagement element needs to be enabled. Since we manage two node groups, we need to specify them as given below.

<groupManagement enable="true">
<applicationDomain name="group1"
description="WSAS Group 1"
agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent"/>
<applicationDomain name="group2"
description="WSAS Group 2"
agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent"/>

</groupManagement>

We have configured the necessary files in cluster manager node. Lets update the axis2.xmls of two member nodes.

group1/wso2wsas-3.1.2-node1

First, enable clustering for this node.

<clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="true">

Specify a domain name for this node. Make sure to specify the same applicationDomain name given in the above cluster manager configuration.

<parameter name="domain">group1</parameter>

group2/wso2wsas-3.1.2-node2

First, enable clustering for this node.

<clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="true">

Specify a domain name for this node. Make sure to specify the same applicationDomain name given in the above cluster manager configuration.

<parameter name="domain">group2</parameter>

Now we have performed the necessary configurations and set up a WSO2 Web Services Application Server cluster. Start each of the nodes with -DosgiConsole switch.

sh wso2server.sh -DosgiConsole

Installing Cluster management feature

As I had stated before, cluster management feature is not included by default in WSO2 Web Services Application Server. Therefore, we must install it as a P2 feature using a valid P2 repository. Lets install cluster management feature in cluster-manager/wso2wsas-3.1.2-CM node.

If the server is not started in wso2wsas-3.1.2-CM, start server with -DosgiConsole option and type SS and hit enter to get the OSGI console.

Enter the following commands one-by-one to install cluster management feature group.

osgi> provaddrepo http://dist.wso2.org/p2/carbon/releases/2.0.2

osgi> provaddartifactrepo http://dist.wso2.org/p2/carbon/releases/2.0.2

osgi> provinstall org.wso2.carbon.cluster.mgt.feature.group 2.0.

You should see a confirmation message informing the completion of installation. Restart the server in order for the changes to get affected.

As you installed cluster management feature group in the cluster manager node, we must install cluster manager core feature in the member nodes of the cluster. Lets install cluster manager core in group1/wso2wsas-3.1.2-node1 first.

Start server with -DosgiConsole option and type SS and hit enter to get the OSGI console.

$group1/wso2wsas-3.1.2-node1/bin$ sh wso2server.sh -DosgiConsole

Enter the following commands one-by-one to install cluster management core feature group.

osgi> provaddrepo http://dist.wso2.org/p2/carbon/releases/2.0.2

osgi> provaddartifactrepo http://dist.wso2.org/p2/carbon/releases/2.0.2

osgi> provinstall org.wso2.carbon.cluster.mgt.core.server.feature.group 2.0.2

You should see a confirmation message informing the completion of installation. Restart the server in order for the changes to get affected.

Similarly we can install  org.wso2.carbon.cluster.mgt.core.server.feature.group 2.0.2 on group2/wso2wsas-3.1.2-node2.

Managing Cluster

 We have configured WSO2 Web Services Application Server cluster with 2 node groups and a cluster manager instance. Now we are going to look at the cluster management capabilities provided by WSO2 Carbon by accessing the management console of cluster manager instance. Access the management console of cluster-manager/wso2wsas-3.1.2-CM with the default admin credentials (admin/admin). You will notice the Cluster menu option under the Manage in the left navigation pane. Click on it and you will be directed to Cluster Groups page as follows.

Using this page, you can restart or shutdown the whole cluster.

Click on group1 link in the above page. Members of Group group1 page will be displayed as follows.

You can access the management consoles of each of the members of a group using this page. Also, you can shutdown or restart the selected node group. Also, You can switch the selected group to maintenance mode so that each member stops servicing requests.

Summary

In this tutorial, we looked in to the steps to configure and set up a WSO2 Web Services Application Server cluster, installing WSO2 Carbon cluster management feature group and administering the cluster using a single cluster management agent instance. Though the steps have been discussed using WSO2 Web Services Application Server, the same instructions are applicable for all of the WSO2 Carbon family of products (WSO2 Enterprise Service Bus, WSO2 Business Process Server, WSO2 Mashup Server, WSO2 Governance Registry, WSO2 Identity Server, WSO2 Data Services Server).

 

References

[1]http://wso2.org/library/articles/introduction-wso2-carbon-clustering

[2]http://wso2.org/library/articles/wso2-carbon-cluster-configuration-language 

 

Author

Charitha Kankanamge, Technical lead/Manager for Quality Assurance, WSO2, charitha AT wso2 DOT com

 

Hot Topic
Hot
Topic

Google Gadgets are a nice way to develop user interfaces for distributed services. The fact that they can be hosted anywhere over a network, not necessarily in the very portal server they eventually run in makes them re-usable and allows users to quickly...

Mini Banners
WSO2Con 2010
Latest Webinar
In this webinar we'll share the range of concerns we've heard from the industry, and survey some of the new and sometimes subtle types of lock-in associated with cloud technologies.
Wednesday, 8 September, 10.00 AM (PDT)