Friday 11 October 2013

2.Cloning Process



While cloning an entity of Oracle Fusion Middleware, the cloning process takes a
        snapshot of the information required for cloning.

2.1   Cloning a Middleware Home

      
       While cloning a Middleware home, we create an archive of the source Middleware home        and use the archive to create the cloned Middleware home.

      Cloning uses the following jar file to execute the scripts necessary to clone binary and
      configuration files:
  • (UNIX) ORACLE_COMMON_HOME/jlib/cloningclient.jar
    • ORACLE_COMMON_HOME = {MIDDLEWARE_HOME}/oracle_common
    • MIDDLEWARE_HOME  : Top level directory containing all fusion middleware oracle homes. For example, if SOA_HOME is /u01/Oracle/Middleware/Oracle_SOA1 , then Middleware Home would become = /u01/Oracle/Middleware

       At Source Host:
            Run the copy Binary script, specifying the Middleware home to clone. The script
            prepares the source for cloning and creates an archive. It also records the file
            permissions of the Middleware home and the Oracle homes within the Middleware
            home.
·         The archive contains all of the Oracle homes and Oracle WebLogic Server home in the Middleware home.
·         At the source, make sure that the Administration Server and all Managed Servers are stopped.

Usage/Syntax:
            {ORACLE_COMMON_HOME} /bin/copyBinary.sh
-javaHome path_of_jdk
-archiveLoc archive_location
-sourceMWHomeLoc MW_HOME  
[-invPtrLoc Oracle_InventoryLocation]
[-logDirLoc log_dir_path]
[-silent {true | false}]
[-ignoreDiskWarning {true | false}]

Table 5-1 describes the options for the copyBinary script.



Note:
·         Before executing the copyBinary script, ensure that all Oracle homes in the Middleware home are either 32 bit or 64 bit. The operation does not support a mix of 32-bit and 64-bit Oracle homes.
·         When executing the command, one must specify a matching Java home. That is, if the Oracle homes are 64 bit, you must specify a 64-bit Java home. If the Oracle homes are 32 bit , then one must specify a 32-bit Java home.

       At Destination Host:

            At the destination, run the pasteBinary script, specifying a destination for the
            Middleware home. The script checks to see that the prerequisites are met at the
            destination. It extracts the files from the archive file, registers the Oracle homes with
            the Oracle inventory and registers WebLogic Server home with the Middleware
            home.
·         The clone program then restores the file permissions and relinks any files if that are necessary.

Usage/Syntax:
            {ORACLE_COMMON_HOME} /bin/ pasteBinary.sh
                   -javaHome path_of_jdk
                   -archiveLoc archive_location
                   -targetMWHomeLoc target_MW_Home_location
                    [-executeSysPrereqs {true | false}]
                    [-invPtrLoc Oracle_InventoryLocation]
                    [-logDirLoc log_dir_path]
                    [-silent {true | false}]
                    [-ignoreDiskWarning {true | false}]

Table 5-2 describes the options for the pasteBinary script.

2.2   Cloning Components


            One can create an archive of the source component's configuration and use the
            archive to create the cloned component. For Java components / system components,
            one can use the copyConfig, extractMovePlan, and pasteConfig scripts to clone
            the configuration,domain,Admin & Managed Servers and Oracle instances etc.

            Note:
            When one clone a component, the scripts replicate the topology of the source. For
            example, if the source domain contains Managed Servers server_1 and server_2 on
            Host A and Managed Servers server_3 and server_4 on Host B, then one must specify
            a similar relationship between Managed Servers and hosts at the target.

            Steps for cloning components:
·         Clone the Middleware home, as described in Section 3.1
·         At the source, make sure that the Administration Server and all Managed Servers are started.
·         At the source, run the copyConfig script, specifying the source component that needs to be cloned. The script creates a configuration archive file that contains a snapshot of the configuration of an Oracle WebLogic Server domain or system component instance.
·         Now, extract the move plan from the source using the extractMovePlan script. A move plan contains configuration settings of the source environment.
·         Edit the move plan (extracted in above step), specifying properties for the target environment.
·         At the target, run the pasteConfig script, specifying the destination for the component and the move plan. The script ,
o   Checks the prerequisites are met at the target.
o   Extracts the files from the archive file and uses the information in the move plan to modify the configuration on the target.
o   Restores the file permissions.
·         Additionally, the pasteConfig scripts starts the Administration Server.
           

Copy Config Script for Java Components

            Creates a configuration archive that contains the snapshot of the configuration of an
            Oracle WebLogic Server domain. The underlying components of an Oracle
            WebLogic Server domain persist their configuration information in different data
            stores, such as a file system, Oracle Metadata Service (MDS), LDAP, or a database.

Usage/Syntax:
            {ORACLE_COMMON_HOME} /bin/ copyConfig.sh
