You are on page 1of 10

Contents

Weblogic Cloning .......................................................................................................................................... 2


Scenario..................................................................................................................................................... 2
Pre-Requisites ........................................................................................................................................... 2
Cloning Steps............................................................................................................................................. 3
Moving the MW Home and Binary Files (Weblogic & SOA Binaries).................................................... 3
Moving the Configuration of the Java Components(Admin & Managed Servers) ............................... 4
Moving the Configuration of System Components (OHS Instances) .................................................... 6
Appendix ................................................................................................................................................... 8
Common Move Plan Properties for Java Components ......................................................................... 8
Move Plan Properties for Oracle HTTP Server ...................................................................................... 9
Move Plan Properties for Node Manager ........................................................................................... 10

1
Weblogic Cloning:
In Weblogic, we have the pack/unpack utility using which we can migrate the domain configurations.

To extend the domain to multiple machines, we use the pack utility to create an archive of the domain configuration from the source
and then we use the unpack utility to copy the archive on the new machines (the targets).

Now, on Weblogic, if we have multiple domains, then we need to use pack/unpack to copy all these domains individually.

But we still need to install the Weblogic software on these targets, only after which we can use the pack/unpack utilities.

Also, on a new installation of Weblogic, we again need to make sure that the patch levels and other Weblogic configurations on the
targets are matching the source. Weblogic supports a huge stack of products and if there are multiple products installed on the
Weblogic, then we need to make sure that the patches are applied to the product home and Weblogic home on the new targets.

Oracle Weblogic also provides movement scripts using which we can clone the entire environment including the Weblogic binaries
and create an archive. This archive can then be moved to the new machines and we need not worry about matching the new targets
with the source.

Here we are creating an image of the existing MW home and deploying it to many hosts.

This process is in contrast to installing Weblogic and applying patches to Weblogic and product homes on new targets.

We can say that these movement scripts are a super set of the pack/unpack utility.

The components that can be cloned/migrated are as follows:

Middleware Home: The Weblogic Server binaries.

Java Components: The domain configuration containing the java components like the SOA, IPM, OIM etc.

System Components: The domain configuration containing the components like the Oracle HTTP server, OID etc.

Scenario:
Creating a copy of the Production instance having the Oracle SOA Suite installed and creating a Test instance on a unix system.

Pre-Requisites:
The supporting DB needs to be cloned first on the new hardware.

All required mount points and admin user must be created on the new MT’s with proper read/write permissions.

All the network configurations need to be in place like opening the ports between MT & DB including the Admin/Managed server
ports.

The targets need to have the same operating system as the source.

2
Cloning Steps:
1. Move MW Home and Binary files

2. Move the configuration of the Java Components

3. Move the Configuration of the System Components

Moving the MW Home and Binary Files (Weblogic & SOA Binaries)

1. On unix, you need not shut down the services.

2. Execute the “copyBinary” script, which copies the middleware home, the Weblogic home and the Oracle homes within the
middleware home.

The copyBinary script is located at ORACLE_COMMON_HOME/bin/copyBinary.sh

To copy the MW home that is located at /scratch/Oracle/Middleware1, execute the following command.

copyBinary.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/mw_copy.jar
-sourceMWHomeLoc /scratch/Oracle/Middleware1
-invPtrLoc /prod/fmw/product/111/ohs_111/oraInst.loc
-logDirLoc /tmp/logs

3. Copy the archive to the new host.

4. From the source, import the “pasteBinary” script and the “cloningclient.jar” file to the target and ensure that they have
execute permission.

The pasteBinary script is located in:

ORACLE_COMMON_HOME/bin/pasteBinary.sh

The cloningclient.jar file is located in:

ORACLE_COMMON_HOME/jlib/cloningclient.jar

5. Create an oraInst.loc file specifying the group whose members are given access to write the oraInventory, and where you
want to put the Oracle Inventory.

For example, the oraInst.loc file could contain the following:

inst_group=dba
inventory_loc=/<Path>/oraInventory

6. Tar the java home at the source, copy the tar file to the target and untar the java home on the target.

7. Execute the “pasteBinary.sh” to extract the MW home on the target.

pasteBinary.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/mw_copy.jar
-targetMWHomeLoc /scratch/oracle/MW_Home_test
-invPtrLoc /scratch/oracle/oraInst.loc

3
The Middleware home is extracted to /scratch/oracle/MW_Home_prod and the WebLogic Server home and all of the
Oracle homes are extracted under it with the same names as that of the source Oracle home names.

