Any WSO2 product like WSO2 BPS, WSO2 AS, WSO2 ESB etc is based on WSO2 Carbon platform. One inherent characteristic of this platform is, it's easily front-end and back-end separated.
As well this is an interesting deployment pattern which is very useful in many scenarios. In this post what I tried to do is monitor two WSO2 back-end server instances (ESB and BPS) via a single front-end server instance.
Table of Content
- What's front-end(FE) and back-end(BE) separation?
- Advantages
- Tested Environment
- How to separate FE and BE features of a product
- Configure ports to connect FE and BE
- How to compose a FE of two products
- Configurations steps to connect FE and BE
Carbon products can be separated as the backend components that runs the middleware logic and the frontend that contains the GUI to manage, monitor and control the instance.
Suppose a WSO2 product is a set of features containing front-end (FE), back-end (BE) and common (Com.) features as follows.
Then we can separate the product into FE and BE segments as follows.
+
Advantages
- This pattern is helpful to keep the backend binary size limited and to provide facility to render the console in a remote machine.
- By using a single frontend deployment can connect to multiple backends by changing the backend url in the management console.
- This will help to manage multiple products/ multiple instances of the same product by using a single console.
Here again what I’m going to do is depicted as follows.
I’m gonna monitor two WSO2 product BE instances (ESB and BPS), via a single FE instance which composed of ESB FE and BPS FE.
Here I’m using ESB 3.0.1 and BPS 2.0.1.
Note - The reason for specifically using these versions is both products should be released based on the same carbon core (here it’s Carbon 3.0.1), in order to mix features of different products in each other.
How to separate FE and BE features of a product
Separating FE and BE features of a WSO2 carbon product is works out of the box. It’s supported via the product management console.
Let’s see how to create a WSO2 ESB BE. Creating a WSO2 BPS BE is also the same. Creating a WSO2 ESB FE is same except the step 5.
- Start ESB
- Go to https://10.100.0.23:9443/carbon
- In the Web console goto Configure -> Features in the left-side menu
- Goto Settings tab, and add the repository http://dist.wso2.org/p2/carbon/releases/3.0.0/ .
This repo based on Carbon version used in the ESB. refer - http://wso2.org/projects/carbon/provisioning-wso2-carbon-with-equinox-p2
- Goto “Installed Features” tab. Select “All Console Features”. Select “Uninstall”. If you need to separate out the BE features, select “All Server Features”.
- Then re-start the server. Once you’re done the Web-UI console will look like below.
Configure ports to connect FE and BE
It’s essential to avoid port conflicts, as now there can be several server instances trying to grab the same ports. We can do this by modifying the ports used for
- management console http and https transport listeners- $CARBON-HOME/repository/conf/mgt-transports.xml
- <transport class="org.wso2.carbon.server.transports.http.HttpTransport" name="http"></transport>
- <transport class="org.wso2.carbon.server.transports.http.HttpsTransport" name="https"></transport>
- http and https transport listeners - $CARBON-HOME/repository/conf/axis2.xml
- <transportReceiver name="http" class="org.wso2.carbon.core.transports.http.HttpTransportListener">
- <transportReceiver name="https" class="org.wso2.carbon.core.transports.http.HttpsTransportListener">
- Change the server url in carbon.xml such that FE points to BE.
- <ServerURL>https://${carbon.local.ip}:${carbon.management.port}${carbon.context}/services/</ServerURL>
How to compose a FE of two products
We need a server instance consisted of ESB FE and BPS FE. For that what we can do is adding BPS features to WSO2 ESB product and removing BPS and ESB BE features (i.e all server features) from it. In current carbon, only FE features can be installed. But the released versions only feature groups can be installed.
Or we can do the other way around as well. Here the easiest way is to add the BPS features to ESB product as there’s only one feature (BPEL Feature) to add as follows.
Configurations steps to connect FE and BE
Now after that we can start three servers. i.e -
- BPS BE
- ESB BE
- BPS FE +ESB FE
1 comment:
Awesome Artical Really i have searching this type of valuable information From a lot of days i found satisfaction when Read your blog Thanks for giving this type blog and also please Read link bvba Woodstone which provide information server monitoring software & server monitoring tools
Post a Comment