Installing an 11g SOA Cluster – Part V BAM Configuration
By Antony Reynolds on Nov 09, 2010
Configuring a SOA 11g PS2 SOA Cluster – Part V BAM Configuration
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.
Extend the WebLogic Domain to Support BAM
We will extend the domain to support BAM managed servers in a cluster.
Enable BAM Managed Server 1 IP Address
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)
Run the Config Wizard to Extend the Domain.
Because we have an existing domain we will extend it to support the SOA and BPM components. (EDG)
Running Config Script and Selecting Templates
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:
- Basic WebLogic Server Domain
- Oracle BPM Suite
- Oracle SOA Suite
- Oracle Enterprise Manager
- Oracle WSM Policy Manager
- Oracle JRF
This will add BAM to our domain. (EDG)
Configuring RAC Data Sources
We need to configure the JDBC component schema as a multi data source schemas. Select the BAM Schema and set the following:
- Service Name : bamedg.soa.oracle.com (the service name we created in the database)
- Password: <password>
- Host Names: rac1-vip.soa.oracle.com and rac2-vip.soa.oracle.com
- Instance Names: RAC1 and RAC2
- Port Numbers: 1521
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.
Creating Distributed Queues
Because we are installing a cluster we need to customize the following sections:
- JMS Distributed Destinations – to set up distributed queues
- Managed Servers, Clusters, and Machines – to create our BAM managed servers and BAM cluster
- Deployments and Services – to target our deployments at the correct cluster
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.
Created BAM Managed Servers and Cluster
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.
Assign to Servers to Machines
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.
Targeting Deployments, Services and Resources to BAM Cluster
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)
Restart Admin Server
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.
Configuring JMS for Server Migration
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)
Configuring Transaction Failover
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)
Making BAM Server System a Singleton
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)
Disable Hostname Verification
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)
Transfer Changes to Managed Domains
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)
Start BAM Servers
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)
Configuring BAM Web Applications
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)
- Expand BAM in the EM Console tree view.
- Right click OracleBAMWeb(BAM1 or BAM2) and choose BAM Web Properties
- Set the Application URL to be the front end address – http://soa-cluster.soa.oracle.com
- Set the Server Name to be the name of the BAM Server running the Active Data Cache – BAM1. This allows the BAM Web Applications to find the BAM Server.
- Click Apply
Remember that the Server Name should be BAM1 for both servers. (EDG)
Configuring BAM ADC Server
We now need to configure the BAM Server to use the correct address.
- Right click OracleBAMServer(BAM1) and choose System MBean Browser
- Navigate using the tree view to Application Defined MBeans->oracle.bam.server->Server: BAM1->Application: oracle-bam->Config->BAMServerConfig
- Set the ADCServerName attribute to be BAM1 (this identifies the BAM managed server running the Active Data Cache, also referred to as the BAM Server)
- Set the ADCServerPort to be 9001
- Click Apply
With the BAM Web Apps and BAM Server configured we now need to restart the BAM managed servers. (EDG)
Configuring OHS for BAM
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.