Monday, June 01, 2009

How to configure a two node SOA Cluster(BPEL)-HA

It is really easy to set up a two node cluster if you will follow all the steps which i have followed.However it too me very long time to set up a cluster.I have set up a cluster for bpel and i believe it will be helpul for you.

I have done active-passive mode of clustering.

The basic requirement for cluster is that we should have two nodes and one loadbalancer to route the reuest.

It will be pretty much clear with the screen shots

SO as per requirement we will first of all install two instances of SOA Suite.


Installing SOA instance 1



I am giving the installation directory for first node as Machine1 and choosing advanced installation.

Once you provide these details and say next. A pop up window will come and ask if you want to revert to basic installation.Just say you want to continue with advacned installation only.



When choosing the installation type you have to choose it as j2ee server type because we are basically installing the container only.We will be first doing the container clustering then on top of that we will install bpel and do bpel clustering.




Now in the port configuration option choose the defualt value automatic



Next is the important step.Provide the instance name and password
keep in mind that you have to deselect the option

Configure this as administtation oc4j instance.

this is because we will be using active passive mode of clustering so we will be having only one admin console(em) for monitoring.




Need not set vaules in cluster topology configuration so leave it blank





Say next and install the product




Following screen will come up and finally the installtion wizard will complete succcessfully and end.





and finally





Great one instace is completed.Now we will do the installation of another node

Install SOA Instance 2

This installation is again the same however we will be enabling the application server control on instance two

Once again start the installtion wizard



Choose your installation directory and select advanced installation.



Again check the j2ee server type for installation.




Leave the port configuration page untouched and say next




Now in Administrator setting you need to notice one important thing that you have to configure this as adminsitrataion oc4j instance

so you have to select the option in the installation .Check the screenshot you will understand.



Leave the next screen untouched and say next



Install the product



Just check out the consecutive screen and finally exit screen will come.






AS soon as you will install this a page will be opened automatically and wil show the page oracle container for j2ee now you can go to application server control which you might not have got in installation of node 1.

Now we have the two nodes set up so we will go ahead and install a loadbalancer.

Use the same installation wizard as we are using web cache as load balancer.



In the installation type choose web server as an installation type.



Leave the port configuration page untouched and say next.



Provide some name in instance name list and say next



Leave cluster toplogy page untouched and install the product.













Great so now we have two nodes and a load balancer .Now we will start our clustering

We will be doing our server clustering first of all and for that we will use static node list toplogy.There are other topology also but I prefer to use static node only.

Openup our opmn.xml for all the installation

It will be in the following location

SOA_HOME/opmn/conf/opmn.xml

And here you have to check for the attribure “remote”

This is basically the port for remote listening

So for me the results are


For instance 1(D:\product\10.1.3.1\Machine1\opmn\conf) remote port is 6204
Example




check in the same way


For instance 2 remote port is 6205

For loadbalancer remote port is 6206

Now we have to add each element to each of the server.

That is in node one we have to add the entry for node 2 and node 3 and so on.

We have to add the host name and port number

It will be more clear with the screen shot

See if my initial opmn.xml looks like this





Since this is for node 1

We will be adding the following property inside
Tag

Also keep in mind the application server should be up and running at that time.


And now it will look like this




you have to use your own host name and remote port ;)

I have used both the remote and host address as same as I am setting up a cluster in same machine ,if you are using a different machine please change the remote address accordingly.



now restart your server

by stopping



and then starting also check the status



Do the same for other two nodes also



Now for instance 2




we will be adding the other tow nodess



restart second node also

opmnctl stopall



start-opmnctl startall
the check
opmnctl status



Now for node 3

The initial screen is like





after adding the values




So once done setting for node 3 also .

Restart the node 3 also and do opmnctl status @cluster to check if you can see all the three nodes in up and running state





Great now we have configured our oracle AS cluster now we will be modifying our oc4j instacnes so that our routing from loadbalancer to the two nodes is enabled.

We will be using apache Jserv protocol for loadbalancing.For more information on AJP you can refer to the wiki document

http://en.wikipedia.org/wiki/Apache_JServ_Protocol


In order to change we will modify the opmn.xml for machine 1 and machine 2 to use AJP port range and listen for AJP and not for http request.

So for the node1 first

The opmn.xml will initially look like





We will change the http to ajp as shown




After that restart the machine 1 by issueing

Opmnctl stopall
Opmnctl startall

For the second node also we will do the same and restart the server.

Do opmnctl status and open up the console in browser.

You should get a screen like this.You now need to open your em console with loadbalancer url




Now we will be Creating a new group

Log on to em console

IN the group subsection click on create






do the same for other node also and then you should be able to see screen like this



Once group is created ,shut down one of the node and apply bpel process manager stand alone on top of the node which is up and running.

So start installing BPEL 10131 on top of AS

YOu have to run the irca schema first before installing the BPEL because it creates the dehydration store.i have alrready discussed how to run irca schema

Irca schema

Install location/bpel_oc4j\install\soa_schemas\irca


but for continuity i will do it again.

open up a command console and navigate up to Install location/bpel_oc4j\install\soa_schemas\irca

set your oracle home and set your SID



Run the irca schema by typing irca.bat it will ask for the database address




So provide the database details then it will install the three components orabpel,oraesb and orawsm .

It will ask for the password for each instance.In my case however you will find it is asking if you want to overwrite the exisgting schema,it is because i have already ran the irca schema so it is asking for overwriting.

I will say yes and provide the password for all the three schemas.










Once you will give the password for all the schemas it will create the corresponding tables and finally you will get the result like



so now schemas are created so now will isntall bpel on top of our application server.

We will isntall bpel on top of both the application server.

So just start the installation .exe for bpel




We will give the oracle home as the Oracle home of the application server.



Choose oracle application server for middle tier as option




Leave the next page blank





Provide the details of the database



Provide the administrator password and give the http url of the loadbalancer URL


As loadbalancer will now be redirecting to the corresponding console as per load.




now after doing that say next and install




It will isntall the corresponding components on top of application server




Finally end of installtion.




Great in one node bpel is installed ,we will do the same for other node,The only difference will be that the oracle home will be different.



Rest of the steps are same as we have done for the other node.

there are few more configuration we need to check

one at collaxa-config.xml and another is at jgroups-protocol.xml

We define the cluster propery at collaxa-config.xml and the protocols at jgroups-protocol.xml

will explain them in detail later.

Now we will be upgrading 10.1.3.1 to 10.1.3.4

Again start the installation wizard and point the oracle home to the oracle home of one of the node.




Say next and it will summarise the component list




Say next and configuration wizard will come up.




finally end of installation and your bpel and application server is now upgraded to 10.1.3.4





The same steps we have to do for other node also,the only change is the oracle home will be now for the other node.


we have the latest MLR#7 on top of 10.1.3.4.We will apply the same on both the nodes.


Navigate up to the patch number in command prompt.

SEt the ORACLE_HOME and PATH and do opatch lsinventory



once opatch lsinventory runs fine do opatch apply

Once opatch is applied go ahead and follow the post installation task as mentioined in the readme of the patch.

Unfortunately i didn't take the screen shot of opatch apply and its result but i will update it in some later post.

Since we are dealing with bpel only we will upgrade the schema of bpel only.




Once completed for both the nodes.your work is over you have a bpel cluster latest ;)

keep deploying BPEL process on cluster.

1 comment:

chakri said...

Really helpful...

Thanks
Chakri