8. Run the following script as root at the end of pasteBinary operation.

ORACLE_HOME/oracleRoot.sh

9. At the target, delete the Node Manager directory and the files in it. The default location of the directory is:

WL_HOME/common/nodemanager

Moving the Configuration of the Java Components(Admin & Managed Servers)

1. At the source, make sure that the AdminServer and the managed servers are Running.

2. At the source, execute the copyConfig script.

The copyConfig script is located in:

ORACLE_COMMON_HOME/bin/copyConfig.sh

To copy the configuration of the Oracle weblogic component in the Middleware home /scratch/Oracle/Middleware1.

Use the following command:

copyConfig.sh –javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/soawls.jar
-sourceDomainLoc /<domain_home>/domain
-sourceMWHomeLoc /scratch/Oracle/Middleware1
-domainHostName host.example.com
-domainPortNum 8001
-domainAdminUserName weblogic
-domainAdminPasswordFile /tmp/admpwd.txt
-logDirLoc /tmp/logs

3. Copy the archive file to the target.

4. At the source, extract the move plan from the archive using the “extractMovePlan” script.

The script is located at

ORACLE_COMMON_HOME/bin/extractMovePlan.sh

For example:

extractMovePlan.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/soawls.jar
-planDirLoc /tmp/wlsd

5. Edit the move plan, modifying the properties to reflect the values for the target environment. See Appendix to find the list
of properties for the type of component you are moving.

6. Copy the edited move plan to the target.

7. At the source, run the following script to generate obfuscated password files required by the move plan. Run the script for
each password file.

4
ORACLE_COMMON_HOME/bin/obfuscatePassword.sh

The script prompts you to enter the password and the location where the password file is to be written.

8. At the target, extract the files from the archive using the pasteConfig script

The pasteConfig script is located in:

ORACLE_COMMON_HOME/bin/pasteConfig.sh

To apply the archive to the Middleware home /scratch/Oracle/Middleware1, use the following command:

pasteConfig.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/soawls.jar
-movePlanLoc /tmp/moveplan.xml
-targetDomainLoc /scratch/oracle/config/domains/SOA_domain1
-targetMWHomeLoc /scratch/Oracle/Middleware1/
-domainAdminPasswordFile /tmp/pwd_dir/pass.txt

9. At the source, copy the Node Manager configuration, by executing the copyConfig script.

The copyConfig script is located in:

ORACLE_COMMON_HOME/bin/copyConfig.sh

use the following command:

copyConfig.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/nm.jar
-sourceNMHomeLoc /scratch/Oracle/Middleware1/wlserver_10.3/common/nodemanager
-logDirLoc /tmp/logs

10. Copy the archive file to the new system.

11. At the source, extract the move plan from the archive, using the extractMovePlan script.

The extractMovePlan script is located in:

ORACLE_COMMON_HOME/bin/extractMovePlan.sh

For example:

extractMovePlan.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/nm.jar
-planDirLoc /tmp/nm

12. Edit the move plan, modifying the properties to reflect the values for the target environment.

13. Copy the edited move plan to the target.

14. At the target, run the following script to generate obfuscated password files required by the move plan. Run the script for
each password file.

ORACLE_COMMON_HOME/bin/obfuscatePassword.sh

The script prompts you to enter the password and the location where the password file is to be written.

15. At the target, extract the files from the archive using the pasteConfig script.

5
The pasteConfig script is located in:

ORACLE_COMMON_HOME/bin/pasteConfig.sh

use the following command:

pasteConfig -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/nm.jar
-targetNMHomeLoc /scratch/Oracle/Middleware1/wlserver_10.3/common/nodemanager
-targetMWHomeLoc /scratch/Oracle/Middleware1
-movePlanLoc /tmp/nm/moveplan.xml
-silent true

Moving the Configuration of System Components (OHS Instances)

1. At the source, execute the copyConfig script.

The copyConfig script is located in:

ORACLE_COMMON_HOME/bin/copyConfig.sh

To copy the Oracle instance located in /scratch/Oracle/Middleware1/ohs1, use the following command:

For Example:

copyConfig.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/ohs1.jar
-sourceInstanceHomeLoc /scratch/Oracle/Middleware1/ohs1

2. Copy the archive file to the new system.

3. At the source, extract the move plan from the archive, using the extractMovePlan script.

The extractMovePlan script is located in:

ORACLE_COMMON_HOME/bin/extractMovePlan.sh

For example:

