Wednesday, April 21, 2010

SOA 10g Cluster Installation - Part 1


The SOA production environment (HA) constists of a cluster which will handle all calls. The cluster has its respository schema in an Oracle RAC cluster.

The cluster have two nodes, each node will have the following components:

Oracle HTTP Server
Three J2EE servers hosting




a.Oracle BPEL Process Manager (BPEL),Enterprise Service Bus (ESB) Runtime process and Oracle Web Service Manager (policymanager, control and monitor)(WSM).
b.Oracle Web Service Manager Gateway
c.Oracle Enterprise Service Bus Design Time (ESBDT)
d. This is the ESB process managing the ESB repository. There must only be one process running managing an ESB repository.

Apart from all other components, the ESB DesignTime component will be configured as Active-Passive, i.e. failover clusters, because only one instance of these components (ESBDT) must be running at the same time within a cluster.

Pre-installation

The following pre-installation tasks have been performed as per the SOA Suite 10.1.3.1 Installation Guide.

Create the groups
As root execute the following
# groupadd oinstall
# groupadd dba
# groupadd oper
Create the oracle user
As root execute the following
# useradd –g oinstall –G dba,oper –m –s /bin/bash oracle
# passwd oracle
oracle123
oracle123
Create the directory structure
As root execute the following
cd /opt
chown oracle:oinstall app
As oracle

cd /opt
mkdir –p OraSource/Patches

SHELL Limits for user oracle
The following table contains the recommended shell limits for the oracle user, depending on the user's default shell.

Bourne or Bash Shell
---------------------------------------------------------------------
Limit Korn Shell     Limit C or tcsh     Shell Limit       Hard Limit
----------------------------------------------------------------------
Nofile                      Nofile                descriptors           65536
Noproc                   Processes           maxproc              16384
----------------------------------------------------------------------
To increase the shell limits:
1.Add the following lines to
/etc/security/limits.conf:
oracle--soft--nproc--2047
oracle--hardn--proc--16384
oracle--soft--nofile--2048
oracle--hard--nofile--65536
oracle--soft--core--unlimited
oracle--hard--core--unlimited
oracle--soft--memlock--3500000
oracle--hard--memlock--3500000

2.Add the following line to the /etc/pam.d/login file, if it does not already exist:
session required pam_limits.so

Integration Repository Creation Assistant (irca.sh)

The SOA Suite installation requires that the necessary database schemas (ORABPEL, ORAESB and ORAWSM) are installed into the target database before installation begins. To do so, the irca.sh utility has been used, as follows:
1.Run irca.sh as follows:

./irca.sh and answer the questions:
Enter database "host port serviceName" [localhost 1521 orcl]:
dbhost1-vip.domain 1521 service.domain

Enter sys password:***********

Password for ORABPEL: oracle123
Password for ORAESB: oracle123
Password for ORAWSM: oracle123

2.Check the irca[DATE].log for any errros.

OHS/ESB/BPEL Installation Steps

This section will cover relevant information from the SOA Suite 10.1.3.1 installation process. Screenshots of important installation decisions are included.
Create the catalog structure for SOA as follows:
call ohs alias
mkdir –p $ORACLE_HOME
call soa alias
mkdir –p $ORACLE_HOME
call esbdt alias


Common Installation for all Nodes

Perform the following steps in all nodes in the cluster at the same time, step by step.


1) Install a Web Server in ORACLE_HOME for OHS [/u01/app/oracle/product/10.1.3/ohs]
a) Advanced install
b) Choose Web Server
c) Automatic ports
d) Specify ohs as instancename
e) Cluster discovery at 225.0.0.1:67890.

2) Install a J2EE Server for the following ORACLE_HOME’s (on all 2 nodes)a) SOA [/u01/app/oracle/product/10.1.3/soa]
i) Advanced install
ii) Choose J2EE Server
iii) AS instance:soa
iv) For midtier1 Thisis an admin OC4J instance, otherwise not.
v) OC4J instance name: admin
vi) Check to access this instance from a separate HTTP server
vii) Cluster discovery at 225.0.0.1:67890
b) ESBDT [/u01/app/oracle/product/10.1.3/esbdt]
i) Advanced install
ii) Choose J2EE Server
iii) AS instance:esbdt
iv) This is not an admin OC4J instance
v) OC4J instance name: home
vi) Check to access this instance from a separate HTTP server
vii) Cluster discovery at 225.0.0.1:67890

3)Add OC4J components
soa
---
createinstance -instancename oc4j_soa -groupName soa_group -protocol ajp
createinstance -instancename oc4j_wsm -groupName wsm_group -protocol ajp
opmnctl stopall


esbdt
-----
createinstance -instancename oc4j_esbdt -groupName esbdt_group -protocol ajp
opmnctl stopall



