A Cleaning Up an Environment Before Rerunning IAM Deployment

When you deploy Oracle Identity and Access Management using the runIAMDeployment.sh command, you must complete each stage in the topology before beginning the next stage. If a stage fails, you must clean up and start over. This chapter explains how to perform the Cleanup and Recory task.

This section contains the following topics:

A.1 About the Cleanup and Restore Feature

If the deployment fails, note the name of teh phase where the failure occurred, and then check the logs to determine a cause.

When you are ready to cleanup and attempt another deployment, do one of the following:

  • If the deployment failed in the Preconfigure or Install phases, then use Cleanup and Restore to cleanup the environment so you can start the deployment again from the beginning.

  • If deployment fails between the Preconfigure stage and the Validate stage, then use the Cleanup and Restore feature to clean up the environment and restore it back to the post-install stage.

For example, if the deployment fails during the postconfigure stage, you can use Cleanup and Restore to clean up any changes made since you successfully completed the install stage.

Cleanup and Restore can be performed using either the command line deployment tool or the Deployment wizard.

A.1.1 Directories Affected by Cleanup and Restore

When you use Cleanup and Restore, it removes the following directories from the Lifecycle Management Store Location (LCM_STORE) directory:

  • lcmconfig

  • provisioning

  • internal

  • keystores

In addition, the feature removes all content from the shared configuration (IDMTOP/config) directory, except the provisioning directory. The provisioning directory is required by the Cleanup and Restore feature.

A.1.2 Where Does Cleanup and Restore Save Its Data?

When you successfully completed the install stage, a backup file restore.zip is created inside the IDMLCM_HOME directory. Cleanup and Restore uses this file to restore the deleted directories during the Restore operation.

A.1.3 About Managing Schemas When You Use Cleanup and Restore

If you created the required schemas in the database using the Automated Installer, then Cleanup and Restore automatically drops and recreates the product schemas.

If you created the schemas manually with the Repository Creation Utility (RCU), then you must use RCU to drop and recreate the schemas manually.

Additionally, if you created the schemas manually and you are deploying the integrated OIM, OAM, and OMSS topology, then you must run RCU twice to drop the schemas you created for the OIM domain and then a second time to drop the schemas you created for the OAM domain.

A.1.4 Performing Cleanup and Restore Using the Command Line Deployment Tool

This section provides information about performing Cleanup and Restore using the command line deployment tool.

If the failure occurred in the Preconfigure or Install phase, then run the Cleanup and Restore command line once to cleanup the envirnoment, so you attempt the deployment again from the beginning.

If the failure occurred in after the Install phase, then you must execute two commands, first the Cleanup command, and then the Restore command. The Restore command will restore the environment to its post-install phase state.

A.1.4.1 Using the Command Line to Clean Up a Failed Deployment

The command syntax for performing cleanup is as follows:

IDMLCM_HOME/runIAMDeployment.sh -responseFile response_file_name -target cleanup-failed_phase_name

In this example:

  • Replace IDMLCM_HOME with the full path the LCM Tool Oracle home, which was created when you installed the LCM Tools.

    For more information, see Section 2.5, "About the Deployment Repository and LCM Tools Directory Structure".

  • Replace response_file with the complete path to the location of the deployment response file.

    You specified the response file name and directory on the Summary screen when you ran the wizard to create the deployment response file.

  • Replace failed_phase_name with the name of the phase that failed in the previous deployment session.

Use the following examples as a guide when cleaning up the environment with Cleanup and Restore:

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target cleanup-preconfigure

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target cleanup-configure

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target cleanup-configure-secondary

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target cleanup-postconfigure

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target cleanup-startup

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target cleanup-validate

A.1.4.2 Using the Command Line to Restore the Install Phase Content

The command syntax for performing a restore is as follows:

IDMLCM_HOME/runIAMDeployment.sh -responseFile response_file_name -target restore-failed-phase_name

In this example:

  • Replace IDMLCM_HOME with the full path the LCM Tool Oracle home, which was created when you installed the LCM Tools.

    For more information, see Section 2.5, "About the Deployment Repository and LCM Tools Directory Structure".

  • Replace response_file with the complete path to the location of the deployment response file.

    You specified the response file name and directory on the Summary screen when you ran the wizard to create the deployment response file.

  • Replace failed-phase_name with the name of the phase that failed in the previous deployment session.

Use the following examples as a guide when restoring the environment with Cleanup and Restore:

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target restore-preconfigure

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target restore-configure

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target restore-configure-secondary

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target restore-postconfigure

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target restore-startup

runIAMDeployment.sh -responseFile IDMLCM_HOME/provisioning/bin/provisioning.rsp -target restore-validate

A.1.5 Performing Cleanup and Restore Using the Identity and Access Management Deployment Wizard

When using the Identity and Access Management Deployment wizard, the Cleanup and Restore button becomes available whenever any of the provisioning phase fails.

To perform Cleanup and Restore using the Identity and Access Management Deployment wizard:

  1. Click Cleanup and Restore.

    Cleanup and Restore dialog window that displays the current progress of cleanup and restore process appears.

  2. After Cleanup and Restore is performed successfully, read the message on the pop up dialog and close the Cleanup and Restore window by clicking OK.

A.2 Manual Cleanup of Environment

If cleanup and restore operation fails for any reason, or if you want to clean up a deployed environment manually before starting another cycle of deployment, proceed as follows:

  1. On your host, stop all Identity and Access Management processes, services and servers.

    If you have successfully completed the Preconfigure and Configure deployment phases, then you can use the start and stop scripts provided by the LCM Tools. For more information, see Section 6.2, "Starting and Stopping Oracle Identity and Access Management Components After an Automated Deployment".

    If you have not successfully completed the Preconfigure and Configure deployment phases, then one way to ensure all processes and servers are stopped is to reboot the host computer.

  2. On your host, remove the contents of the shared configuration directory (for example, IDMTOP/config).

  3. Remove the contents of the directories LCM_STORE and IDMTOP.

    LCM_STORE is the Lifecycle Management Store Location directory and IDMTOP is the Software Installation Location directory you specified on the Select Installation and Configuration Locations screen.

    For more information, see Section 2.5, "About the Deployment Repository and LCM Tools Directory Structure".

  4. Drop the database schema using RCU.

    If you are using Oracle Internet Diretory (OID), then ensure that you select the ODS schema, which is not selected by default. Oracle Identity and Access Management deployment will fail during the next run if you don't perform this step correctly.

After you have performed these steps, you can attempt another deployment using the LCM Tools.