extractMovePlan.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/ohs1.jar
-planDirLoc /tmp/ohs

4. Edit the move plan, modifying the properties for the particular components to reflect the values for the target environment.

5. Copy the edited move plan to the target.

6. At the target, run the following script to generate obfuscated password files required by the move plan. Run the script for
each password file.

ORACLE_COMMON_HOME/bin/obfuscatePassword.sh

The script prompts you to enter the password and the location where the password file is to be written.

6
7. At the target, extract the files from the archive using the pasteConfig script.

The pasteConfig script is located in:

ORACLE_COMMON_HOME/bin/pasteConfig.sh

To apply the archive to the Oracle instance ohs1, use the following command:

For Example:

pasteConfig.sh -javaHome /scratch/Oracle/Middleware1/jdk1.7.0_25


-archiveLoc /tmp/ohs1.jar
-movePlanLoc /tmp/ohs/moveplan.xml
-targetOracleHomeLoc /scratch/Oracle/Middleware1/Oracle_WebTier
-targetInstanceHomeLoc /scratch/Oracle/Middleware1/ohs1
-targetInstanceName ohs1
-domainHostName myhost
-domainPortNum 7001
-domainAdminUserName domain_admin_username
-domainAdminPasswordFile domain_admin_password_file

7
Appendix
Common Move Plan Properties for Java Components

Major Configuration Required: config.xml, startManagedWebLogic.sh, stopManagedWebLogic.sh, stopManagedWebLogic.sh

Property Sample Value


Startup Mode PRODUCTION
Properties in the SERVER_CONFIG configGroup:
Listen Address <new commodity hostname>
Listen Port <new admin server port>
SSL Listen Port SSL is not enabled in or case
Custom Identity Keystore File /WLS_HOME/server/lib/DemoIdentity.jks
Custom Identity Keystore Passphrase File default
Custom Trust Keystore File /WLS_HOME/server/lib/DemoIdentity.jks
Custom Trust Keystore Passphrase File default
Custom Identity Private Key Alias DemoIdentity
Custom Identity Private Key Passphrase File default
KeyStore Type jks
Properties in the CLUSTER_CONFIG configGroup:
Messaging Mode Not required in our environment
Not required in our environment
Cluster Address

Not required in our environment


Unicast Channel

Not required in our environment


Multicast Address

Not required in our environment


Multicast Port

Not required in our environment


Frontend Host

Not required in our environment


Frontend HTTP Port

Properties in the MACHINE_CONFIG configGroup:


Machine Name < new commodity Server name >
Node Manager Listen Address < new commodity Server name >
Node Manager Listen Port <new listen port of NM>

8
Move Plan Properties for Oracle HTTP Server

Major Configuration Required: httpd.conf,opmn.xml,ssl.conf, mod_wl_ohs.conf, ports.prop,tnsnames.ora,admin.conf

Property Sample Value


Listen <Listen port of the OHS> (httpd.conf)

User <dba user> (httpd.conf)

Group <dba group> (httpd.conf)


ServerAdmin NA
ServerName
<new commodity server> (httpd.conf)
WebLogicHost <new commodity server> (mod_wl_ohs.conf)
WebLogicPort <Weblogic admin port> (mod_wl_ohs.conf)
WebLogicCluster NA
VirtualHost
<new commodity server> (httpd.conf,ssl.conf)
SSLWallet Default Path (ssl.conf,admin.conf)

DocumentRoot Default Path (httpd.conf)


Alias values will be same as source system (httpd.conf) Alias /icons/
Alias
"${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/icons/"
"${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/icons/"
(httpd.conf) ScriptAlias /cgi-bin/ Alias /icons/
ScriptAlias "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/icons/"
"${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/cgi-bin/"

9
Move Plan Properties for Node Manager

Major Configuration Required: nodemanager.properties

Property Sample Value


Properties in the NODE_MANAGER_PROPERTIES configGroup:
Listen Address <new commodity hostname>

Listen Port <nm port>

Custom Identity KeyStore File Default

Custom Identity Private Key Alias Default

Default

Custom Identity Private Key Passphrase File

Properties in the DOMAINS configGroup:


Domain Name <Domain Name>

Domain Location /test/admin/user_projects/domains/ohsdomain

AdminServer Listen Address <new commodity hostname>

AdminServer Listen Port <new wls admin port>

AdminServer User Name <Weblogic user at source>

AdminServer Password <Weblogic user password at source>

Node Manager User Name <nm username at source>

Node Manager Password <nm password at source>

10

You might also like