Silent installation of the OSB on Red Hat 6

Peter Lorenzen
12/03-2013

In this post I will describe how to do a silent installation and configuration of the OSB.

I go through the same steps as I did in my Installing the Oracle OSB on Red Hat 6 post, but now everything is executed via scripts. I will only focus on the steps that are done differently.

I use Oracle OSB 11.1.1.6 and Red Hat 6 (64-bit).

Overview

Install the WebLogic Server 10.3.6

Check the documentation.

As always I use a soft link to the Java installation.

export PRODUCT="/u01/app/oracle/product"
export SOFTWARE="/u01/software"
export WLS_JAR="wls1036_generic.jar"

$PRODUCT/java_current/bin/java -Djava.io.tmpdir=/u01/temp
 -jar $SOFTWARE/$WLS_JAR -mode=silent
 -silent_xml=/u01/software/scripts/silent-wls10.3.6.xml
 -log=$SOFTWARE/wls_install.log
echo $?
grep -i error wls_install.log

Here is the silent-wls10.3.6.xml file.

Install the OSB

Check the documentation.

First we must create the Oracle inventory. As root run.

cd /u01/software/ofm_osb_generic_11.1.1.6.0_disk1_1of1/Disk1/stage/Response
./createCentralInventory.sh /u01/app/oracle/oraInventory oinstall

Install the OSB.

cd /u01/software/ofm_osb_generic_11.1.1.6.0_disk1_1of1/Disk1
./runInstaller -silent
 -responseFile /u01/software/scripts/custom_installtype_osb11.1.1.6.rsp
 -jreLoc /u01/app/oracle/product/java_current/jre

Here is the custom_installtype_osb11.1.1.6.rsp file.

Create database schemas via the RCU

Check the documentation.

cd ofm_rcu_linux_11.1.1.6.0_disk1_1of1/rcuHome/bin
./rcu -silent -createRepository -databaseType ORACLE -dbUser sys
 -connectString winterfell:1521:THEIMP  -dbRole SYSDBA
 -useSamePasswordForAllSchemaUsers -schemaPrefix DEV
 -component SOAINFRA -tablespace OSB_REPO -tempTablespace TEMP
 -component MDS -tablespace OSB_REPO -tempTablespace TEMP
 -component ORASDPM -tablespace OSB_REPO -tempTablespace TEMP
 -f < passwordfile.txt

This will create 3 schema’s: DEV_SOAINFRA, DEV_MDS, DEV_ORASDPM.

Since the MDS and ORASDPM components are dependencies of SOAINFRA I would have expected that I could use the “-selectDependentsForComponents” parameter alone with the SOAINFRA component but I could not get this to work. The rcu startsup fine but stops after outputting:

Repository Creation Utility – Checking Prerequisites
Checking Component Prerequisites

If you do not use a file to input the passwords the rcu will slowly clear the screen and wait for you to input the sys password. It does not prompt you to input it. It will then proceed and after a while it will clear the screen again and you have to input the password for the new schema’s. Again without prompting for it.

To drop the repositories you can use:

cd ofm_rcu_linux_11.1.1.6.0_disk1_1of1/rcuHome/bin
./rcu -silent -dropRepository -databaseType ORACLE -dbUser sys
 -connectString winterfell:1521:THEIMP  -dbRole SYSDBA
 -schemaPrefix DEV -component SOAINFRA -component MDS -component ORASDPM

Notices that this will also drop the tablespace(s). The rcu stores information in the data dictionary so if you manually drops the schema’s you will not get rid of everything.

select comp_name, owner, version from schema_version_registry;

COMP_NAME                   OWNER        VERSION
--------------------------- ------------ ----------
Metadata Services           DEV_MDS      11.1.1.6.0
SDP Messaging               DEV_ORASDPM  11.1.1.6.0
SOA Infrastructure Services DEV_SOAINFRA 11.1.1.6.0

Configure the OSB

I am using WLST offline to create domains. Check the documentation.

