30
Clustering of Mule ESB Sreekanth Kondapalli Integration Architect

Clustering of Mule ESB

Embed Size (px)

Citation preview

Page 1: Clustering of Mule ESB

Clustering of Mule ESB

Sreekanth KondapalliIntegration Architect

Page 2: Clustering of Mule ESB

Management Tool for Clustering

MMC Creating Clustering Disband Clustering

A cluster may contain from one to eight nodes Clustering Programmatically(Alternative)

Management Console REST API

Page 3: Clustering of Mule ESB

Pre-requisites

Atleast two configurations are expected(Current Scenario) Windows Ubuntu

In Windows Mule Run time 3.7.x (ESB) MMC 3.7 configured in Tomcat Server

Ubuntu Configuration of Ubuntu VM Mule runtime 3.7.x (ESB)

Page 4: Clustering of Mule ESB

Warning – Pre requisite

While creating a cluster, all the nodes selected for the cluster must implement the same agent version and the same Mule ESB version.

Upgrade a server so that it matches the Mule ESB version of the other cluster nodes, first unregister the server then upgrade it to the required version of Mule.

Then create the cluster with the upgraded server (and the other servers) as nodes.

Page 5: Clustering of Mule ESB

Registering Server1 – MMC - Windows Install/explode Mule runtime 3.7.2 Install/explode MMC 3.7 Start Mule runtime 3.7.2 /MULE_HOME/bin/mule.bat Start Tomcat server (running on 8585 port) /apache_tomcat_home/bin/startup.bat

Page 6: Clustering of Mule ESB

Registering Server1 – MMC – Windows Contd..

Page 7: Clustering of Mule ESB

Register server in MMC Login to MMC 3.7 application. http://localhost:8585/mmc-3.7.0/

Username: admin Password: admin

Observe for the server

Page 8: Clustering of Mule ESB

Register server in MMC. Contd..

If the Server is not seen Select Server

In the List select the server Click Register Button

Page 9: Clustering of Mule ESB

Registering Server Successful

Page 10: Clustering of Mule ESB

Set up on Server2 - Ubuntu Install/Explode Mule runtime 3.7.2 (please use the same runtime of

windows by copying via WinScp to Ubuntu VM) Start Mule runtime 3.7.2 by executing mule file located in

<MULE_HOME>/bin/ ./mule start

Page 11: Clustering of Mule ESB

Start Server2 - Ubuntu Navigate to log folder and verify the server console to

Page 12: Clustering of Mule ESB

Register Server2

Navigate to MMC 3.7.0 and configure Mule runtime 3.7.2 running in Ubuntu

Manual configuration of Mule Runtime in MMC. Click on Unregistered link. (Please note that Mule runtime running in

Ubuntu is not listed) Click on New Server link

Server Name: Ubuntu Mule Agent URL: http://192.168.56.101:7777/mmc-support Click Add

Page 13: Clustering of Mule ESB

Register Server2. contd..

Page 14: Clustering of Mule ESB

Acknowledgement

Page 15: Clustering of Mule ESB

Two Servers registered Click on All link, you can see Ubuntu server is added to

Page 16: Clustering of Mule ESB

Cluster configurations of 2 Server nodes in MMC

Click on Add and select New Cluster

Page 17: Clustering of Mule ESB

Cluster configurations of 2 Server nodes in MMC. Contd..

In the New Cluster screen, 2 servers will be listed. Specify Cluster Name: DemoCluster Select 2 servers which are configured in previous step from Available

Nodes Click >> to move the servers to Cluster Nodes

Check Multicast is disabled in my network.

Page 18: Clustering of Mule ESB

Cluster configurations of 2 Server nodes in MMC. Contd..

Page 19: Clustering of Mule ESB

Cluster configurations of 2 Server nodes in MMC. Contd..

Click Add to create Cluster nodes

Page 20: Clustering of Mule ESB

Cluster configurations of 2 Server nodes in MMC. Contd..

Once Add is clicked both the servers will be restarted and ‘All’ link will show only 1 DemoCluster instead of 2 server instances.

Page 21: Clustering of Mule ESB

Cluster configurations of 2 Server nodes in MMC. Contd..

After both servers restart then we will see DemoCluster up and running.

Page 22: Clustering of Mule ESB

Demo Application

Application Use Case: I have created an application which will generate 500 string objects and assign to payload using Expression component. Used ‘For Each’ in the next step of flow and added a VM Inbound connector. Created a sub flow using VM outbound connector and logger to log the message. In the logger, I am trying to print the server host name and the payload (String value) to identify the node which has processed the message. And finally, I have printing success message before ending the flow.

Page 23: Clustering of Mule ESB

Mule Flow

Page 24: Clustering of Mule ESB

Deployment of Application to Cluster Click on the Deployment tab in the MMC

Page 25: Clustering of Mule ESB

Deployment of Application to Cluster. Contd..

Click on New Deployment Name: ClusterDemo Applications: Click Upload New Application Choose the mule deployment

file (cluserflow.zip) Servers: Select the ClusterName from drop down (ClusterDemo) Click Deploy

Page 26: Clustering of Mule ESB

Deployment of Application to Cluster. Contd..

Application is deployed in both the nodes of Cluster.

Page 27: Clustering of Mule ESB

Test Application Run the application using any of the node IP i.e localhost or

192.168.56.101 http://localhost:8081/clusterflow

Page 28: Clustering of Mule ESB

Test Application – Verify Log Server 1 Log from both the servers (I have attached the complete logs from

both servers for your reference)

Page 29: Clustering of Mule ESB

Test Application – Verify Log Server 2

Page 30: Clustering of Mule ESB

END