28 Moving From a Test to a Production Environment

This chapter describes how to move, or clone, an Oracle Unified Directory installation between environments, specifically, between a test environment and a production environment. Moving between environments enables you to develop and test applications in a test environment, and then roll out the test applications and, optionally, test data to your production environment. In the remainder of this chapter, the test environment is referred to as the source environment and the production environment as the target environment.

This chapter includes the following topics:

Note that the Oracle Unified Directory "test to production" plug-in offers a subset of the functionality that is provided by the Oracle Fusion Middleware "test to production" framework. The documentation in this chapter is specific to Oracle Unified Directory. For a comprehensive description of moving other Fusion Middleware components between environments, see "Moving from a Test to a Production Environment" section in the Oracle Fusion Middleware Administrator's Guide.

28.1 Introduction to Moving Across Environments

Moving an Oracle Unified Directory installation minimizes the amount of work that would otherwise be required to reapply all the customization and configuration changes made in one environment to another. You can install, configure, customize, and validate Oracle Unified Directory in a test environment. Once the system is stable and performs as required, you can create the production environment by moving a copy of the server and its configuration from the test environment, instead of redoing all the changes that were incorporated into the test environment.If you have an existing production environment, you can move any modifications of the test environment, such as customization, to the production environment.

Moving an Oracle Unified Directory installation from a test to a production environment assumes that the production environment is on the same operating system as the test environment. In addition, the operating system architecture must be the same in both environments. For example, both environment must be running 32-bit operating systems or 64-bit operating systems.

28.2 Limitations in Moving From Test to Production

Moving an Oracle Unified Directory installation between environments is supported with the following restrictions:

  • Moving from a test to a production environment is supported for directory server instances only. You cannot move a proxy server instance or a replication gateway server instance between environments.

  • You cannot move a replicated topology. To move an entire replicated topology, you must first move each server instance in the topology, then configure replication manually between the server instances. If you move a server that is part of a replicated topology, the replication configuration is removed from the configuration in the destination environment.

  • Security data is not moved during the test to production process. This includes the following elements:

    • the SSL configuration (keystore, truststore, and other security configuration located in the config directory by default)

    • the SNMP V3 security file (located in the config/snmp directory by default)

28.3 Overview of the Test to Production Process

The move from a test to a production environment involves three broad steps:

  1. Moving the Oracle Unified Directory binaries to the production system.

  2. Moving the Oracle Unified Directory configuration to the production system.

  3. Moving the data to the production system.

These procedures assume that you are moving an Oracle Unified Directory test system to a new production deployment (and do not have an existing production system).

28.3.1 Moving the Binaries

To obtain a copy of the Oracle Unified Directory binaries on the new production system, install the binaries as described in "Installing Oracle Unified Directory" in the Installation Guide for Oracle Unified Directory.

28.3.2 Moving the Configuration

Moving the configuration between environments, involves three steps:

  1. Copying the configuration from the source environment.

  2. Editing the configuration, if required.

  3. Pasting the configuration in the target environment.

28.3.2.1 Copying the Configuration

To obtain a copy of an existing configuration, run the oudCopyConfig command in the source environment.

On UNIX systems, run the command as follows:

$ OUD_ORACLE_HOME/bin/oudCopyConfig -javaHome java_home \
  -sourceInstanceHomeLoc instance_dir -archiveLoc archive_location \
  -logDirLoc log_directory

For example:

$ OUD_ORACLE_HOME/bin/oudCopyConfig -javaHome /usr/jdk \
  -sourceInstanceHomeLoc /local/asinst_1 -archiveLoc /tmp/oud.jar \
  -logDirLoc /tmp/logs

On Windows systems, run the command as follows:

$ OUD_ORACLE_HOME\bat\oudCopyConfig.bat -javaHome java_home \
  -sourceInstanceHomeLoc instance_dir -archiveLoc archive_location \
  -logDirLoc log_directory

For a complete synopsis of the oudCopyConfig command, see Section A.2.9, "oudCopyConfig".

The oudCopyConfig command performs the following actions:

  • creates an archive (archive_location) that contains the required configuration data to move the test instance (instance_dir) to a production environment. -archiveLoc specifies the full path to the archive.

  • creates a move plan in the archive.

  • logs any messages to log_directory. If not specified, the default location of logged messages is the system temporary directory.