You create domains from a domain template and then extend the domains via extension templates.

An extension template can consists of multiple template JAR files and have dependencies to WebLogic Server resources or other templates. Read more here.

For this example I will use these templates.

Example of WLST for creating an OSB domain.

#!/usr/bin/python
import os, sys

ADMIN_SERVER='AdminServer'
ADMIN_SERVER_PORT=7001
DATABASE='winterfell:1521:THEIMP'
DOMAIN_HOME='/u01/app/oracle/domains/OSB01'
DOMAIN='OSB01'
LISTEN_ADDRESS='wintermute'
MACHINE='Machine1'
MANAGED_SERVER='osb_server1'
MANAGED_SERVER_PORT=8001
MDS_USER='DEV_MDS'
MDS_PASSWORD='welcome1'
MW_HOME='/u01/app/oracle/product/fmw'
NODE_MANAGER='nodemgr'
NODE_MANAGER_LISTEN_ADDRESS='localhost'
NODE_MANAGER_PASSWORD='welcome2'
NODE_MANAGER_PORT=5556
OSB_HOME='/u01/app/oracle/product/fmw/osb'
SOAINFRA_USER='DEV_SOAINFRA'
SOAINFRA_PASSWORD='welcome1'
WEBLOGIC_PASSWORD='welcome1'
WL_HOME='/u01/app/oracle/product/fmw/wlserver_10.3'

###############################################################################
# Create the domain
###############################################################################

readTemplate(WL_HOME + '/common/templates/domains/wls.jar')
cd('/Security/base_domain/User/weblogic')
cmo.setPassword(WEBLOGIC_PASSWORD)
writeDomain(DOMAIN_HOME)
closeTemplate()

###############################################################################
# Open the domain for editing
###############################################################################

readDomain(DOMAIN_HOME)

###############################################################################
# Extend the domain with the OSB
###############################################################################

addTemplate(OSB_HOME + '/common/templates/applications/wlsb.jar')

###############################################################################
# Extend the domain with OWSM
###############################################################################

addTemplate(OSB_HOME + '/common/templates/applications/wlsb_owsm.jar')

###############################################################################
# Extend the domain with the EM
###############################################################################

addTemplate(MW_HOME + '/oracle_common/common/templates/applications/oracle.em_11_1_1_0_0_template.jar')

###############################################################################
# wlsbjmsrpDataSource
###############################################################################

cd('/')
delete('wlsbjmsrpDataSource','JDBCSystemResource')

create('wlsbjmsrpDataSource', 'JDBCSystemResource')
cd('/JDBCSystemResource/wlsbjmsrpDataSource')
set('DescriptorFileName','jdbc/wlsbjmsrpDataSource-jdbc.xml')
set('Target',ADMIN_SERVER +  ',' + MANAGED_SERVER)
cd('/JDBCSystemResource/wlsbjmsrpDataSource/JdbcResource/wlsbjmsrpDataSource')
cmo.setName('wlsbjmsrpDataSource')

cd('/JDBCSystemResource/wlsbjmsrpDataSource/JdbcResource/wlsbjmsrpDataSource')
create('myJdbcDataSourceParams','JDBCDataSourceParams')
cd('JDBCDataSourceParams/NO_NAME_0')
set('JNDIName', java.lang.String('wlsbjmsrpDataSource'))
set('GlobalTransactionsProtocol', java.lang.String('None'))

cd('/JDBCSystemResource/wlsbjmsrpDataSource/JdbcResource/wlsbjmsrpDataSource')
create('myJdbcDriverParams','JDBCDriverParams')
cd('JDBCDriverParams/NO_NAME_0')
set('DriverName','oracle.jdbc.OracleDriver')
set('URL','jdbc:oracle:thin:@' + DATABASE)
set('PasswordEncrypted', SOAINFRA_PASSWORD)
set('UseXADataSourceInterface', 'false')

