Clone your Oracle FMW SOA Suite 11g americas cup win 2682133k1

Clone your Oracle FMW SOA Suite 11g

Sometimes, you would like to have an extract from a SOA Suite 11g  production environment to test it in a test or acceptance environment.

There are several ways to do this, but in this post I’d like to discuss about how to get a clone of your SOA Suite 11g, from one WebLogic Server host to another.

To extract a clone, you will have to determine which components should be cloned:

  • The SOA repository schema’s, like MDS, SOA-INFRA and so on.
  • The WebLogic and FMW software
  • The SOA Suite Domain Configuration including all SCA components and other deployments.

The SOA Repository

Only taking a clone of your you Oracle FMW  SOA Suite is not enough. It requires you to clone the database repository aswell.

You can ask your DBA to clone the database or create a new database and do an export and import of all the schema’s belonging to the SOA Suite

These schema’s are:

– MDS

– SOAINFRA

– OASDPM

– ORABAM ( if installed)

The Oracle FMW/SOA Suite cloning process

This section covers a clone action from a physical server on where the following components are installed:

– Oracle WebLogic 10.3.5

– Oracle SOA Suite 11.1.1.4

The cloning will be done to configure a new physical server.

Cloning the Middleware home

First, an archive file should be created of the source Middleware home, by copying the binary files of that Middleware home, including all directories, into a archive file. Be aware that all WebLogic Admin and Managed Server instances are up and running on the source host

  • From the source host: copy pasteBinary.sh(MW_HOME/oracle_common/bin) and cloningclient.jar(MW_HOME/oracle_common/jlib) to the target  (MW_HOME/oracle_common)
  • On the source, clone all the software binaries executing:
$MW_HOME/oracle_common/bin/copyBinary.sh -javaHome /app/Oracle/Middleware/jrockit_160_20_D1.1.0-18 -archiveLoc /tmp/mw_copy.jar -sourceMWHomeLoc /app/Oracle/Midleware -invPtrLoc /app/oracle/oraInst.loc

$MW_HOME is set to something like /app/oracle/Middleware.

  • On the target host, create a directory somewhere, like clone. This is for your cloned files.
  • Transfer your created archive ( in my example called mw_copy.jar) to the clone directory on the target host
  • Transfer the oraInst.loc also to the physical host. Create a directory called oraInventory and put the file in it.

Cloning the Oracle FMW / SOA Suite components

Next step is to cloning the FMW components, including domain configuration. This can be done by using the copyConfig script, located in the MW_HOME/oracle_common bin.

  • Create a simple text file and place the WebLogic adminstrator password in it
vi pwd.txt
welcome1

Save the file in the home folder of the oracle user

  • Navigate to the $MW_HOME/oracle_common/bin and execute:
$MW_HOME/oracle_common/bin/copyConfig.sh -javaHome /app/Oracle/Middleware/jrockit_160_20_D1.1.0-18 -archiveLoc /tmp/fmwsoa_copy.jar -sourceDomainLoc /app/Oracle/Middleware/user_projects/domains/WLS_SOAWC -sourceMWHomeLoc /app/Oracle/Middleware/ -domainHostName sourcehost -domainPortNum 7001 -domainAdminUserName weblogic -domainAdminPassword /home/oracle/pwd.txt-silent true

Sourcehost will be the name or ip-adress of your WebLogic host.. This jar file contains the entire domainconfiguration plus deployments, adapters and so on.

After this has been done, we should create a moveplan. This can be extracted from this archive. The moveplan creation is needed to change all kinds of settings of the new physical host.

  • Navigate to the $MW_HOME/oracle_common/bin and execute:
extractMovePlan.sh -javaHome /app/oracle/Middleware/jrockit_160_20_D1.1.0-18 -archiveLoc /tmp/fmwsoa_copy.jar -planDirLoc /tmp/moveplan

Now transfer the moveplan and the fmwsoa_copy.jar to the target host. Next, we will work on the target host and complete the cloning process

Extract the clone on the target

Firstt, before we proceed we need to ensure that java is  installed on the target box. You could copy over you JDK directory from the source host, or do a fresh install. Afterwards, don’t forget to set your JAVA_HOME and include in into your PATH variables

export JAVA_HOME=<path to your JDK>
export PATH=$PATH:$JAVA_HOME/bin

Next we will create a directory structure similar to the source, something like /app/oracle. Normally this should be done by root, ensure that the oracle user has enough permissions to read/write/execute.

First we will extract the cloned Middleware home into /app/oracle

Next we execute from the clone directory:

pasteBinary.sh -javaHome /app/oracle/jrockit_160_20_D1.1.0-18 -archiveLoc /clone/mw_clone.jar -targetMWHomeLoc /app/oracle/Middleware

The java Home is the location in which you installed your JDK.

This will take some time. When fisnished, you can continue extracting your FMW SOA components.

But first, we have to edit the moveplan.xml, which was extracted from the FMW clone. In here you can set it to the new host, change JDBC, or everything else what nedds to be changed.

When this is done, we will extract the FMW archive.

pasteConfig.sh -javaHome /app/oracle/jrockit_160_20_D1.1.0-18 -archiveLoc /clone/fmwsoa_copy.jar -targetDomainLoc /app/oracle/Middleware/user/projects/domains/WLS_SOA -targetMWHomeLoc /app/oracle/Middleware -movePlanLoc /clone/move_plan.xml -domainAdminPassword /clone/pwd.txt -logDirLoc /tmp/log

After completed, you can start your WebLogic and SOA Suite and perform basic sanity checks like testing JDBC, lgging in to EM and navigate to the BPEL Services or check the following URL’s

http://<hostname:port>/soa-infra

http://<hostname:port>/b2bconsole

http://<hostname:port>/integration/worklistapp

http://<hostname:port>/OracleBAM

4 Comments

  1. Shanthi October 28, 2011
  2. kanishka September 6, 2011
  3. Michel Schildmeijer August 15, 2011
  4. Jacco H. Landlust August 12, 2011