4) Disable ascontrol on one of the cluster nodes – ascontrol must only be running of ONE of the cluster nodes. (If this was missed during J2EE installation)a) Update OH/j2ee/admin/config/server.xml
b) Set start=false on ascontrol.

5) Disable the home-components in esbdt, gtwy.
a) In each environment, update its opmn.xml to disable the home-component.

opmnctl stopall
vi opmn/conf/opmn.xml
process-type id="home" module-id="OC4J" status="disabled"


6)Configure Application server clustering.
a)Use static discovery method. In all instances opmn.xml, update the node list in the topology section:

nodes list=" midtier1.domain:6200
,midtier1.domain:6201
,midtier1.domain:6202
,midtier1.domain:6203
,midtier1.domain:6205
,midtier2.domain:6200
,midtier2.domain:6201
,midtier2.domain:6202
,midtier2.domain:6203
,midtier2.domain:6205"


After this change reload/restart opmn.
opmnctl reload

b) Configure Apache for load balancer URL’s. In httpd.conf:



Checkpoint 1

a) Make sure all above is done in both clusters both nodes.
b) Verify with opmnctl @cluster status
c) Verify Internal Enterprise Manager URL access (http://LB.domain/em).

Install BPEL Process Manager

a) Start the installer

b) Specify the ORACLE_HOME where the SOA component is located (/u01/app/oracle/product/10.1.3/soa).

c) Select Middle Tear installation type.

d) No HTTP Proxy settings.

e) Database connection (dbhost1-vip.domain:1521^dbhost2-vip:1521), service name: service.domain

f) Administration settings. Choose oc4j_soa as OC4J instance.
   Enter the loadbalancer:port (LB.domain:80)

Configure the cluster for BPEL Process Manager

a) Update OH/bpel/system/config/collaxa-config.xml

        i) Set enableCluster to true

       ii) Make sure the value of ClusterName is the same for all BPEL installations in the cluster, set to loadbalanserhostname:port.

b) Update OH/bpel/system/config/jgroup-protocol.xml.

     i) The value for mcast-addr and mcast-port should be the same for all BPEL installations in the cluster.

    (1) mcast_addr="228.8.15.24"
    (2) mcast_port="45788"

c) Update OH/bpel/utilities/ant-orabpel.properties:


   cluster = true
   oc4jinstancename = soa_group

d) Restart the SOA components


opmnctl restartproc process-type=oc4j_soa

Checkpoint 2

a) Make sure all above is done in both clusters both nodes.

b) Visit BPELConsole

          i) http://midtier1.domain:7777/BPELConsole

         ii) http://midtier2.domain:7777/BPELConsole

        iii) http://LB.domain/BPELConsole

c) Visit BPELAdmin (/BPELAdmin)

      i) Verify that soapCallbackUrl and soapServerUrl matches the loadbalancer

Install ESB Runtime Environment

a) Start the installer

b) Specify the ORACLE_HOME where the SOA component is located (/u01/app/oracle/10.1.3/soa).

c) Select Middle Tear installation type.

d) No HTTP Proxy settings.

e) Database connection (dbhost1-vip.domain:1521^dbhost2-vip:1521), service name: service.domain

f) Administration settings. Choose oc4j_soa as OC4J instance.

             Enter the loadbalancer:port (LB.domain:80)

g) Select Runtime as ESB type.

Install ESB Repository Instances

a) Specify the ORACLE_HOME where the ESBDT component is located (/u01/app/oracle/10.1.3.1/esbdt).

b) Select Middle Tear installation type.

c) HTTP Proxy settings.

d) Database connection (dbhost1-vip.domain:1521^dbhost2-vip:1521), service name: service.domain

e) Administration settings. Choose oc4j_soa as OC4J instance.

             Enter the loadbalancer:port (LB.domain:80)

f) Select Repository as ESB type.

g) Update the datasources to use the correct ESB schema for oc4j_soa, oc4j_esbdt and oc4j_esbsa. (E.g. OH/j2ee/oc4j_soa/config/data-sources.xml). Search for ‘oraesb’…

h) Restart the SOA and ESBDT components

Checkpoint 3


Before doing any ESB-related configuration – all ESB installations must be finished on all nodes in the cluster. Note that the singleton instances must only exist in the internal cluster.


ESB Runtime configuration

a) Update PermGen in opmn.xml. Set it to 256 for the oc4j_soa component.



             MaxPermSize=256M

b) ESB runtime cluster. Comment out the primary_oc4j parameter in esb_config.ini.

      # Central OC4J or not
       #primary_oc4j=true

c) Name the ESB runtime clusters in the same file.

 cluster_name=ESB_MIDP

d) Restart opmn in soa ORACLE_HOME.

ESB DesignTime Configuration

