In the previous blog entry we set up the SOA and BPM components of our cluster. In this blog entry we will add BAM to the mix as shown in the diagram above. Note that we will configure BAM Server 1 to run on machine 2 because this BAM managed server uses more system resources.
BAM is not a symmetrically scalable system. It consists of a central BAM server (BAM 1) that contains the cache of all events that have occurred. This cache is not currently replicated. Hopefully in the future it will use a Coherence replicated cache to make this available to all nodes. Because the cache is not replicated the BAM server is special. Other BAM servers can help to take away web load from the main server, but all event updates must go to the central BAM server. Because the central BAM server is a singleton we need to configure it to be able run on any machine so that we do not lose BAM capability in event of a machine failure. The other BAM servers have no such requirement and do not require floating IP addresses.
We will extend the domain to support BAM managed servers in a cluster.
Because the BAM singleton server will later be configured to run on any machine through whole server migration we need to bind its IP addresses to some physical machine because we have not set up the automatic migration of IP addresses. We do this by running the ifconfig and arping commands as shown below on the physical machine we first want to run the central BAM server on. In the example below I use sub-adapter 7 to avoid sub-adapters 8 and 9 which we used for the admin and SOA servers. 10.0.3.101 is the IP addresse for bam1.
sudo /sbin/ifconfig eth1:8 10.0.3.101 netmask 255.255.255.0
sudo /sbin/arping -q -U -c 3 -I eth1 10.0.3.101
Check that you can ping BAM server bam1 from all servers. (EDG)
Because we have an existing domain we will extend it to support the SOA and BPM components. (EDG)
From the Oracle common home $MW_HOME/oracle_common run the config wizard at common/bin/config.sh and select “Extend an existing WebLogic domain”. Select the WebLogic domain which is in the aserver (/u01/app/oracle/admin/soa-domain/aserver/soa_domain) directory. When requested make sure you check “Business Activity Monitoring” and then proceed.
The following should be selected but grayed out:
This will add BAM to our domain. (EDG)
We need to configure the JDBC component schema as a multi data source schemas. Select the BAM Schema and set the following:
If we selected a schema prefix of “DEV” then there is no need to set the schema names. If you chose a different prefix then you need to set the schema.
Because we are installing a cluster we need to customize the following sections:
In the Select JMS Distributed Destination Type screen we make sure that we are not using weighted distributed destinations but instead are using uniform distributed destinations (UDD) for the BAM JMS.
In the Configure Managed Servers screen we change the name of new server to BAM1 from bam_server1 and add a second BAM server BAM2. The SOA servers need to be listening on address bam1.soa.oracle.com or bam2.soa.oracle.com as appropriate. This will restrict them to listening on the IP addresses that are configured to float between machines. Both servers can be set to listen on port 9001. Having all servers of the same kind listening on the same port makes it easier to see what is happening.
On the Configure Clusters screen we can add a new cluster called BAM_Cluster and assign the two BAM servers to that cluster on the Assign Servers to Clusters screen.
On the Configure Machines screen delete the LocalMachine that has been created as we previously created the machines we need in the Unix tab when original creating the domain.
We then assign the new servers to physical machines SOAHost1 and SOAHost2 on the Assign Servers to Machines screen. Note that we want to assign BAM1 to SOAHost2 and BAM2 to SOAHost1. Of course it would be better to have more machines so that BAM is not sharing the server with SOA.
Finally we need to make the following changes to the deployments and services to make sure that they are correctly targeted.
|DMS Application||Admin Server, WSM_Cluster, SOA_Cluster, BAM_Cluster|
|oracle.wsm.seedpolicies||WSM_Cluster, SOA_Cluster, BAM_Cluster|
|OWSM Startup class||WSM_Cluster|
|mds-owsm||Admin Server, WSM_Cluster|
|mds-owsm-rac0||Admin Server, WSM_Cluster|
|mds-owsm-rac1||Admin Server, WSM_Cluster|
|mds-soa||Admin Server, SOA_Cluster|
|mds-soa-rac0||Admin Server, SOA_Cluster|
|mds-soa-rac1||Admin Server, SOA_Cluster|
All other items are left as they are set up by the wizard.
The domain has now been extended to support SOA and BPM. (EDG)
To get our changes to the domain to take effect we need to restart the admin server. We are then ready to make some further config changes.
We want to allow BAM Server 1 to migrate between machines so we need to set up its queues on shared storage.
In the WebLogic console we go to Services->Persistence Store and select the UMSJMSFileStore_auto_3 and change the directory to be /u01/app/oracle/admin/soa-domain/soa-cluster/jms. Repeat this for UMSJMSFileStore_auto_4. This will cause the JMS servers in BAM1 and BAM2 to create their JMS queue files in that shared directory, allowing us to fail over BAM1 between nodes. (EDG)
When BAM Server 1 fails over we want it t be able to recover any in-flight transactions so we need to go into Environment->Servers->BAM1->Configuration->Services and set the Directory to be /u01/app/oracle/admin/soa-domain/soa-cluster/tlogs. (EDG)
To make the BAM Server System a singleton we need to untarget it from BAM2 managed server. We do this in the WebLogic console by going to Deployments and choosing oracle-bam then the Targets tab. Select the following and then choose Change Targets:
Set the target for these components to be BAM Server 1 only. Although not strictly necessary it is a good idea to explicitly set BAMServer and BAMServerWS components to be targeted at BAM_Cluster. (EDG)
We need to disable hostname verification for the BAM1 and BAM2 servers as we previously did for the AdminServer, WSM1, WSM2, SOA1 and SOA2 servers. (EDG)
We need to make sure that the managed domains have the latest changes by using the pack command to bundle up a new domain template from the oracle_common/common/bin directory, as before we use the aserver shared directory to move the domain template:
We then run the unpack command on each host to unpack the propagated template to the domain directory of the managed server:
If there are problems starting node manager or servers in the managed domain then you may need to delete the mserver/soa_domain directory and run unpack again. (EDG)
I recommend restarting the node manager on the BAM machines and then using WebLogic console to start the BAM managed servers. Before starting BAM1 make sure that you have enabled the IP address for that server.
You can verify that BAM is ready for use by checking the following URLs
Note that if, like me, your SOA cluster runs on a private network segment accessible only through the load balancer, then you must run the browser in that network segment. In my case I only have Linux machines on that network and so although I can use Firefox to access the Oracle BAM screens they tell me that only Internet Explorer is supported. If you see that message then relax, things are working as they should! (EDG and EDG)
Now that we have working BAM servers we need to configure them for use in the cluster. We will first configure the BAM web applications to be aware of which machine is hosting the BAM server.
Perform the following for each BAM server (BAM1 and BAM2)
Remember that the Server Name should be BAM1 for both servers. (EDG)
We now need to configure the BAM Server to use the correct address.
With the BAM Web Apps and BAM Server configured we now need to restart the BAM managed servers. (EDG)
We can now configure OHS to allow access to BAM by adding the following to the $ORACLE_BASE/admin/OHSn/config/OHS/ohsN/httpd.conf file after the SOA Composer or BPM Entries:
# SOA composer application
MatchExpression /soa/composer WebLogicCluster=soa1:8001,soa2:8001
MatchExpression /bpm/composer WebLogicCluster=soa1:8001,soa2:8001
MatchExpression /bpm/workspace WebLogicCluster=soa1:8001,soa2:8001
MatchExpression /OracleBAM WebLogicCluster=bam1:9001,bam2:9001
MatchExpression /OracleBAMWS WebLogicCluster=bam1:9001,bam2:9001
We can then restart the web servers by issuing the command
/u01/app/oracle/admin/OHSn/bin/opmnctl restartproc ias-component=ohsN
We can now access the BAM servers through the load balancer using Internet Explorer where we should be presented with a login screen. (EDG)
We have now created our SOA cluster and configured it run Web Services Manager (WSM_Cluster), SOA and BPM (SOA_Cluster) and BAM (BAM_Cluster). In the next blog entry we will enable automatic failover of servers between machines and tidy up any other loose ends, but we now have a working cluster that we can use.