-javaHome path_of_jdk
-archiveLoc archive_location
-sourceDomainLoc domain_location
-sourceMWHomeLoc Middleware_home_location
-domainHostName domain_host_name
-domainPortNum  domain_port_number
 -domainAdminUserName domain_admin_username
 -domainAdminPassword domain_admin_password_file
  [-mdsDataImport {true | false}]
  [-logDirLoc log_dir_path]
  [-silent {true | false}]

Table 5-3 describes the options for the copyConfig script.

Copy Config Script for System Components

            Creates a configuration archive that contains the snapshot of the configuration of an
            Oracle instance. The underlying components of the Oracle instance, such as Oracle
            HTTP Server or Oracle Internet Directory, persist their configuration information in
            different data stores, such as a file system, Oracle Metadata Service (MDS), LDAP,
            or a database.

            One must run the copyConfig script for Oracle instance in the source environment. A
            configuration archive is created for each Oracle instance.

Usage/Syntax:
            {ORACLE_COMMON_HOME} /bin/ copyConfig.sh
 -javaHome path_of_jdk
 -archiveLoc archive_location
 -sourceInstanceHomeLoc src_instance_path
 -sourceComponentName src_component_name
 [-logDirLoc log_dir_path]
 [-silent {true | false}]

Table 5-4 describes the options for the copyConfig script.

Extract MovePlan Script

            Extracts configuration information from the archive into a move plan. It also extracts
            any needed configuration plans. Then, one may edit the move plan, specifying
            properties for the target environment.

Usage/Syntax:
            extractMovePlan -javaHome path_of_jdk
                -archiveLoc archive_location
                -planDirLoc move_plan_directory
                 [-logDirLoc log_dir_path]

            The extractMovePlan script extracts the move plan to the specified directory.
            Depending on the type of component that you are cloning, the extractMovePlan script      may also extract other configuration plans.

Table 6-5 describes the options for the extractMove plan

 

 

 

Paste Config Script for Java Components

            Applies the copied configurations from the source environment to the target
            environment. Inputs for the script include the location of the configuration archive
            created with the copyConfig script for the Oracle WebLogic Server domain and the
            modified move plan. The pasteConfig script recreates the configuration information
            for the Oracle WebLogic Server domain in the target environment. It also merges the
            move plan property values for the target environment.

Usage/Syntax:

            pasteConfig  -javaHome path_of_jdk
                        -archiveLoc archive_location
                        -targetDomainLoc trgt_domain_path
                        -targetMWHomeLoc trgt_Middleware_Home_path
                        -movePlanLoc move_plan_path
                         -domainAdminPassword domain_admin_password_file
                        [-appDir WLS_application_directory]
                        [-logDirLoc log_dir_path]
                        [-silent {true | false}]

            Table 5-6 describes the options for the pasteConfig script for Java components.

Paste Config Script for System Components

            Applies the copied configurations from the source environment into target
            environment. Inputs for the script include the location of the configuration archive
            created with the copyConfig script for the Oracle instance and the modified move
            plan. The pasteConfig script iterates and recreates the configuration information for
            the Oracle instance in the target environment. It also merges the move plan property
            values for the target environment.

Usage/Syntax:

            pasteConfig  -javaHome path_of_jdk
             -archiveLoc archive_location
             -movePlanLoc move_plan_path
             -targetComponentName trgt_component_name
             -targetInstanceHomeLoc trgt_Instance_path
             [-targetInstanceName trgt_Instance_name]
             [-targetOracleHomeLoc trgt_ORACLE_HOME_path]
             [-logDirLoc log_dir_path]
             [-silent {true | false}]
             [ <Domain Detail> ]


            <Domain Detail> =
                                                -domainHostName domain_host_name
                                                -domainPortNum  domain_port_number
                                                -domainAdminUserName domain_admin_username
                                                -domainAdminPassword domain_admin_password_file

            The following example shows how to apply the clone to the Oracle instance im_2 and
            to name the cloned Oracle Virtual Directory instance ovd_cl:

            pasteConfig.sh -javaHome /scratch/Oracle/Middleware/jrockit_160_20_D1.1.0-18
            -archiveLoc /tmp/ovd1.jar
            -movePlanLoc /scratch/oracle/ovd/move_plan.xml
            -targetOracleHomeLoc /scratch/Oracle/Middleware/Oracle_IM2
            -targetInstanceHomeLoc /scratch/Oracle/Middleware/im_2
            -targetInstanceName im_2
            -targetComponentName ovd_cl
            -domainHostName myhost
            -domainPortNum 7001
            -domainAdminUserName domain_admin_username
            -domainAdminPassword domain_admin_password_file

            Table 5-7 describes the options for the pasteConfig script for System components.


 


No comments:

Post a Comment