a) JNDI’s for Topic and Topic connection factories

   i) Login to Enterprise manager as oc4jadmin.

   ii) Enter the oc4j_esbdt instance.

    iii) Select the administration tab and navigate to Services, Enterprise Messaging Service, Database persistence.

  iv) Click deploy

      (1) Recource Adapter Module Name: OracleOJMS

      (2) Select ‘Add a new resource provider to be used by this connector’.

      (3) Resource Provider Name: esbRP

     (4) Datasource JNDI location: jdbc/esbaqdatasource

    (5) OK

v) Click the restart link. If any error perform a manual shutdown:

    opmnctl shutdown
    opmnctl startall

vi) Navigate to the Resource Adapter page of the newly created adapter.

vii) Enter the Connection Factory tab

     (1) Create new connection factory

     (2) Select javax.jms.XATopicConnectionFactory

     (3) Continue

     (4) JNDI Location: OracleOJMS/XATCF

     (5) Finish

viii) Create another connection factory with the following values

    (1) Interface: javax.jms.TopicConnectionFactory

    (2) JNDI: OracleOJMS/TCF

ix) Enter the Administered Object tab

  (1) Create

 (2) Object class: oracle.j2ee.ra.jms.generic.AdminObjectTopicImpl

 (3) Continue

 (4) JNDI: ESBTopics

 (5) resourceProviderName: esbRP

 (6) Finish

x) Make sure all applications in the component are up (except ascontrol and javasso)

Note: Perform the same for the other ESB runtime components (runtime + singletons).

xi) Update opmn.xml for Service failover for the design time instances.

esbdt
vi opmn/conf/opmn.xml


process-type id="oc4j_esbdt" module-id="OC4J" service-failover="1"
process-set id="default_group" numproc="1


opmnctl reload
opmnctl restartproc process-type=oc4j_esbdt

xii) Import new ESB metadata in one of the design time instances - one per cluster.

i) Create an esbparam.properties file. Make sure hostname and port is for the loadbalancer infront of the internal cluster where the design time is located.

DT_OC4J_HTTP_PORT=
DT_OC4J_HOST=

PROP_NAME_DEFERRED_TOPIC_JNDI=ESBTopics/Topics/ESB_JAVA_DEFERRED

PROP_NAME_DEFERRED_TCF_JNDI=OracleOJMS/TCF

PROP_NAME_DEFERRED_XATCF_JNDI=OracleOJMS/XATCF

PROP_NAME_CONTROL_TOPIC_JNDI=ESBTopics/Topics/ESB_CONTROL

PROP_NAME_CONTROL_TCF_JNDI=OracleOJMS/XATCF

PROP_NAME_ERROR_TOPIC_JNDI=ESBTopics/Topics/ESB_ERROR

PROP_NAME_ERROR_TCF_JNDI=OracleOJMS/TCF

PROP_NAME_ERROR_XATCF_JNDI=OracleOJMS/XATCF

PROP_NAME_ERROR_RETRY_JNDI=ESBTopics/Topics/ESB_ERROR_RETRY
PROP_NAME_ERROR_RETRY_TCF_JNDI=OracleOJMS/XATCF
PROP_NAME_MONITOR_TOPIC_JNDI=ESBTopics/Topics/ESB_MONITOR
PROP_NAME_MONITOR_TCF_JNDI=OracleOJMS/TCF
PROP_NAME_INITIAL_CONTEXT_FACTORY=com.evermind.server.rmi.RMIInitialContextFactory
ACT_ID_RANGE=400

ii) Populate it with ant:

ant import-params -Dparamfile=esbparam.properties -DDB_URL=jdbc:oracle:thin:@//dbhost1-vip.domain:1521/service.domain -DDB_USER=oraesb -DDB_PASSWORD=

iii) Update topic and topic connection factory in ESB Console for the internal cluster

   (1) Login to ESB console (/esb)

  (2) Select Default System

  (3) Update:

     (a) Rename DefaultSystem to InternalSystem

    (b) Cluster name: ESB_MIDP

    (c) Virtual host and port matching the load balancer for the internal cluster.

   (d) Topic: ESBTopics/Topics/ESB_JAVA_DEFERRED

   (e) Topic connection factory: OracleOJMS/XATCF

xiii) Slide repository

soa


cd integration/esb/config
cp Domain_DB.xml Domain.xml

esbdt

cd integration/esb/config
cp Domain_DB.xml Domain.xml

xiv) ESB designtime cluster. Rename the cluster in esb_config.ini. It must not be the same as the clustername for the runtime.

esbdt


vi $ORACLE_HOME/integration/esb/config/esb_config.ini

# Cluster name

cluster_name=ESBDT_MIDP
opmnctl restartproc process-type=oc4j_esbdt

Checkpoint 4

Make sure all ESB instances are running as expected. Also, view their logfiles during startup to see that the DT bootstrap is OK. Use the aplogtails script in the end of this document.