create('myProperties','Properties')
cd('Properties/NO_NAME_0')
create('user','Property')
cd('Property')
cd('user')
set('Value', SOAINFRA_USER)

cd('/JDBCSystemResource/wlsbjmsrpDataSource/JdbcResource/wlsbjmsrpDataSource')
create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams')
cd('JDBCConnectionPoolParams/NO_NAME_0')
set('CapacityIncrement',1)
set('InitialCapacity',5)
set('MaxCapacity',25)
set('TestTableName','SQL SELECT 1 FROM DUAL')

###############################################################################
# mds-owsm
###############################################################################

cd('/')
delete('mds-owsm','JDBCSystemResource')

create('mds-owsm', 'JDBCSystemResource')
cd('/JDBCSystemResource/mds-owsm')
set('DescriptorFileName','jdbc/mds-owsm-jdbc.xml')
set('Target',ADMIN_SERVER +  ',' + MANAGED_SERVER)
cd('/JDBCSystemResource/mds-owsm/JdbcResource/mds-owsm')
cmo.setName('mds-owsm')

cd('/JDBCSystemResource/mds-owsm/JdbcResource/mds-owsm')
create('myJdbcDataSourceParams','JDBCDataSourceParams')
cd('JDBCDataSourceParams/NO_NAME_0')
set('JNDIName', java.lang.String('jdbc/mds/owsm'))
set('GlobalTransactionsProtocol', java.lang.String('None'))

cd('/JDBCSystemResource/mds-owsm/JdbcResource/mds-owsm')
create('myJdbcDriverParams','JDBCDriverParams')
cd('JDBCDriverParams/NO_NAME_0')
set('DriverName','oracle.jdbc.OracleDriver')
set('URL','jdbc:oracle:thin:@' + DATABASE)
set('PasswordEncrypted', MDS_PASSWORD)
set('UseXADataSourceInterface', 'false')

create('myProperties','Properties')
cd('Properties/NO_NAME_0')
create('user','Property')
cd('Property')
cd('user')
set('Value', MDS_USER)

cd('/JDBCSystemResource/mds-owsm/JdbcResource/mds-owsm')
create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams')
cd('JDBCConnectionPoolParams/NO_NAME_0')
set('CapacityIncrement',1)
set('InitialCapacity',5)
set('MaxCapacity',25)
set('TestTableName','SQL SELECT 1 FROM DUAL')

###############################################################################
# Misc domain settings
###############################################################################

cd ('/')
cmo.setConfigBackupEnabled(True)
cmo.setArchiveConfigurationCount(25)

cd('/Server/' + ADMIN_SERVER)
cmo.setListenAddress(LISTEN_ADDRESS)
cmo.setListenPort(ADMIN_SERVER_PORT)

cd('/Server/' + MANAGED_SERVER)
cmo.setListenAddress(LISTEN_ADDRESS)
cmo.setListenPort(MANAGED_SERVER_PORT)

cd ('/SecurityConfiguration/' + DOMAIN)
cmo.setNodeManagerUsername(NODE_MANAGER)
cmo.setNodeManagerPasswordEncrypted(NODE_MANAGER_PASSWORD)

###############################################################################
# Create machines
###############################################################################

cd ('/')
create(MACHINE, 'UnixMachine')
cd('/Machines/' + MACHINE)
create(MACHINE, 'NodeManager')
cd('NodeManager/' + MACHINE)
set('NMType', 'Plain')
set('ListenAddress', NODE_MANAGER_LISTEN_ADDRESS)
set('ListenPort', NODE_MANAGER_PORT)

cd('/Server/' + ADMIN_SERVER)
set('Machine',MACHINE)

cd('/Server/' + MANAGED_SERVER)
set('Machine',MACHINE)

###############################################################################
# Update, Close and Exit
###############################################################################

updateDomain()
closeDomain()
exit()

The two data sources are default created with the PointBase database, so they are deleted and created again with an Oracle database.

{ 2 comments… read them below or add one }

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: