Skip Headers
Oracle® Enterprise Manager Administrator's Guide for Software and Server Provisioning and Patching
10g Release 5 (10.2.0.5.0)

Part Number E14500-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

23 Customizing Deployment Procedures

The Deployment Procedures offered by Enterprise Manager Grid Control are default procedures that have been created considering all the best practices in the industry. The steps embedded within a Deployment Procedure ensure that they meet all your provisioning and patching requirements. You can, of course, use them with the default settings to provision or patch your targets in the environment, however, you also have the choice of customizing them to include additional custom steps, disable unwanted steps, and use authentication tools to run some steps as another user.

By customizing Deployment Procedures, you can also implement different error handling methods. For example, in a patching operation where multiple hosts are patched in parallel, it may be wise to skip the host on which a failure occurs. However, failure on a device creation could render the remaining provisioning operation ineffective. Therefore, it may be necessary to abort the entire procedure for failure of such a step.

This chapter helps you understand how you can customize Deployment Procedures to make them suit your needs. In particular, this chapter covers the following:

Understanding Customization Types

The following describes the types of customization you can perform with Deployment Procedures:

Type 1 Type 2
Editing Default Deployment Procedures

You can edit an existing, default Deployment Procedure that is offered by Enterprise Manager Grid Control.

You can perform the following tasks:

  • Add your own phases and steps

  • Enable and disable phases and steps

  • Delete phases and steps

  • Change privilege levels

  • Change error handling modes

  • Enable e-mail notifications

Creating Custom Deployment Procedures

You can create your own custom Deployment Procedure with new steps, phases, privilege levels, and so on. However, note that you can create custom Deployment Procedures only using Patching Deployment Procedures.

You can perform the following tasks:

  • Delete all default phases and steps

  • Add your own phases and steps

  • Enable and disable phases and steps

  • Change privilege levels

  • Change error handling modes

  • Enable e-mail notifications


The following shows the different sections that need to be edited while customizing a Deployment Procedure to add or delete steps, enable or disable steps, enable e-mail notifications, and enable other privilege-level settings.

Customization Overview

Understanding the Limitations

Before you start customizing the Deployment Procedures, keep in mind the following points:

Creating Copy of Deployment Procedure

The first step towards customizing a Deployment Procedure is to create a copy of the default Deployment Procedure that is offered by Enterprise Manager Grid Control. Note that only a copy can be edited and customized with your changes; the default Deployment Procedures must always and will always remain unchanged.

To create a copy of a default Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, edit the procedure to customize it according to your needs, and click Save.

Adding Phases or Steps

You can add additional phases or steps to a Deployment Procedure to run additional custom scripts, host commands, or jobs. For more information about phases and steps, see Understanding Phases and Steps.

This section explains how you can add different types of phases or steps to a Deployment Procedure. In particular, it covers the following:

Adding Rolling or Parallel Phase

To add a rolling phase to a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select the phase before or after which you want to add a new phase, and click Insert.

  5. In the Create wizard, do the following:

    1. On the Create page, specify general information about the phase as described in Table 23-1.

    2. On the Select Target List page, select a target list to indicate the type of targets on which the new phase should run.

    3. On the Review page, review the information you have provided for creating a new phase, and click Finish.

Table 23-1 Field Description - Adding Rolling Phase

Field Name Description

Select

Select Phase.

Name

Specify a name for the custom phase.

Description

Provide a description for the custom phase.

Condition

Leave this field blank.

Insert Location

If you want to insert the custom phase after the phase or step you selected, then select After <phase or step name>. Otherwise, select Before <phase or step>.

Type

If you are adding a rolling phase, then select Rolling. If you are adding a parallel phase, then select Parallel.

Error Handling

Select the error handling mode you want to set for the custom phase. To understand these error handling modes, see Changing Error Handling Modes.


Adding Job Step

To add a job step to a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.

  5. In the Create wizard, do the following:

    1. On the Create page, specify general information about the step as described in Table 23-2.

    2. On the Select Type page, select a job type that best describes the task that you want the step to perform. For example, if you want to job to transfer files across the network, then select File Transfer.

    3. On the Map Properties page, specify values for the parameters that are required by the selected job type.

    4. On the Review page, review the information you have provided for creating a new step, and click Finish.

Adding Directive Step

To add a directive step to a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.

  5. In the Create wizard, do the following:

    1. On the Create page, specify general information about the step as described in Table 23-2.

    2. On the Select Directive page, select a directive from the Software Library that you want to run on the targets.

    3. On the Map Properties page, specify values for the properties associated with the selected directive.

    4. On the Review page, review the information you have provided for creating a new step, and click Finish.

Adding Generic Component Step

To add a generic component step to a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.

  5. In the Create wizard, do the following:

    1. On the Create page, specify general information about the step as described in Table 23-2.

    2. On the Select Component page, select a component from the Software Library that you want to stage on the targets.

    3. On the Select Directive page, select a directive from the Software Library that you want to run on the targets.

    4. On the Map Properties page, specify values for the properties associated with the selected component and directive.

    5. On the Review page, review the information you have provided for creating a new step, and click Finish.

Adding Registered Component Step

To add a registered component step to a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.

  5. In the Create wizard, do the following:

    1. On the Create page, specify general information about the step as described in Table 23-2.

    2. On the Select Type page, select a component type.

      The list is a subset of the component types displayed on the Components page in the Provisioning tab. Each type in the list has a specific job associated with it. These jobs stage and install the components.

    3. On the Select Component page, select a component from the Software Library that you want to stage on the targets.

    4. On the Map Properties page, specify values for the parameters that are required by the job associated with the selected component.

    5. On the Review page, review the information you have provided for creating a new step, and click Finish.

Adding Host Command Step

To add a host command step to a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.

  5. In the Create wizard, do the following:

    1. On the Create page, specify general information about the step as described in Table 23-2.

    2. On the Enter Command page, specify the command or script, which you want to run on the target, and the privilege to run it.

      To run the host command as a script, select Script from the Command Type list. Specify the shell that can interpret the script. The script is passed as standard input to the specified interpreter.

      To run the host command as a command line, select Single Operation from the Command Type list. Specify the text you want to execute used as a command line. No assumptions are made about the shell to interpret this command line. The first entry in the command line is assumed to be the process to spawn and the rest of the command line as passed as arguments to this process. Therefore, a command line of ls -a /tmp spawns a process of "ls" (from the current path; also depends on the Oracle Management Agent) and passes "-a" as the first argument and then "/tmp" as the second argument to this process.

      Note: The command line mode assumes that the first part of the command line is the process to be spawned. Therefore, shell internals and the commands that rely on the PATH environment variable for resolution are not recognized. If any such commands need to be used, then you need to prepend the shell that interprets the command line.

      For example, the command cd /tmp && rm -rf x expands to "cd" as a process and then "/tmp, &&, rm, -rf, x" as arguments. To fix this, change the command line to /bin/csh -c "cd /tmp && rm -rf x".

      Another example, the command export PATH=/opt:${PATH}; myopt -install expands to "export" as a process and then "PATH=/opt:${PATH};, myopt, -install" as arguments. To fix this, use /bin/sh -c "export PATH=/opt:${PATH}; myopt -install".

    3. On the Map Properties page, specify values for the parameters that are required by the job associated with the selected component.c

    4. On the Review page, review the information you have provided for creating a new step, and click Finish.

Adding Manual Step

To add a manual step to a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select the step before or after which you want to add a new step, and click Insert.

  5. In the Create wizard, do the following:

    1. On the Create page, specify general information about the step as described in Table 23-2.

    2. On the Enter Instructions page, provide a message to inform the operator about a manual step. For example, if want to instruct the operator to log in to a system and update the kernel parameter, then specify the following:

      You have been logged out of the system. Log in and update the Kernel parameters. 
      
    3. On the Review page, review the information you have provided for creating a new step, and click Finish.

Table 23-2 Field Description - Adding Steps

Field Name Description

Select

Select Step.

Name

Specify a name for the custom step.

Description

Provide a description for the custom step.

Condition

Leave this field blank.

Insert Location

If you want to insert the custom step after the step you selected, then select After <step name>. Otherwise, select Before <step>.

Type

  • For a job step, select Job.

  • For a directive step, select Library: Directive.

  • For a generic component, select Library: Generic Component.

  • For a registered component, select Library: Registered Component.

  • For a manual step, select Manual.

  • For a host command step, select Host Command.

Error Handling

Select the error handling mode you want to set for the custom step. To understand these error handling modes, see Changing Error Handling Modes.


Deleting Phases or Steps

You can delete the phases or steps that you do not want in a Deployment Procedure. For more information about phases and steps, see Understanding Phases and Steps.

To delete phases or steps in a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select the step or phase you want to delete, and click Delete.

    Oracle recommends that you disable the steps or phases instead of deleting them because steps or phases once deleted cannot be retrieved, but steps or phases disabled can always be enabled later. For information about enabling and disabling steps or phases, see Enabling or Disabling Phases or Steps.

Enabling or Disabling Phases or Steps

If you do not want to have some phases or steps in a Deployment Procedure, you can always disable them instead of deleting them. This is a preferred option because phases or steps once deleted cannot be retrieved, but phases or steps disabled can always be enabled later. For more information about phases and steps, see Understanding Phases and Steps.

To enable or disable phases or steps in a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, do the following:

    1. To disable a phase or step, select the phase or step you want to disable, and click Disable.

    2. To enable a phase or step, select the phase or step you want to enable, and click Enable.

The following is an example that illustrates how you customize the Oracle Database Provisioning Deployment Procedure to enable the Prepare Create Directory step:

Example of Enabling Steps

Customizing Steps to Run as Another User

All the Deployment Procedures offered by Enterprise Manager Grid Control require administrator privileges to run. While most steps within a Deployment Procedure can be run as a normal user, there are some steps that require special permissions and privileges, and unless you provide the administrator's credentials, you cannot proceed with the deployment. For more information about steps, see Understanding Phases and Steps.

Under such circumstances, you can do one of the following. Although the former option is recommended, you are always free to use the latter option to suit your needs.

This section explains the how Privilege Delegation scores over other two utilities, and describes how you can customize the steps within a Deployment Procedure to run them as another user.

In particular, this section covers:

Choosing Privilege Delegation Over SUDO and PowerBroker

While SUDO and PowerBroker are third-party utilities supported in Enterprise Manager Grid Control, Privilege Delegation is proprietary to Oracle. Privilege Delegation is a framework that allows you to use either SUDO or PowerBroker to perform an activity with the privileges of another user. Privilege Delegation can use either SUDO or PowerBroker, but not both, and the settings are only for a single host. Therefore, if a host is set up with pbrun, then it will use only pbrun.

The support for SUDO and PowerBroker is offered in Enterprise Manager 10g Grid Control Release 4 (10.2.0.4) or lower, but the support for Privilege Delegation is offered only in Enterprise Manager 10g Grid Control Release 5 (10.2.0.5) or higher.

Note:

The supported version of SUDO is 1.6.9.5 P5, and the supported version of PBRUN is 4.0.8.

You can use any of these authentication utilities to run the deployment procedure. However, some limitations involved in using SUDO and PowerBroker are:

  • While SUDO is supported in a password-protected mode, PowerBroker is not. Therefore, every time you use PowerBroker, you will have to run them without a password.

  • You have to configure SUDO and PowerBroker settings every time you edit a deployment procedure. You cannot create a standard template with these settings that can be reused wherever required.

  • You can use SUDO and PowerBroker settings only for deployment procedures, and not for jobs that can be run for performing critical tasks on hosts.

Privilege Delegation, a framework that combines SUDO and PowerBroker, offers the same functionality with the following advantages:

  • You have the flexibility to use either SUDO or PowerBroker within the same framework.

  • Using the framework, you can now run PowerBroker in a password-protected mode. This offers more security.

  • You can create a template with these Privilege Delegation settings and reuse it for multiple hosts. This not only allows you to standardize Privilege Delegation setting across your enterprise, but also facilitates the process of configuring Privilege Delegation Settings. It simplifies the Privilege Delegation setting management as well.

  • You can use the Privilege Delegation settings not only for deployment procedures, but also for jobs in Enterprise Manager Grid Control.

Updating SUDOERS File with a List of Commands

If you want to use SUDO authentication utility, then before editing a Deployment Procedure, update the /etc/sudoers file to allow a normal user to switch to another user who has the privileges to run the Deployment Procedure. Also, if you want to restrict the normal user to have SUDO access only to certain commands, then specify a list of those commands for which SUDO access is required.

The following provides a list of commands for which SUDO access is required for different Deployment Procedures:

Table 23-3 Updating SUDOERS File with a List of Commands

Deployment Procedure Name Commands Requiring SUDO Access
  • Oracle Clusterware / RAC Provisioning For UNIX

  • Oracle Clusterware / RAC Provisioning For Windows

  • One Click Extend Cluster Database

  • Delete/Scale down Oracle Real Application Clusters

/bin/sh, $ENV{EMDROOT}/perl/bin/perl, $ENV{EMDROOT}/bin/nmupm, $ENV{EMDROOT}/bin/nmhs, /bin/pwd, /usr/bin/tee, /bin/echo, /bin/cut,/sbin/ifconfig, /usr/bin/tr, /bin/awk,/bin/rpm, /bin/grep,/bin/sed, /sbin/sysctl, /usr/bin/free, /usr/sbin/useradd, /bin/cp,/sbin/service, /usr/bin/head, /usr/bin/tail, /bin/chmod, /bin/chown, /sbin/ifconfig, /usr/sbin/usermod, /sbin/depmod, /bin/uname, /bin/ln, /bin/umount, /bin/mount, /bin/mkdir, /bin/ls, /bin/rm, /bin/basename, /bin/netstat, /bin/df, /bin/hostname, /bin/mv

In addition, add the following line:

env_keep +="PERL5LIB"


Creating Privilege Delegation Templates

If you want to use Privilege Delegation authentication utility, then before editing a Deployment Procedure, create a Privilege Delegation template with the required settings for a host. To do so, follow these steps:

  1. In Grid Control, from the top-right corner, click Setup.

  2. On the Overview of Setup page, from the vertical menu, click Manage Privilege Delegation Settings.

  3. On the Manage Privilege Delegation Settings page, from the Related Links section, click Manage Privilege Delegation Settings Template.

  4. On the Manage Privilege Delegation Settings Templates page, from the Create list, select a privilege delegation type, either Sudo or PowerBroker, and click Go.

  5. On the Create '<delegation type>' Setting Template page, provide the template name and the command to run (for PowerBroker, you can optionally provide the password prompt), and click Save.

  6. On the Manage Privilege Delegation Setting Templates page, select the template you created and click Apply.

  7. On the Apply '<delegation type>' Setting: New page, click Add Targets to apply the privilege delegation template settings to selected hosts, and click Apply.

    Note:

    If you do not apply the privilege delegation template to a target, and if you configure a step in the deployment procedure to run in Privilege Delegation mode, then the deployment procedure for that target runs the step in normal mode instead.
  8. After creating the template, to understand how it can be applied to Deployment Procedures, see Using SUDO, PowerBroker, and Privilege Delegation Settings.

Using SUDO, PowerBroker, and Privilege Delegation Settings

You can use SUDO, PowerBroker, and Privilege Delegation Settings globally, that is, for all steps, or only for some steps within a Deployment Procedure. This section explains the following:

Making Global Settings

For SUDO and PowerBroker, you can specify the SUDO and PowerBroker commands to run, and also set environment variables and the preferred command interpreter for them.

Specifying SUDO and PowerBroker Settings

For Privilege Delegation, you can specify the user and the profile that the step must run as.

PDP Settings

Making Step-Level Settings

For each step, from the Run Privilege column, you can select either SUDO, PAM, or Privilege Delegation.

Applying Settings

If you select SUDO or PAM, then in the Run Privilege Command/Privilege Delegation column, specify the Run As command. If you select Privilege Delegation, then specify the Run As value in the first text box and the Profile value in the second text box.

Note:

If you select SUDO or PAM, and leave the Run Privilege Command column blank, then the commands as set in the SUDO Command and PAM Command fields are used. However, if you want some steps to override these globally declared commands, then in the Run Privilege Command column for that step, specify the commands that need to be used instead. If these settings are not made, then the Run As and Profile values specified along with preferred credential are used.

See Also:

You can access My Oracle Support note 603108.1 to view use cases that describe how SUDO and PAM settings can be applied.

For file transfer-based job steps, you can apply the Privilege Delegation settings while editing that step. For example, one of the steps in the One Click Extend Cluster Database deployment procedure is Copy Archives. This is a file transfer-based job step for which you can apply the Privilege Delegation settings. To do so, you can click the step name and on the Map Parameters page, in the Run Mode section, from the Run Privilege for Source Target list and Run Privilege for Destination Target list, select Privilege Delegation. Then provide the Run As value and profile that must be used.

Applying Settings

Note:

For configuration collection-based job step, you can NOT apply any Privilege Delegation settings. For example, one of the steps in the One Click Extend Cluster Database deployment procedure is Refresh Host Configuration. This is a configuration collection-based step for which Privilege Delegation settings cannot be applied.

Changing Error Handling Modes

Every step in a Deployment Procedure is preconfigured with an error handling mode that indicates how the Deployment Procedure will behave when the phase or step encounters an error. The error handling modes offered by Enterprise Manager Grid Control are:

For more information about steps, see Understanding Phases and Steps.

To change the error handling modes, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure you want to customize, and click Create Like.

  4. On the Create Like Procedure page, select a phase or step, and from the list provided in the Error Handling Mode column against that phase or step, select the mode you want to set.

    Once the mode is selected from the list, Enterprise Manager Grid Control automatically refreshes the page with the newly selected mode for that phase or step.

The following is an example that illustrates how you customize the Oracle Database Provisioning Deployment Procedure to change the error handling mode of the Destination User Permission Checks phase:

Changing Error Handling Mode

Customizing Directives

Directives are essentially scripts stored in the Software Library. They are used in Deployment Procedures within a Directive Step, which is a special type of action step. For more information about Directive Step, see Understanding Phases and Steps.

If you want to customize a directive offered by Enterprise Manager Grid Control, then first create a copy of the Perl script associated with that Directive and make a new directive out of that copy. Then customize the Deployment Procedure to modify a step to use this new directive, and then schedule the deployment. This section explains the following:

Creating Copy of a Default Directive

To create a new customized directive using a default directive, follow these steps:

  1. In Grid Control, click the Deployments tab and then the Provisioning secondary tab.

  2. On the Provisioning page, click Directives.

  3. On the Directives page, from the table, expand Oracle Directives and then expand other levels under this category to reach the directive you want to copy.

    For example, if you want to copy the Apply Patch directive of a patching operation, then expand Oracle Directives and then expand Patching. From this level, expand Common, and then All, and finally Generic. Under Generic, you should see the directive Apply Patch.

  4. Select the directive you want to copy and click Edit. Open the Perl script, copy the contents of it to a local editor, and save it locally.

Storing the New Directive

To store the new directive, follow these steps:

  1. In Grid Control, click the Deployments tab and then the Provisioning secondary tab.

  2. On the Provisioning page, click Directives.

  3. On the Directives page, click Create Folder to create a folder titled Custom Directives. This is to ensure that you separate the custom directives from the default directives.

  4. On the Directives page, from the table, select Custom Directives and click Create Directives.

  5. In the Create Directive wizard, do the following:

    1. On the Describe page, describe the directive you are creating.

    2. On the Configure page, click Add to specify the command line arguments to be passed to the Directive. Set the Shell Type to Perl because you are adding a Perl script. If the script is neither Perl nor Bash, then set it to Defined in Script.

      Each entry represents a single command line argument. Each argument may include a variable to be set later, a prefix and suffix. The prefix and suffix text are appended before and after the property value to produce the command line argument.

      Repeat this step to add all the command line arguments.

    3. On the Upload File page, select Upload from Local Machine and click Browse to select the script from the local system where you saved the file.

    4. On the Review page, review the information you have provided for this new directive, and click Finish.

Customizing Deployment Procedure to Use the New Directive

To customize a Deployment Procedure to use the new directive, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure for which you want to use this new directive, and click Create Like.

  4. On the Create Like Procedure page, do the following:

    1. From the table that lists all the steps within that Deployment Procedure, select the directive step with which you want to associate the new directive, and click Edit Step.

    2. In the Edit Directive Step wizard, do the following:

      1. On the Edit page, click Next.

      2. On the Select Directive page, select Select New Directive. Then search and select the new directive you created, and click Next.

      3. On the Map Properties page, specify the values for the directive properties, and click Next.

      4. On the Review page, click Finish.

    3. Click Save.

Running the Customized Deployment Procedure

To run the customized Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the customized Deployment Procedure and click Schedule Deployment.

Setting Up E-Mail Notifications

Enterprise Manager Grid Control can send e-mail notifications to report the status of a Deployment Procedure. However, by default, Deployment Procedures do not have this feature enabled. To configure Deployment Procedures to send e-mail notifications, you must first customize them and enable the e-mail notification option, and then enable the Send E-mail option for the standard PAF Status Notification rule. This section describes how you can enable e-mail notifications for Deployment Procedures. In particular, this section covers the following:

IMPORTANT:

As a prerequisite, you are expected to have configured the Mail Server and set up the e-mail address in Enterprise Manager Grid Control. If you have not already done this, see the chapter on Configuring Notifications in the Enterprise Manager Configuration Guide available at:

http://www.oracle.com/technology/documentation/oem.html

Enabling E-Mail Notifications

To enable e-mail notifications in a Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the Deployment Procedure for which you want to set up e-mail notification, and click Create Like.

  4. On the Create Like Procedure page, do the following:

    1. Select Enable Notification.

    2. (Optional) For Procedure Status Notification Job Tag, provide a notification tag name.

      Note:

      Ensure that you specify not more than 30 characters. The text you specify here will be prepended to the notification job name.
    3. For Status for which Notification is to be Sent, select the state for which you want the notifications to be sent.

    4. Click Save.

      Enterprise Manager Grid Control displays the Deployment Procedure Manager page.

  5. On the Deployment Procedure Manager page, from the top-right corner, click Preferences.

  6. On the General page, do the following:

    1. In the E-mail Address section, click Add Another Row to add a row in the table, and specify the e-mail address to which the notification should be sent.

    2. Click Apply.

    3. From the left menu bar, click Rules.

  7. On the Notification Rules page, do the following:

    1. From the table, select PAF Status Notification, and for this notification rule, enable the Send E-mail option from the Subscribe (Send E-mail) column.

    2. Click Apply.

Customizing PAF Status Notification Rule

You can customize the standard PAF Status Notification rule to receive notifications in required ways for specific deployment procedures. For example, you might want to be notified by e-mail for a test system procedure, but for a production run you might want to be informed of the status through SMS Alerts.

To incorporate specific requirements and enable different methods of notification, you should use the Create Like function to modify the standard notification rule and edit the job with the specific notification tag name used in the Deployment Procedure and associating specific method of notification from the pre-defined notification methods.

To customize the standard PAF Status Notification rule, follow these steps:

  1. In Grid Control, from the top-right corner, click Preferences.

  2. On the General page, from the left menu bar, click Rules.

  3. On the Notification Rules page, from the table, select PAF Status Notification, and click Create Like.

  4. On the Create Notification Rule page, do the following:

    1. On the General page, specify a notification rule name and a brief description for the rule.

Customizing Deployment Procedures to RollBack Patches

To roll back patches, you must first download the rollback Perl script, then upload it as a directive to the Software Library, and then use it with a customized Deployment Procedure. This section explains how can perform each of these tasks. In particular, this section covers the following:

Downloading Rollback Perl Script

To roll back patches, you have to use the Perl script rollback_patch.pl. This script is available as an attachment to My Oracle Support Note: 577557.1. Access this note and download the script to your local system.

Storing the Script as a Directive

To store the rollback_patch.pl script as a directive in the Software Library, follow these steps:

  1. In Grid Control, click the Deployments tab and then the Provisioning secondary tab.

  2. On the Provisioning page, click Directives.

  3. On the Directives page, click Create Folder to create a folder titled Custom Directives. This is to ensure that you separate the custom directives from the default directives.

  4. On the Directives page, from the table, select Custom Directives and click Create Directives.

  5. In the Create Directive wizard, do the following:

    1. On the Describe page, specify the name Rollback Patches and provide the description Directive to roll back patches in rollback or nrollback mode. Click Next.

    2. On the Configure page, click Add to specify the following command line arguments to be passed to the Directive: oh, patchid, stageDir, command, patchsetRelease.

      Set the Shell Type to Perl because you are adding a Perl script.

    3. On the Upload File page, select Upload from Local Machine and click Browse to select the script from the local system where you saved the rollback_patch.pl file.

    4. On the Review page, review the information you have provided for this new directive, and click Finish.

Customizing Deployment Procedure to Use Rollback Directive

To customize a Deployment Procedure to use the new Rollback Patches directive, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select a patching Deployment Procedure that you want to customize for using this new directive, and click Create Like.

  4. On the Create Like Procedure page, do the following:

    1. From the table that lists all the steps within that Deployment Procedure, select the Apply Patch directive step with which you want to associate the new directive, and click Insert.

    2. In the Insert Directive Step wizard, do the following:

      1. On the Create page, provide a name and description. From the Insert Location list, select Before "Apply Patches". From the Type list, select Library: Directive. Click Next.

      2. On the Select Directive page, select Select New Directive. Then search and select the new Rollback Patches directive you created. Select Always Use Latest Revision. Click Next.

      3. On the Map Properties page, specify the following values for the directive properties, and click Next.

        Table 23-4 Map Properties

        Directive Property Display Name to be Specified Description to be Specified Variable to be Specified

        Oh

        ORACLE_HOME

        Oracle home of the target

        Select Choose Variable and then select Target Variable: oraHome from the associated list.

        patchid

        Patch ID

        Comma-separated list of patch numbers

        Select Ask User at Run-Time

        stageDir

        Stage Directory

        Directory where the patch can be staged

        Select Choose Variable and then select replacedStageDir from the associated list.

        It can be also be set to a value where the patch is staged. However, this is required only for patches of release 10.1.0.x

        command

        Rollback Command

        Rollback command to run

        Select Ask User at Run-Time

        patchsetRelease

        Patch Set Release Version

        Patch set release number

        Select Ask User at Run-Time


      4. On the Review page, click Finish.

    3. Click Save.

Running the Customized Deployment Procedure

To run the customized Deployment Procedure, follow these steps:

  1. In Grid Control, click the Deployments tab.

  2. On the Deployments page, from the Deployment Procedure Manager section, click Deployment Procedures.

  3. On the Deployment Procedure Manager page, select the customized Deployment Procedure and click Schedule Deployment.

  4. In the Deployment Procedure Wizard, provide the required information and submit it for deployment.

    On the Library Step Properties page, you will be prompted to specify the patch ID, the rollback command, and the patch set release version. Specify the following vales on this page:

    Table 23-5 Values for Library Step Properties Page for Rolling Back Patches

    Library Step Values to be Specified

    Patch ID

    Specify the patch number you want to roll back. If you want to roll back multiple patches, then specify the patch number separated by a comma.

    Rollback Command

    Specify rollback for normal patches and nrollback for Napply CPU patches.

    Patchset Release Version

    Specify the release for which the patch is being applied.