28.3.2.2 Editing the Configuration

You can modify certain configuration parameters by editing the move plan. A move plan is an XML file that exposes customizable parameters during the move across environments.

The move plan is generated when you run the oudCopyConfig command and is used by the oudPasteConfig command to duplicate the configuration.

After you have copied the configuration, edit the configuration as follows:

  1. Run the oudExtractMovePlan command to obtain a copy of the configuration. On UNIX systems, run the command as follows:

    $ OUD_ORACLE_HOME/bin/oudExtractMovePlan -javaHome java_home \
      -archiveLoc archive_location -planDirLoc moveplan_dir \
      -logDirLoc log_directory
    

    For example:

    $ OUD_ORACLE_HOME/bin/ExtractMovePlan -javaHome /usr/jdk \
      -archiveLoc /tmp/oud.jar -planDirLoc /tmp \
      -logDirLoc /tmp/logs
    

    On Windows systems, run the command as follows:

    $ OUD_ORACLE_HOME\bat\oudExtractMovePlan.bat -javaHome java_home \
      -archiveLoc archive_location -planDirLoc moveplan_dir \
      -logDirLoc log_directory
    

    For a complete synopsis of the oudextractMovePlan command, see Section A.2.10, "oudExtractMovePlan".

    The oudExtractMovePlan command creates an editable version of the configuration in a file named moveplan.xml, in the location specified by the -planDirLoc argument. This directory must exist, and be writable.

  2. In a text editor, edit the moveplan.xml file, as required.

    The following parameters can be configured in the move plan:

    • OUD non SSL port

    • OUD SSL port

    • OUD admin connector port

    • SNMP listen port

    • SNMP trap port

    • JMX port

    • OUD root user password file

    • SMTP server and port

    • Absolute paths to files or directories, including the following:

      • Backup directory

      • Database directory

      • Profile directory

      • Dictionary file

      • Referential integrity plug-in log file

      • SMTP account status notification handler message template file

  3. Save the moveplan.xml file.

28.3.2.3 Pasting the Configuration

When you have edited the move plan, paste the configuration into the target environment as follows:

  1. Move the archive and move plan to the target host.

    In most scenarios, the test environment and the production environment are on separate machines. You must therefore move or copy the archive and move plan to the target machine.

    If your test and production environments are on the same machine, this step is unnecessary.

  2. Paste the configuration in the target environment, by running the oudPasteConfig command on the target environment.

    On UNIX systems, run the command as follows:

    $ OUD_ORACLE_HOME/bin/oudPasteConfig -javaHome java_home \
      -targetInstanceHomeLoc instance_dir -archiveLoc archive_location \
      -targetOracleHomeLoc ORACLE_HOME -movePlanLoc move_plan_location \
      -logDirLoc log_directory -targetInstanceName instance_name
    

    For example:

    $ OUD_ORACLE_HOME/bin/oudPasteConfig -javaHome /usr/jdk \
      -targetInstanceHomeLoc /local/asinst_2 -archiveLoc /tmp/oud.jar \
      -targetOracleHomeLoc /local/ORACLE_HOME -movePlanLoc /tmp/moveplan.xml \
      -logDirLoc /tmp/logs -targetInstanceName asinst_2 
    

    On Windows systems, run the command as follows:

    $ OUD_ORACLE_HOME\bat\oudPasteConfig.bat -javaHome java_home \
      -targetInstanceHomeLoc instance_dir -archiveLoc archive_location \
      -targetOracleHomeLoc ORACLE_HOME -movePlanLoc move_plan_location \
      -logDirLoc log_directory -targetInstanceName instance_name
    

For a complete synopsis of the oudPasteConfig command, see Section A.2.11, "oudPasteConfig".

The oudPasteConfig command creates a new server instance with the configuration obtained from the archive and the amended move plan, if any.

28.3.3 Moving the Data

The simplest way to move data from a test system to a production is to export the data from the test system, and import it to the production system.

For information about how to do this, see Section 17.1, "Importing and Exporting Data".