5 Rapid Home Provisioning, Scaling, Patching, and Upgrading

Rapid Home Provisioning is a method of deploying software homes to any number of nodes in a data center from a single cluster, and also facilitates scaling, patching, and upgrading software.

With Rapid Home Provisioning, you create, store, and manage templates of Oracle homes as images (called gold images) of Oracle software, such as databases, middleware, and applications. You can make a working copy of any gold image, and then you can provision that working copy to any node in the data center.

You store the gold images in a repository located on a Rapid Home Provisioning Server, which runs on one server in the Rapid Home Provisioning Server cluster that is a highly available provisioning system. This provisioning method simplifies quick patching of Oracle homes, thereby minimizing or completely eliminating downtime.

Rapid Home Provisioning simplifies maintenance in large environments because you have only to update software homes one time on the Rapid Home Provisioning Server.

Following is a list of Rapid Home Provisioning features:

Clientless Targets

In the previous release of Oracle Clusterware, the Rapid Home Provisioning Server could manage software only on Rapid Home Provisioning Clients of the same release, in addition to the server itself. With this release of Oracle Clusterware, the Rapid Home Provisioning Server can manage Rapid Home Provisioning Clients of the same release, itself, and can also manage installations running Oracle Grid Infrastructure 11g release 2 (11.2.0.3 and 11.2.0.4) and 12c release 1 (12.1.0.2). These targets may be RHP Server provisioned installations or may be preexisting installations.

Provision New Server Pools

The Rapid Home Provisioning Server can install and configure Oracle Grid Infrastructure (11g release 2 (11.2.0.4), and 12c release 1 (12.1.0.2) and release 2 (12.2)) on nodes that have no Oracle software inventory and can then manage those deployments with the full complement of Rapid Home Provisioning functionality.

Provision and Manage Any Software Home

Rapid Home Provisioning enables you to create a gold image from any software home. You can then provision that software to any Rapid Home Provisioning Client or target as a working copy. The software may be any binary that you will run on a Rapid Home Provisioning Client or target.

Since Rapid Home Provisioning is part of Oracle Grid Infrastructure and has knowledge of Oracle Database, it has built-in capabilities to provision, scale, patch, and upgrade Oracle Grid Infrastructure and Oracle Database homes as described in subsequent sections.

Provision, Scale, Patch, and Upgrade Oracle Grid Infrastructure

The Rapid Home Provisioning Server can provision Oracle Grid Infrastructure (11g release 2 (11.2.0.4), and 12c release 1 (12.1.0.2) and release 2 (12.2)) homes, add or delete nodes from an Oracle Grid Infrastructure configuration, and can also be used to patch and upgrade Oracle Grid Infrastructure homes. In addition, there is a rollback capability that facilitates reverting from a patch procedure. While patching Oracle Grid infrastructure, you can use Rapid Home Provisioning to optionally patch any database homes hosted on the cluster.

Note:

Rapid Home Provisioning does not provision, patch, or upgrade Oracle Restart, but you can provision single-instance databases on Oracle Restart, as explained in the subsequent section.

Provision, Scale, Patch, and Upgrade Oracle Database

You can use Rapid Home Provisioning to provision Oracle Database software for the following releases of Oracle Database:
  • Oracle Database 11g release 2 (11.2.0.4)

  • Oracle Database 12c release 1 (12.1.0.2)

  • Oracle Database 12c release 2 (12.2)

When you provision such software, Rapid Home Provisioning offers additional features for creating various types of databases (such as Oracle Real Application Clusters (Oracle RAC), single instance, and Oracle Real Application Clusters One Node (Oracle RAC One Node) databases) on different types of storage, and other options, such as using templates and creating container databases (CDBs). The Rapid Home Provisioning Server can add nodes to an Oracle RAC configuration, and remove nodes from an Oracle RAC configuration. Rapid Home Provisioning also improves and makes more efficient patching of database software, allowing for rapid and remote patching of the software, in most cases, without any downtime for the database.

Using Rapid Home Provisioning, you can provision, scale, and patch Oracle Database 11g release 2 (11.2.0.4), 12c release 1 (12.1.0.2), and 12c release 2 (12.2). You can also upgrade Oracle Databases from 11g release 2 (11.2.0.3) to 11g release 2 (11.2.0.4); from 11g release 2 (11.2.0.4) to 12c release 1 (12.1.0.2); and from 11g release 2 (11.2.0.4) or 12c release 1 (12.1.0.2) to 12c release 2 (12.2).

Support for Single Instance Databases

You can use Rapid Home Provisioning to provision, patch, and upgrade single-instance databases running on clusters or Oracle Restart, or on single, standalone nodes.

Advanced Patching Capabilities

When patching an Oracle Grid Infrastructure or Oracle Database home, Rapid Home Provisioning offers a batch mode that speeds the patching process by patching some or all nodes of a cluster in parallel, rather than sequentially.

For Oracle Database homes, you can define disjoint sets of nodes. Each set of nodes is updated sequentially. By defining sets with reference to the database instances running on them, you can minimize the impact of rolling updates by ensuring that services are never taken completely offline. A “smartmove” option is available to help define the sets of batches to meet this goal.

Integration with Application Continuity is another enhancement to help eliminate the impact of maintenance. This provides the ability to gracefully drain and relocate services within a cluster, completely masking the maintenance from users.

Notifications

The Rapid Home Provisioning Server is the central repository for the software homes available to the data center. Therefore, it is essential that administrators throughout the data center be aware of changes to the inventory which might impact their areas of responsibility.

Rapid Home Provisioning enables you and other users to subscribe to image series events. Anyone subscribed will be notified by email of any changes to the images available in a particular image series. Also, users can be notified by email when a working copy is added to or deleted from a client.

Custom Workflow Support

You can create actions for various Rapid Home Provisioning operations, such as importing images, adding or deleting working copies, and managing a software home. You can define different actions for each operation, and further differentiate by the type of image to which the operation applies. Actions that you define can be executed before or after the given operation, and are executed on the deployment the operation applies to, whether it is the Rapid Home Provisioning Server, a target that is not running a Rapid Home Provisioning Client, or a target that is running a Rapid Home Provisioning Client.

Resume Failed Operations

If an operation, such as adding an image, provisioning a working copy, or performing a scale, patch or upgrade fails, then Rapid Home Provisioning reports the error and stops. After the problem is corrected (for example, a directory permissions or ownership misconfiguration on a target node), you can rerun the RHPCTL command that failed, and it will resume from the point of failure. This avoids redoing any work that may have been completed prior to the failure.

Audit Command

The Rapid Home Provisioning Server records the execution of all Rapid Home Provisioning operations and also records their outcome (whether success or failure). An audit mechanism enables you to query the audit log in a variety of dimensions, and also to manage its contents and size.

Note:

  • Oracle does not support Rapid Home Provisioning on HP-UX or Windows operating systems.

  • The Rapid Home Provisioning Server does not manage operating system images.

This section includes the following topics:

5.1 Rapid Home Provisioning Architecture

Conceptual information regarding Rapid Home Provisioning architecture.

The Rapid Home Provisioning architecture consists of a Rapid Home Provisioning Server and any number of Rapid Home Provisioning Clients and targets. Oracle recommends deploying the Rapid Home Provisioning Server in a multi-node cluster so that it is highly available.

The Rapid Home Provisioning Server cluster is a repository for all data, of which there are primarily two types:

  • Gold images

  • Metadata related to users, roles, permissions, and identities

The Rapid Home Provisioning Server acts as a central server for provisioning Oracle Database homes, Oracle Grid Infrastructure homes, and other application software homes, making them available to the cluster hosting the Rapid Home Provisioning Server and to the Rapid Home Provisioning Client clusters and targets.

Users operate on the Rapid Home Provisioning Server or Rapid Home Provisioning Client to request deployment of Oracle homes or to query gold images. When a user makes a request for an Oracle home, specifying a gold image, the Rapid Home Provisioning Client communicates with the Rapid Home Provisioning Server to pass on the request. The Rapid Home Provisioning Server processes the request by taking appropriate action to instantiate a copy of the gold image, and to make it available to the Rapid Home Provisioning Client cluster using available technologies such as Oracle Automatic Storage Management Cluster File System (Oracle ACFS), network file systems (NFSs), and local file systems.

5.1.1 Rapid Home Provisioning Server

The Rapid Home Provisioning Server is a highly available software provisioning system that uses Oracle Automatic Storage Management (Oracle ASM), Oracle Automatic Storage Management Cluster File System (Oracle ACFS), Grid Naming Service (GNS), and other components.

The Rapid Home Provisioning Server primarily acts as a central server for provisioning Oracle homes, making them available to Rapid Home Provisioning Client and targets.

Features of the Rapid Home Provisioning Server:

  • Efficiently stores gold images and image series for the managed homes, including separate binaries, and metadata related to users, roles, and permissions.

  • Provides highly available network file system (HANFS) exports for homes accessed using mounts on remote clusters.

  • Provides a list of available homes to clients upon request.

  • Patch a software home once and then deploy the home to any Rapid Home Provisioning Client or any other target, instead of patching every site.

  • Provides the ability to report on existing deployments.

  • Deploys homes on physical servers and virtual machines.

  • Notifies subscribers of changes to image series.

  • Maintains an audit log of all RHPCTL commands run.

5.1.2 Rapid Home Provisioning Targets

Computers that Rapid Home Provisioning is aware of are known as targets.

Rapid Home Provisioning Servers in Oracle Clusterware 12c release 1 (12.1) can only communicate with Rapid Home Provisioning Clients from the same Oracle Clusterware release. Rapid Home Provisioning Servers in Oracle Clusterware 12c release 2 (12.2) can create new targets, and can also install and configure Oracle Grid Infrastructure on targets with only an operating system installed.

Subsequently, Rapid Home Provisioning Server can provision database and other software on those targets. The communication between the Rapid Home Provisioning Server is always one way, from Server to target, with targets running Oracle Clusterware 11g and Oracle Clusterware 12c and no Rapid Home Provisioning Client present. The communication between a Rapid Home Provisioning Server and a Rapid Home Provisioning Client running Oracle Clusterware 12c release 2 (12.2) flows in both directions.

5.1.3 Rapid Home Provisioning Clients

The Rapid Home Provisioning Client is part of the Oracle Grid Infrastructure. Users operate on a Rapid Home Provisioning Client to perform tasks such as requesting deployment of Oracle homes and listing available gold images.

When a user requests an Oracle home specifying a gold image, the Rapid Home Provisioning Client communicates with the Rapid Home Provisioning Server to pass on the request. The Rapid Home Provisioning Server processes the request by instantiating a working copy of the gold image and making it available to the Rapid Home Provisioning Client using Oracle ACFS, a different local file system, or through NFS.

The Rapid Home Provisioning Client:

  • Can use Oracle ACFS to store working copies which can be rapidly provisioned as local homes; new homes can be quickly created or undone using Oracle ACFS snapshots.

    Note:

    Oracle supports using other local file systems besides Oracle ACFS.

  • Provides a list of available homes from the Rapid Home Provisioning Server.

  • Allows high availability NFS (HANFS) mounts from the Rapid Home Provisioning Server to be provisioned as working copies on the Rapid Home Provisioning Client cluster.

  • Has full functionality in Oracle Clusterware 12c release 2 (12.2) and can communicate with Rapid Home Provisioning Servers from Oracle Clusterware 12c release 2 (12.2), or later.

The NFS home client is a Rapid Home Provisioning Client that does not have Oracle ACFS installed, but can still access the Rapid Home Provisioning Server through an NFS protocol.

5.1.4 Rapid Home Provisioning Roles

An administrator assigns roles to Rapid Home Provisioning users with access-level permissions defined for each role. Users on Rapid Home Provisioning Clients are also assigned specific roles. Rapid Home Provisioning includes basic built-in and composite built-in roles.

5.1.4.1 Basic Built-In Roles

The basic built-in roles and their functions are:

  • GH_ROLE_ADMIN: An administrative role for everything related to roles. Users assigned this role are able to run rhpctl verb role commands.

  • GH_SITE_ADMIN: An administrative role for everything related to Rapid Home Provisioning Clients. Users assigned this role are able to run rhpctl verb client commands.

  • GH_SERIES_ADMIN: An administrative role for everything related to image series. Users assigned this role are able to run rhpctl verb series commands.

  • GH_SERIES_CONTRIB: Users assigned this role can add images to a series using the rhpctl insertimage series command, or delete images from a series using the rhpctl deleteimage series command.

  • GH_WC_ADMIN: An administrative role for everything related to working copies. Users assigned this role are able to run rhpctl verb workingcopy commands.

  • GH_WC_OPER: A role that enables users to create a working copy for themselves or others using the rhpctl add workingcopy command with the -user option (when creating for others). Users assigned this role do not have administrative privileges and can only administer the working copies that they create.

  • GH_WC_USER: A role that enables users to create a working copy using the rhpctl add workingcopy command. Users assigned this role do not have administrative privileges and can only delete working copies that they create.

  • GH_IMG_ADMIN: An administrative role for everything related to images. Users assigned this role are able to run rhpctl verb image commands.

  • GH_IMG_USER: A role that enables users to create an image using the rhpctl add | import image commands. Users assigned this role do not have administrative privileges and can only delete images that they create.

  • GH_IMG_TESTABLE: A role that enables users to add a working copy of an image that is in the TESTABLE state. Users assigned this role must also be assigned either the GH_WC_ADMIN role or the GH_WC_USER role to add a working copy.

  • GH_IMG_RESTRICT: A role that enables users to add a working copy from an image that is in the RESTRICTED state. Users assigned this role must also be assigned either the GH_WC_ADMIN role or the GH_WC_USER role to add a working copy.

  • GH_IMG_PUBLISH: Users assigned this role can promote an image to another state or retract an image from the PUBLISHED state to either the TESTABLE or RESTRICTED state.

  • GH_IMG_VISIBILITY: Users assigned this role can modify access to promoted or published images using the rhpctl allow | disallow image commands.

5.1.4.2 Composite Built-In Roles

The composite built-in roles and their functions are:

  • GH_SA: The Oracle Grid Infrastructure user on a Rapid Home Provisioning Server automatically inherits this role.

    The GH_SA role includes the following basic built-in roles: GH_ROLE_ADMIN, GH_SITE_ADMIN, GH_SERIES_ADMIN, GH_SERIES_CONTRIB, GH_WC_ADMIN, GH_IMG_ADMIN, GH_IMG_TESTABLE, GH_IMG_RESTRICT, GH_IMG_PUBLISH, and GH_IMG_VISIBILITY.

  • GH_CA: The Oracle Grid Infrastructure user on a Rapid Home Provisioning Client automatically inherits this role.

    The GH_CA role includes the following basic built-in roles: GH_SERIES_ADMIN, GH_SERIES_CONTRIB, GH_WC_ADMIN, GH_IMG_ADMIN, GH_IMG_TESTABLE, GH_IMG_RESTRICT, GH_IMG_PUBLISH, and GH_IMG_VISIBILITY.

  • GH_OPER: This role includes the following built-in roles: GH_WC_OPER, GH_SERIES_ADMIN, GH_IMG_TESTABLE, GH_IMG_RESTRICT, and GH_IMG_USER. Users assigned this role can delete only images that they have created.

Consider a gold image called G1 that is available on the Rapid Home Provisioning Server.

Further consider that a user, U1, on a Rapid Home Provisioning Client, Cl1, has the GH_WC_USER role. If U1 requests to provision an Oracle home based on the gold image G1, then U1 can do so, because of the permissions granted by the GH_WC_USER role. If U1 requests to delete G1, however, then that request would be denied because the GH_WC_USER role does not have the necessary permissions.

The Rapid Home Provisioning Server can associate user-role mappings to the Rapid Home Provisioning Client. After the Rapid Home Provisioning Server delegates user-role mappings, the Rapid Home Provisioning Client can then modify user-role mappings on the Rapid Home Provisioning Server for all users that belong to the Rapid Home Provisioning Client. This is implied by the fact that only the Rapid Home Provisioning Server qualifies user IDs from a Rapid Home Provisioning Client site with the client cluster name of that site. Thus, the Rapid Home Provisioning Client CL1 will not be able to update user mappings of a user on CL2, where CL2 is the cluster name of a different Rapid Home Provisioning Client.

5.1.5 Rapid Home Provisioning Images

By default, when you create a gold image using either rhpctl import image or rhpctl add image, the image is ready to provision working copies. However, under certain conditions, you may want to restrict access to images and require someone to test or validate the image before making it available for general use.

You can also create a set of gold images on the Rapid Home Provisioning Server that can be collectively categorized as a gold image series which relate to each other, such as identical release versions, gold images published by a particular user, or images for a particular department within an organization.

5.1.6 Rapid Home Provisioning Server Auditing

The Rapid Home Provisioning Server records the execution of all Rapid Home Provisioning operations, and also records whether those operations succeeded or failed.

An audit mechanism enables administrators to query the audit log in a variety of dimensions, and also to manage its contents and size.

5.1.7 Rapid Home Provisioning Notifications

The Rapid Home Provisioning Server is the central repository for the software homes available to the data center. Therefore, it is essential for administrators throughout the data center to be aware of changes to the inventory that may impact their areas of responsibility.

You can create subscriptions to image series events. Rapid Home Provisioning notifies a subscribed role or number of users by email of any changes to the images available in the series, including addition or removal of an image. Each series may have a unique group of subscribers.

Also, when a working copy is added to or deleted from a target, the owner of the working copy and any additional users can be notified by email. If you want to enable notifications for additional Rapid Home Provisioning events, you can create a user-defined action as described in the next section.

5.1.8 User-Defined Actions

You can create actions for various Rapid Home Provisioning operations, such as import image, add and delete working copy, and add, delete, move, and upgrade a software home.

You can create actions for various Rapid Home Provisioning operations, such as import image, add and delete working copy, and add, delete, move, and upgrade a software home. You can define different actions for each operation, which can be further differentiated by the type of image to which the operation applies. User-defined actions can be run before or after a given operation, and are run on the deployment on which the operation is run, whether it be a Rapid Home Provisioning Server, a Rapid Home Provisioning Client (12c release 2 (12.2), or later), or a target that is not running a Rapid Home Provisioning Client.

User-defined actions are shell scripts which are stored on the Rapid Home Provisioning Server. When a script runs, it is given relevant information about the operation on the command line. Also, you can associate a file with the script. The Rapid Home Provisioning Server will copy that file to the same location on the Client or target where the script is run.

For example, perhaps you want to create user-defined actions that are run after a database upgrade, and you want to define different actions for Oracle Database 11g and 12c. This requires you to define new image types, as in the following example procedure.

  1. Create a new image type, (DB11IMAGE, for example), based on the ORACLEDBSOFTWARE image type, as follows:

    $ rhpctl add imagetype -imagetype DB11IMAGE -basetype ORACLEDBSOFTWARE

    When you add or import an Oracle Database 11g gold image, you specify the image type as DB11IMAGE.

  2. Define a user action and associate it with the DB11IMAGE image type and the upgrade operation. You can have different actions that are run before or after upgrade.

  3. To define an action for Oracle Database 12c, create a new image type (DB12IMAGE, for example) that is based on the ORACLEDBSOFTWARE image type, as in the preceding step, but with the DB12IMAGE image type.

    Note:

    If you define user actions for the base type of a user-defined image type (in this case the base type is ORACLEDBSOFTWARE), then Rapid Home Provisioning performs those actions before the actions for the user-defined image type.

You can modify the image type of an image using the rhpctl modify image command. Additionally, you can modify, add, and delete other actions. The following two tablesTable 5-1 and Table 5-2 list the operations you can customize and the parameters you can use to define those operations, respectively.

Table 5-1 Rapid Home Provisioning User-Defined Operations

Operation Parameter List
IMPORT_IMAGE

RHP_OPTYPE, RHP_PHASE, RHP_PATH, RHP_PATHOWNER, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

ADD_WORKINGCOPY

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_PATH, RHP_STORAGETYPE, RHP_USER, RHP_NODES, RHP_ORACLEBASE, RHP_DBNAME, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

ADD_DATABASE

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_CLIENT, RHP_DBNAME, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

DELETE_WORKINGCOPY

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_CLIENT, RHP_PATH, RHP_PROGRESSLISTENERHOS, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

DELETE_DATABASE

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_CLIENT, RHP_DBNAME, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

MOVE_GIHOME

RHP_OPTYPE, RHP_PHASE, RHP_SOURCEWC, RHP_SOURCEPATH, RHP_DESTINATIONWC, RHP_DESTINATIONPATH, RHP_IMAGE, RHP_IMAGETYPE, RHP_PROGRESSLISTENERHOS, RHP_PROGRESSLISTENERPORT, RHP_VERSION, RHP_CL, RHP_USERACTIONDATA

MOVE_DATABASE

RHP_OPTYPE, RHP_PHASE, RHP_SOURCEWC, RHP_SOURCEPATH, RHP_DESTINATIONWC, RHP_DESTINATIONPATH, RHP_DBNAME, RHP_IMAGE, RHP_IMAGETYPE, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_VERSION, RHP_CLI, RHP_DATAPATCH, RHP_USERACTIONDATA

UPGRADE_GIHOME

RHP_OPTYPE, RHP_PHASE, RHP_SOURCEWC, RHP_SOURCEPATH, RHP_DESTINATIONWC, RHP_DESTINATIONPATH, RHP_IMAGE, RHP_IMAGETYPE, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

UPGRADE_DATABASE

RHP_OPTYPE, RHP_PHASE, RHP_SOURCEWC, RHP_SOURCEPATH, RHP_DESTINATIONWC, RHP_DESTINATIONPATH, RHP_DBNAME, RHP_IMAGE, RHP_IMAGETYPE, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

ADDNODE_DATABASE

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_CLIENT, RHP_DBNAME, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

DELETENODE_DATABASE

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_CLIENT, RHP_DBNAME, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

ADDNODE_GIHOME

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_CLIENT, RHP_PATH, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

DELETENODE_GIHOME

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_CLIENT, RHP_PATH, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

ADDNODE_WORKINGCOPY

RHP_OPTYPE, RHP_PHASE, RHP_WORKINGCOPY, RHP_CLIENT, RHP_PATH, RHP_PROGRESSLISTENERHOST, RHP_PROGRESSLISTENERPORT, RHP_IMAGE, RHP_IMAGETYPE, RHP_VERSION, RHP_CLI, RHP_USERACTIONDATA

Table 5-2 User-Defined Operations Parameters

Parameter Description
RHP_OPTYPE

The operation type for which the user action is being executed, as listed in the previous table.

RHP_PHASE

This parameter indicates whether the user action is executed before or after the operation (is either PRE or POST).

RHP_PATH

This is the path to the location of the software home. This parameter represents the path on the local node from where the RHPCTL command is being run for an IMPORT_IMAGE operation. For all other operations, this path is present on the site where the operation is taking place.

RHP_PATHOWNER

The owner of the path for the gold image that is being imported.

RHP_PROGRESSLISTENERHOST

The host on which the progress listener is listening. You can use this parameter, together with a progress listener port, to create a TCP connection to print output to the console on which the RHPCTL command is being run.

RHP_PROGRESSLISTENERPORT

The port on which the progress listener host is listening. You can use this parameter, together with a progress listener host name, to create a TCP connection to print output to the console on which the RHPCTL command is being run.

RHP_IMAGE

The image associated with the operation. In the case of a move operation, it will reflect the name of the destination image.

RHP_IMAGETYPE

The image type of the image associated with the operation. In the case of a move operation, it will reflect the name of the destination image.

RHP_VERSION

The version of the Oracle Grid Infrastructure software running on the Rapid Home Provisioning Server.

RHP_CLI

The exact command that was run to invoke the operation.

RHP_STORAGETYPE

The type of storage for the home (is either NFS, LOCAL, or RHP_MANAGED)

RHP_USER

The user for whom the operation is being performed.

RHP_NODES

The nodes on which a database will be created.

RHP_ORACLEBASE

The Oracle base location for the provisioned home.

RHP_DBNAME

The name of the database to be created.

RHP_CLIENT

The name of the client cluster.

RHP_SOURCEWC

The source working copy name for a patch of upgrade operation.

RHP_SOURCEPATH

The path of the source working copy home.

RHP_DESTINATIONWC

The destination working copy name for a patch or upgrade operation.

RHP_DESTINATIONPATH

The path of the destination working copy home.

RHP_DATAPATCH

This parameter is set to TRUE at the conclusion of the user action on the node where the SQL patch will be run after the move database operation is complete.

RHP_USERACTIONDATA

This parameter is present in all of the operations and is used to pass user-defined items to the user action as an argument during runtime.

Example of User-Defined Action

The following is a sample script that is registered as a user action for an ADD_WORKINGCOPY operation:

#!/bin/sh
touch /tmp/SAMPLEOUT.txt;
echo $* >> /tmp/SAMPLEOUT.txt;

The preceding user action is invoked as part of the following command:

$ rhpctl add workingcopy -workingcopy apachecopy -image apacheinstall 
  -path /scratch/mjkeenan/apacheinstallloc -sudouser mjkeenan -sudopath
  /usr/local/bin/sudo -node rws1290753 -user mjkeenan -useractiondata 
  "/tmp/SAMPLEUA.txt"

When the user action gets invoked during this command, the command returns output similar to the following:

$ cat /tmp/SAMPLEOUT.txt
RHP_OPTYPE=ADD_WORKINGCOPY
RHP_PHASE=PRE
RHP_WORKINGCOPY=apachecopy
RHP_PATH=/scratch/mjkeenan/apacheinstallloc
RHP_STORAGETYPE=
RHP_USER=mjkeenan
RHP_NODES=rws1290753
RHP_ORACLEBASE=
RHP_DBNAME=
RHP_PROGRESSLISTENERHOST=mds11042003.my.company.com
RHP_PROGRESSLISTENERPORT=58068
RHP_IMAGE=apacheinstall
RHP_IMAGETYPE=apachetype
RHP_VERSION=12.2.0.1.0
RHP_CLI=rhpctl__add__workingcopy__-image__apacheinstall__
  -path__/scratch/mjkeenan/apacheinstallloc__-node__rws1290753__
  -useractiondata__/tmp/SAMPLEUA.txt__-sudopath__/usr/local/bin/sudo__
  -workingcopy__apachecopy__-user__mjkeenan__
  -sudouser__mjkeenan__
RHP_USERACTIONDATA=/tmp/SAMPLEUA.txt

Notes:

  • In the preceding output example empty values terminate with an equals sign (=).

  • The spaces in the command-line value of the RHP_CLI parameter are replaced by two underscore characters (__) to differentiate this from other parameters.

5.2 Rapid Home Provisioning Implementation

Implementing Rapid Home Provisioning involves creating a Rapid Home Provisioning Server, adding gold images to the server, and creating working copies to provision software.

After you install and configure Oracle Clusterware, you can configure and start using Rapid Home Provisioning. You must create a Rapid Home Provisioning Server where you create and store gold images of database and other software homes.

5.2.1 Creating a Rapid Home Provisioning Server

The Rapid Home Provisioning Server uses a repository that you create in an Oracle ACFS file system in which you store all the software homes that you want to make available to clients and targets.

To create a Rapid Home Provisioning Server:

  1. Use the Oracle ASM configuration assistant (ASMCA) to create an Oracle ASM disk group on the Rapid Home Provisioning Server to store software, as follows:
    $ Grid_home/bin/asmca

    Because this disk group is used to store software, Oracle recommends a minimum of 50 GB for this disk group.

    Note:

    You must set Oracle ASM Dynamic Volume Manager (Oracle ADVM) compatibility settings for this disk group to 12.1.

  2. Provide a mount path that exists on all nodes of the cluster. The Rapid Home Provisioning Server uses this path to mount gold images.
    $ mkdir -p storage_path/images
  3. As root, create the Rapid Home Provisioning Server resource, as follows:
    # Grid_home/bin/srvctl add rhpserver -storage storage_path
        -diskgroup disk_group_name
  4. Start the Rapid Home Provisioning Server, as follows:
    $ Grid_home/bin/srvctl start rhpserver

After you start the Rapid Home Provisioning Server, use the Rapid Home Provisioning Control (RHPCTL) utility to further manage Rapid Home Provisioning.

5.2.2 Adding Gold Images to the Rapid Home Provisioning Server

Use RHPCTL to add gold images for later provisioning of software.

The Rapid Home Provisioning Server stores and serves gold images of software homes. These images must be instantiated on the Rapid Home Provisioning Server.

Note:

Images are read-only, and you cannot run programs from them. To create a usable software home from an image, you must create a working copy. You cannot directly use images as software homes. You can, however, use images to create working copies (software homes).

You can import software to the Rapid Home Provisioning Server using any one of the following methods:

  • You can import an image from an installed home on the Rapid Home Provisioning Server using the following command:

    rhpctl import image -image image_name -path path_to_installed_home
      [-imagetype ORACLEDBSOFTWARE | ORACLEGISOFTWARE | SOFTWARE]
    
  • You can import an image from an installed home on a Rapid Home Provisioning Client, using the following command run from the Rapid Home Provisioning Client:

    rhpctl import image -image image_name -path path_to_installed_home
    
  • You can create an image from an existing working copy using the following command:

    rhpctl add image –image image_name -workingcopy working_copy_name
    

Use the first two commands in the preceding list to seed the image repository, and to add additional images over time. Use the third command on the Rapid Home Provisioning Server as part of the workflow for creating a gold image that includes patches applied to a pre-existing gold image.

The preceding three commands also create an Oracle ACFS file system in the Rapid Home Provisioning root directory, similar to the following:

/u01/rhp/images/images/RDBMS_121020617524
5.2.2.1 Image State

You can set the state of an image to TESTABLE or RESTRICTED so that only users with the GH_IMG_TESTABLE or GH_IMG_RESTRICT roles can provision working copies from this image. Once the image has been tested or validated, you can change the state and make the image available for general use by running the rhpctl promote image -image image_name -state PUBLISHED command. The default image state is PUBLISHED when you add a new gold image, but you can optionally specify a different state with the rhpctl add image and rhpctl import image commands.

5.2.2.2 Image Series

An image series is a convenient way to group different gold images into a logical sequence.

Rapid Home Provisioning treats each image as an independent entity with respect to other images. No relationship is assumed between images, even if they follow some specific nomenclature. The image administrator may choose to name images in a logical manner that makes sense to the user community, but this does not create any management grouping within the Rapid Home Provisioning framework.

Use the rhpctl add series command to create an image series and associate one or more images to this series. The list of images in an image series is an ordered list. Use the rhpctl insertimage series and rhpctl deleteimage series to add and delete images in an image series. You can also change the order of images in a series using these commands.

The insertimage and deleteimage commands do not instantiate or delete actual gold images but only change the list. Also, an image can belong to more than one series (or no series at all).

5.2.2.3 Image Type

When you add or import a gold image, you must specify an image type. Oracle Clusterware provides three built-in image types: ORACLEDBSOFTWARE, ORACLEGISOFTWARE, and SOFTWARE, and you can create custom image types.

Every gold image must have an image type, and you can create your own image types. A new image type must be based on one of the built-in types. The image type directs Rapid Home Provisioning to apply its capabilities for managing Oracle Grid Infrastructure and Oracle Database homes. Rapid Home Provisioning also uses image type to organize the custom workflow support framework.

Creating a Custom Image Type

Use the rhpctl add imagetype command to create custom image types.

For example, to create an image type called DBTEST, which is based on the ORACLEDBSOFTWARE image type:

$ rhpctl add imagetype -imagetype DBTEST -basetype ORACLEDBSOFTWARE

Note:

When you create an image type that is based on an existing image type, the new image type does not inherit any user actions (for custom workflow support) from the base type.

5.2.3 Creating Working Copies to Provision Software

Use RHPCTL to create working copies and provision software to Rapid Home Provisioning Servers, Clients, and targets.

After you create and import a gold image, you can provision software by adding a working copy on the Rapid Home Provisioning Server, on a Rapid Home Provisioning Client, or a target. You can run the software provisioning command on either the Server or a Client.

  • To create a working copy on the Rapid Home Provisioning Server:
    $ rhpctl add workingcopy -workingcopy working_copy_name -image image_name
    
  • To create a working copy in a local file system on a Rapid Home Provisioning Client:
    $ rhpctl add workingcopy -workingcopy working_copy_name -image image_name
       -storagetype LOCAL -path path_to_software_home
  • To create a working copy on a Rapid Home Provisioning Client from the Rapid Home Provisioning Server:
    $ rhpctl add workingcopy -workingcopy working_copy_name -image image_name
       -client client_cluster_name

Note:

  • The directory you specify in the -path parameter must be empty.

  • You can re-run the provisioning command in case of an interruption or failure due to system or user errors. After you fix the reported errors, re-run the command and it will resume from the point of failure.

5.2.3.1 User Group Management in Rapid Home Provisioning

When you create a working copy as part of a move or upgrade operation, Rapid Home Provisioning configures the operating system groups in the new working copy to match those of the source software home (either the unmanaged or the managed home from which you move or upgrade).

When you create a gold image of SOFTWARE image type, any user groups in the source are not inherited and images of this type never contain user group information. When you provision a working copy from a SOFTWARE gold image using the rhpctl add workingcopy command, you can, optionally, configure user groups in the working copy using the -group parameter.

The rhpctl move database, rhpctl move gihome, rhpctl upgrade database, and rhpctl upgrade gihome commands all require you to specify a source home (either an unmanaged home or a managed home (working copy) that you provisioned using Rapid Home Provisioning), and a destination home (which must be a working copy). For the destination home, all of the previously mentioned commands enable you to specify an existing working copy that you provisioned previously using rhpctl add workingcopy, and all of the commands also enable you to, instead, specify a gold image from which to create a new working copy making that the destination home.

When you have provisioned the destination home using the rhpctl add workingcopy command, prior to performing a move or upgrade operation, you must ensure that the groups configured in the source home match those in the destination home. Rapid Home Provisioning configures the groups as part of the add operation.

When you create a gold image of either the ORACLEGISOFTWARE or the ORACLEDBSOFTWARE image type from a source software home (using the rhpctl import image command) or from a working copy (using the rhpctl add image command), the gold image inherits the Oracle user groups that were configured in the source. You cannot override this feature.

You can define user groups for ORACLEGISOFTWARE and ORACLEDBSOFTWARE working copies using the rhpctl add workingcopy command, depending on the image type and user group, as discussed in the subsequent sections.

This section describes how Rapid Home Provisioning manages user group configuration, and how the -group command-line option of rhpctl add workingcopy functions.

ORACLEGISOFTWARE (Oracle Grid Infrastructure 11g release 2 (11.2), and 12c release 1 (12.1) and release 2 (12.2))

When you provision an Oracle Grid Infrastructure working copy, the groups are set in the working copy according to the type of provisioning (whether regular provisioning or software only, and with or without the -local parameter), and whether you specify the -group parameter with rhpctl add workingcopy. You can define OSDBA and OSASM user groups in Oracle Grid Infrastructure software with either the -softwareonly command parameter or by using a response file with the rhpctl add workingcopy command.

If you are provisioning only the Oracle Grid Infrastructure software using the -softwareonly command parameter, then you cannot use the -group parameter, and Rapid Home Provisioning obtains OSDBA and OSASM user group information from the active Grid home.

If you use the -local command parameter (which is only valid when you use the -softwareonly command parameter) with rhpctl add workingcopy, then Rapid Home Provisioning takes the values of the groups from the command line (using the -group parameter) or uses the default values, which Rapid Home Provisioning obtains from the osdbagrp binary of the gold image.

If none of the preceding applies, then Rapid Home Provisioning uses the installer default user group.

If you are provisioning and configuring a working copy using information from a response file, then Rapid Home Provisioning:
  1. Uses the value of the user group from the command line, if provided, for OSDBA or OSASM, or both.

  2. If you provide no value on the command line, then Rapid Home Provisioning retrieves the user group information defined in the response file.

If you are defining the OSOPER Oracle group, then, again, you can either use the -softwareonly command parameter or use a response file with the rhpctl add workingcopy command.

If you use the -softwareonly command parameter, then you can provide the value on the command line (using the -group parameter) or leave the user group undefined.

If you are provisioning and configuring a working copy using information from a response file, then you can provide the value on the command line, use the information contained in the response file, or leave the OSOPER Oracle group undefined.

ORACLEDBSOFTWARE (Oracle Database 11g release 2 (11.2), and 12c release 1 (12.1) and release 2 (12.2))

If you are provisioning a working copy of Oracle Database software and you want to define Oracle groups, then use the -group command parameter with the rhpctl add workingcopy command. Oracle groups available in the various Oracle Database releases are as follows:

  • Oracle Database 11g release 2 (11.2)

    • OSDBA
    • OSOPER
  • Oracle Database 12c release 1 (12.1)

    • OSDBA
    • OSOPER
    • OSBACKUP
    • OSDG
    • OSKM
  • Oracle Database 12c release 2 (12.2)

    • OSDBA
    • OSOPER
    • OSBACKUP
    • OSDG
    • OSKM
    • OSRAC

Regardless of which of the preceding groups you are defining (except for OSOPER), Rapid Home Provisioning takes the values of the groups from the command line (using the -group parameter) or uses the default values, which Rapid Home Provisioning obtains from the osdbagrp binary of the gold image.

If any group picked up from the osdbagrp binary is not in the list of groups to which the database user belongs (given by the id command), then Rapid Home Provisioning uses the installer default user group. Otherwise, the database user is the user running the rhpctl add workingcopy command.

5.2.3.2 Storage Options for Provisioned Software

Choose one of three storage options where Rapid Home Provisioning stores working copies.

When you provision software using the rhpctl add workingcopy command, you can choose from three storage options where Rapid Home Provisioning places that software:

  • In an Oracle ACFS shared file system managed by Rapid Home Provisioning (for database homes only)

  • In a local file system not managed by Rapid Home Provisioning

  • In an NFS file system provided and managed by the Rapid Home Provisioning Server

Using the rhpctl add workingcopy command with the –storagetype and –path parameters, you can choose where you store provisioned working copies. The applicability of the parameters depends on whether the node (or nodes) to which you are provisioning the working copy is a Rapid Home Provisioning Server, Rapid Home Provisioning Client, or a non-Rapid Home Provisioning client. You can choose from three different values for the –stroragetype parameter:

  • RHP_MANAGED: Choosing this value, which is available for Rapid Home Provisioning Servers and Rapid Home Provisioning Clients, stores working copies in an Oracle ACFS shared file system. The –path parameter is not used with this option because Rapid Home Provisioning manages the storage option.

    Notes:

    • You cannot store Oracle Grid Infrastructure homes in RHP_MANAGED storage.

    • Oracle recommends using the RHP_MANAGED storage type, which is available on Rapid Home Provisioning Servers, and on Clients configured with an Oracle ASM disk group.

    • If you provision working copies on a Rapid Home Provisioning Server, then you do not need to specify the -storagetype option because it will default to RHP_MANAGED.

    • If you choose to provision working copies on a Rapid Home Provisioning Client, and you do not specify the -path parameter, then the storage type defaults to RHP_MANAGED only if there is an Oracle ASM disk group on the client. Otherwise the command will fail. If you specify a location on the client for the -path parameter, then the storage type defaults to LOCAL with or without an Oracle ASM disk group.

  • LOCAL: Choosing this value stores working copies in a local file system that is not managed by Rapid Home Provisioning. You must specify a path to the file system on the Rapid Home Provisioning Server, Rapid Home Provisioning Client, or non-Rapid Home Provisioning client, or to the Oracle ASM disk group on the Rapid Home Provisioning Client.

  • NFS: If you choose this value, then the path you provide is used as an NFS mount point. With NFS storage, the software resides on the Rapid Home Provisioning Server cluster, and is accessible as read/write on the Rapid Home Provisioning Client cluster over NFS. In this case, the same software is visible on all nodes of the client and is therefore shared across all nodes.

    Note:

    If you choose to store working copies on a Rapid Home Provisioning Server, then you cannot use NFS and it becomes an invalid choice as a storage type.

In cases where you specify the –path parameter, if the file system is shared among all of the nodes in the cluster, then the working copy gets created on this shared storage. If the file system is not shared, then the working copy gets created in the location of the given path on every node in the cluster.

Note:

The directory you specify in the -path parameter must be empty.

Related Topics

5.2.3.3 Provisioning for a Different User

If you want a different user to provision software other than the user running the command, then use the -user parameter of the rhpctl add workingcopy command.

When the provisioning is completed, all files and directories of the provisioned software are owned by the user you specified. Permissions on files on the remotely provisioned software are the same as the permissions that existed on the gold image from where you provisioned the application software.

5.3 Oracle Grid Infrastructure Management

The Rapid Home Provisioning Server provides an efficient and secure platform for the distribution of Oracle Grid Infrastructure homes to targets and Rapid Home Provisioning Clients.

Also, Rapid Home Provisioning Clients have the ability to fetch Oracle Grid Infrastructure homes from the Rapid Home Provisioning Server.

Oracle Grid Infrastructure homes are distributed in the form of working copies. After a working copy has been provisioned, Rapid Home Provisioning can optionally configure Oracle Grid Infrastructure. This gives Rapid Home Provisioning the ability to create an Oracle Grid Infrastructure installation on a group of one or more nodes that initially do not have Oracle Grid Infrastructure installed.

Rapid Home Provisioning also has commands for managing Oracle Grid Infrastructure homes, such as switching to a patched home or upgrading to a new Oracle Grid Infrastructure version. These are both single commands that orchestrate the numerous steps involved. Reverting to the original home is just as simple. Also, Rapid Home Provisioning can add or delete nodes from an Oracle Grid Infrastructure configuration.

5.3.1 Provisioning Oracle Grid Infrastructure Software

Rapid Home Provisioning has several methods to provision and, optionally, configure Oracle Grid Infrastructure homes.

First, Rapid Home Provisioning can provision and configure Oracle Grid Infrastructure on one or more nodes that do not currently have a Grid home, and then configure Oracle Grid Infrastructure to form a single node or multi-node Oracle Grid Infrastructure installation.
Use the rhpctl add workingcopy command to install and configure Oracle Grid Infrastructure, and to enable simple and repeatable creation of standardized deployments.
Second, the Rapid Home Provisioning Server can provision an Oracle Grid Infrastructure home to a node or cluster that is currently running Oracle Grid Infrastructure. The currently running Grid home can be a home that Rapid Home Provisioning did not provision (an unmanaged home) or a home that Rapid Home Provisioning did provision (a managed home).
In either case, use the -softwareonly parameter of the rhpctl add workingcopy command. This provisions but does not activate the new Grid home, so that when you are ready to switch to that new home, you can do so with a single command.
  • To inform Rapid Home Provisioning the nodes on which to install Oracle Grid Infrastructure, and to configure Oracle Grid Infrastructure, you provide directions in a response file, as in the following example:
    $ rhpctl add workingcopy -workingcopy GI_HOME_11204_WCPY -image GI_HOME_11204 –responsefile /u01/app/rhpinfo/GI_11204_install.txt –root root/sudo credentials
    The preceding command provisions the GI_HOME_11204_WCPY working copy based on the GI_HOME_11204 gold image to a target specified in the GI_11204_install.txt response file. In addition to identifying the target nodes, the response file specifies information about the Oracle Grid Infrastructure configuration, such as Oracle ASM and GNS parameters.

    Note:

    The oracle.install.crs.rootconfig.executeRootScript=xxx response file parameter is overridden and always set to false for Rapid Home Provisioning, regardless of what you specify in the response file.
  • To provision an Oracle Grid Infrastructure home to a node or cluster that is currently running Oracle Grid Infrastructure:
    $ rhpctl add workingcopy -workingcopy GI_HOME_12201_PATCHED_WCPY -image GI_HOME_12201_PSU1 –client CLUST_002 -softwareonly

    The preceding command provisions a new working copy based on the GI_HOME_12201_PSU1 gold image to the Rapid Home Provisioning Client (that is running Oracle Grid Infrastructure 12c release 2 (12.2)) named CLUST_002. When you provision to a target that is not running Oracle Grid Infrastructure 12c release 2 (12.2) (such as, a target running Oracle Grid Infrastructure 12c release 1 (12.1) or Oracle Grid Infrastructure 11g release 2 (11.2)), use the -targetnode parameter instead of -client.

5.3.2 Patching Oracle Grid Infrastructure Software

Rapid Home Provisioning provides three methods to patch Oracle Grid Infrastructure software homes: rolling, non-rolling, and in batches.

Patching Oracle Grid Infrastructure software involves moving the Grid home to a patched version of the current Grid home. The patched version must be a working copy. The working copy to which you are moving the Grid home can be at a lower patch level than the current home. This facilitates rollback if any problems occur after moving to the higher-level patched home.

This section includes the following topics:

5.3.2.1 Patching Oracle Grid Infrastructure Using the Rolling Method

The rolling method for patching Oracle Grid Infrastructure is the default method.

You use the rhpctl move gihome command (an atomic operation), which returns after the Oracle Grid Infrastructure stack on each node has been restarted on the new home. Nodes are restarted sequentially, so that only one node at a time will be offline, while all other nodes in the cluster remain online.
  • Move the Oracle Grid Infrastructure home to a working copy of the same release level, as follows:
    $ rhpctl move gihome -client cluster_name –sourcewc Grid_home_1 –destwc Grid_home_2

The preceding command moves the running Oracle Grid Infrastructure home from the current managed home (the sourcewc) to the patched home (destwc) on the specific client cluster. The patched working copy must be provisioned on the client.

Notes:

  • You cannot move the Grid home to a home that Rapid Home Provisioning does not manage. Therefore, rollback applies only to moves between two working copies.

  • You can delete the source working copy at any time after moving a Grid home. Once you delete the working copy, however, you cannot perform a rollback. Also, use the rhpctl delete workingcopy command (as opposed to rm, for example) to remove the source working copy to keep the Rapid Home Provisioning inventory correct.

5.3.2.2 Patching Oracle Grid Infrastructure Using the Non-Rolling Method

You can use the -nonrolling parameter with the rhpctl move gihome command, which restarts the Oracle Grid Infrastructure stack on all nodes in parallel.

As with the rolling method, this is an atomic command which returns after all nodes are online.
  • Use the following command to patch Oracle Grid Infrastructure in an non-rolling fashion:
    $ rhpctl move gihome -client cluster_name –sourcewc Grid_home_1 –destwc Grid_home_2 -nonrolling
5.3.2.3 Patching Oracle Grid Infrastructure Using Batches

The third patching method is to sequentially process batches of nodes, with a number of nodes in each batch being restarted in parallel.

This method maximizes service availability during the patching process. When you patch Oracle release 2 (12.2.x) software homes, you can define the batches on the command line or choose to have Rapid Home Provisioning generate the list of batches based on its analysis of the database services running in the cluster.
There are two methods for defining batches:

User-Defined Batches

When you use this method of patching, the first time you run the rhpctl move gihome command, you must specify the source home, the destination home, the batches, and other options, as needed. The command terminates after the first node restarts.

To patch Oracle Grid Infrastructure using batches that you define:

  1. Define a list of batches on the command line and begin the patching process, as in the following example:

    $ rhpctl move gihome -sourcewc wc1 -destwc wc2 -firstnode n1 -batches "(n2,n3),(n4)"

    The preceding command example initiates the move operation, and terminates and reports successful when the Oracle Grid Infrastructure stack restarts in the first batch. Oracle Grid Infrastructure restarts the batches in the order you specified in the -batches parameter.

    In the command example, node n1 forms the first batch, nodes n2 and n3 form the second batch, and node n4 forms the last batch. The command defines the source working copy as wc1 and the patched (destination) working copy as wc2.

    Notes:

    • If the deployment you are patching is an Oracle Flex Cluster, then you must specify the name of a Hub Node with the -firstnode parameter.

    • You can specify batches such that singleton services (policy-managed singleton services or administrator-managed services running on one instance) are relocated between batches and non-singleton services remain partially available during the patching process.

  2. You must process the next batch by running the rhpctl move gihome command, again, as follows:

    $ rhpctl move gihome -sourcewc wc1 -continue

    The preceding command example restarts the Oracle Grid Infrastructure stack on the second batch (nodes n2 and n3). The command terminates by reporting that the second batch was successfully patched.

  3. Repeat the previous step until you have processed the last batch of nodes. If you attempt to run the command with the -continue parameter after the last batch has been processed, then the command returns an error.

    If the rhpctl move gihome command fails at any time during the above sequence, then rerun the command with the -continue option to attempt to patch the failed batch. If you want to skip the failed batch and continue with the next batch, use the -continue and -skipparameters. If you attempt to skip over the last batch, then the move operation is terminated.

    You can use the -abort parameter instead of the -continue parameter at any point in the preceding procedure to terminate the patching process and leave the cluster in its current state.

    Notes:

    • Policy-managed services hosted on a server pool with one active server, and administrator-managed services with one preferred instance and no available instances cannot be relocated and will go OFFLINE while instances are being restarted.

    • If a move operation is in progress, then you cannot initiate another move operation from the same source home or to the same destination home.

    • After the move operation has ended, services may be running on nodes different from the ones they were running on before the move and you will have to manually relocate them back to the original instances, if necessary.

    • Depending on the start dependencies, services that were offline before the move began could come online during the move.

Rapid Home Provisioning-Defined Batches

Using Rapid Home Provisioning to define and patch batches of nodes means that you need only run one command, as shown in the following command example, where the source working is wc1 and the destination working copy is wc2:

$ rhpctl move gihome -sourcewc wc1 -destwc wc2 -smartmove -saf Z+ [-eval]

There is no need for you to do anything else unless you used the -separate parameter with the command. In that case, the move operation waits for user intervention to proceed to the next batch, and then you will have to run the command with the -continue parameter after each batch completes.

The parameters used in the preceding example are as follows:

  • -smartmove: This parameter restarts the Oracle Grid Infrastructure stack on disjoint sets of nodes so that singleton resources are relocated before Oracle Grid Infrastructure starts.

    Note:

    If the server pool to which a resource belongs contains only one active server, then that resource will go offline as relocation cannot take place.

    The -smartmove parameter:

    • Creates a map of services and nodes on which they are running.

    • Creates batches of nodes. The first batch will contain only the Hub node, if the configuration is an Oracle Flex Cluster. For additional batches, a node can be merged into a batch if:

      • The availability of any non-singleton service, running on this node, does not go below the specified service availability factor (or the default of 50%).

      • There is a singleton service running on this node and the batch does not contain any of the relocation target nodes for the service.

    • Restarts the Oracle Grid Infrastructure stack batch by batch.

  • Service availability factor (-saf Z+): You can specify a positive number, as a percentage, that will indicate the minimum number of database instances on which a database service must be running. For example:

    • If you specify -saf 50 for a service running on two instances, then only one instance can go offline at a time.

    • If you specify -saf 50 for a service running on three instances, then only one instance can go offline at a time.

    • If you specify -saf 75 for a service running on two instances, then an error occurs because the target can never be met.

    • The service availability factor is applicable for services running on at least two instances. As such, the service availability factor can be 0% to indicate a non-rolling move, but not 100%. The default is 50%.

    • If you specify a service availability factor for singleton services, then the parameter will be ignored because the availability of such services is 100% and the services will be relocated.

  • -eval: You can optionally use this parameter to view the auto-generated batches. This parameter also shows the sequence of the move operation without actually patching the software.

5.3.2.4 Combined Oracle Grid Infrastructure and Oracle Database Patching

When you patch an Oracle Grid Infrastructure deployment, Rapid Home Provisioning enables you to simultaneously patch the Oracle Database homes on the cluster, so you can patch both types of software homes in a single maintenance operation.

The following optional parameters of the rhpctl move gihome command are relevant to the combined Oracle Grid Infrastructure and Oracle Database patching use case:

  • -auto: Automatically patch databases along with patching Oracle Grid Infrastructure

  • -dbhomes mapping_of_Oracle_homes: Mapping of source and destination working copies in the following format:
    sourcewc1=destwc1,...,source_oracle_home_path=destwcN
  • -dblist db_name_list: Patch only the specified databases

  • -excludedblist db_name_list: Patch all databases except the specified databases

  • -nodatapatch: Indicates that datapatch is not be run for databases being moved

As an example, assume that a Rapid Home Provisioning Server with Oracle Grid Infrastructure 12c release 2 (12.2) has provisioned the following working copies on an Oracle Grid Infrastructure 12c release 1 (12.1.0.2) target cluster which includes the node test_749:

  • GI121WC1: The active Grid home on the Oracle Grid Infrastructure 12c release 1 (12.1.0.2) cluster

  • GI121WC2: A software-only Grid home on the Oracle Grid Infrastructure 12c release 1 (12.1.0.2) cluster

  • DB121WC1: An Oracle RAC 12c release 1 (12.1.0.2.0) database home running database instances

  • DB121025WC1: An Oracle RAC 12c release 1 (12.1.0.2.5) database home with no database instances (this is the patched home)

  • DB112WC1: An Oracle RAC 11g release 2 (11.2.0.4.0) database home running database instances

  • DB112045WC1: An Oracle RAC 11g release 2 (11.2.0.4.5) database home with no database instances (this is the patched home)

Further assume that you want to simultaneously move

  • Oracle Grid Infrastructure from working copy GI121WC1 to working copy GI121WC2

  • Oracle RAC Database db1 from working copy DB121WC1 to working copy DB121025WC1

  • Oracle RAC Database db2 in working copy DB112WC1 to working copy DB112045WC1

The following single command accomplishes the moves:

$ rhpctl move gihome -sourcewc GI121WC1 -destwc GI121WC2 -auto
  -dbhomes DB121WC1=DB121025WC1,DB112WC1=DB112045WC1 -targetnode test_749 -root

Note:

If you have an existing Oracle home that is not currently a working copy, then specify the Oracle home path instead of the working copy name for the source home. In the preceding example, if the Oracle home path for an existing 12.1.0.2 home is /u01/app/prod/12.1.0.2/dbhome1, then replace DB121WC1=DB121025WC1 with /u01/app/prod/12.1.0.2/dbhome1=DB121025WC1.

In the preceding command example, the Oracle Grid Infrastructure 12c release 1 (12.1.0.2) Grid home moves from working copy GI121WC1 to working copy GI121WC2, databases running on working copy DB121WC1 move to working copy DB121025WC1, and databases running on working copy DB112WC1 move to working copy DB112045WC1.

For each node in the client cluster, RHPCTL:

  1. Runs any configured pre-operation user actions for moving the Oracle Grid Infrastructure (move gihome).

  2. Runs any configured pre-operation user actions for moving the database working copies (move database).

  3. Stops services running on the node, and applies drain and disconnect options.

  4. Performs the relevant patching operations for Oracle Clusterware and Oracle Database.

  5. Runs any configured post-operation user actions for moving the database working copies (move database).

  6. Runs any configured post-operation user actions for moving the Oracle Grid Infrastructure working copy (move gihome).

5.3.3 Upgrading Oracle Grid Infrastructure Software

If you are using Rapid Home Provisioning, then you can use a single command to upgrade an Oracle Grid Infrastructure home.

Rapid Home Provisioning supports upgrades to Oracle Grid Infrastructure 12c release 1 (12.1.0.2) from 11g release 2 (11.2.0.3 and 11.2.0.4). Upgrading to Oracle Grid Infrastructure 12c release 2 (12.2.0.1) is supported from 11g release 2 (11.2.0.3 and 11.2.0.4) and 12c release 1 (12.1.0.2). The destination for the upgrade can be a working copy already provisioned or you can choose to create the working copy as part of this operation.

As an example, assume that a target cluster is running Oracle Grid Infrastructure on an Oracle Grid Infrastructure home that was provisioned by Rapid Home Provisioning. This Oracle Grid Infrastructure home is 11g release 2 (11.2.0.4) and the working copy is named accordingly.

After provisioning a working copy version of Oracle Grid Infrastructure 12c release 2 (12.2.0.1) (named GIOH12201 in this example), you can upgrade to that working copy with this single command:

$ rhpctl upgrade gihome -sourcewc GIOH11204 -destwc GIOH12201
Rapid Home Provisioning is able to identify the cluster to upgrade based on the name of the source working copy. If the target cluster was running on an unmanaged Oracle Grid Infrastructure home, then you would specify the path of the source home rather than providing a source working copy name, and you must also specify the target cluster.

Note:

You can delete the source working copy at any time after completing an upgrade. Once you delete the working copy, however, you cannot perform a rollback. Also, use the rhpctl delete workingcopy command (as opposed to rm, for example) to remove the source working copy to keep the Rapid Home Provisioning inventory correct.

5.4 Oracle Database Software Management

The Rapid Home Provisioning Server provides an efficient and secure platform for the distribution of Oracle Database Homes to targets and Rapid Home Provisioning Clients.

Also, Rapid Home Provisioning Clients have the ability to fetch database homes from the Rapid Home Provisioning Server.

Oracle Database homes are distributed in the form of working copies. Database instances (one or more) can then be created on the working copy.

Rapid Home Provisioning also has commands for managing existing databases, such as switching to a patched home or upgrading to a new database version. These are both single commands which orchestrate the numerous steps involved. Reverting to the original home is just as simple.

5.4.1 Provisioning a Working Copy of a Database Home

Use the rhpctl add workingcopy command to provision a working copy of a database home on a Rapid Home Provisioning Server, Client, or target.

  • Run the rhpctl add workingcopy command on a Rapid Home Provisioning Server, similar to the following example:
    $ rhpctl add workingcopy -image db12c -path /u01/app/dbusr/product/12.2.0/db12201
      -client client_007 -oraclebase /u01/app/dbusr/ -workingcopy wc_db122_1

    The preceding command example creates a working copy named wc_db122_1 on all nodes of the Rapid Home Provisioning Client cluster named client_007. The gold image db12c is the source of the workingcopy. The directory path locations that you specify in the command must be empty.

Related Topics

5.4.2 Creating an Oracle Database on a Working Copy

Create an Oracle Database on a working copy.

The Rapid Home Provisioning Server can add a database on a working copy that is on the Rapid Home Provisioning Server, itself, a Rapid Home Provisioning Client, or a non-Rapid Home Provisioning Client target. A Rapid Home Provisioning Client can create a database on a working copy that is running on the Rapid Home Provisioning Client, itself.

  • After you create a working copy of a gold image and provision that working copy to a target, you can create an Oracle Database on the working copy using the rhpctl add database command, similar to the following command example, which creates an Oracle Real Application Clusters (Oracle RAC) database called db12201 on a working copy called wc_db122_1:
    $ rhpctl add database –workingcopy wc_db122_1 –dbname db12201 -node client_007_node1,client_007_node2 -dbtype RAC -datafileDestination DATA007_DG
The preceding example creates an administrator-managed Oracle RAC database on two nodes in a client cluster. The data file destination is an Oracle ASM disk group that was created prior to running the command. Additionally, you can create Oracle RAC One Node and non-cluster databases.

Note:

When you create a database using Rapid Home Provisioning, the feature uses random passwords for both the SYS and SYSTEM schemas in the database and you cannot retrieve these passwords. A user with the DBA or operator role must connect to the database, locally, on the node where it is running and reset the passwords to these two accounts.

5.4.3 Patching Oracle Database Software

To patch an Oracle Database, you move the database home to a working copy which includes the patches you want to implement.

Use the rhpctl move database command to move one or more database homes to a working copy of the same database release level. The databases may be running on a working copy, or on an Oracle Database home that is not managed by Rapid Home Provisioning. The command creates a new ORACLE_HOME based on a patched image, if it does not exist, and also makes the database run from this new location instead of its current ORACLE_HOME location.
The working copy to which you are moving the database can be at a lower patch level than the current database home. This facilitates rollback in the event that you encounter any problems after moving to the higher level patched home.

Note:

Because you cannot move to a home that is not managed by Rapid Home Provisioning, rollback applies to working copies, only.
The working copy to which you are moving the database home can be at the same patch level as the original working copy. This is useful if you are moving a database home from one storage location to another, or if you wish to convert an unmanaged home to a managed home while staying at the same patch level.
Rapid Home Provisioning applies all patches out-of-place, minimizing the downtime necessary for maintenance. Rapid Home Provisioning also preserves the current configuration, enabling the rollback capability previously described. By default, Rapid Home Provisioning applies patches in a rolling manner, which reduces, and in many cases eliminates, service downtime. Use the -nonrolling option to perform patching in non-rolling mode. The database is then completely stopped on the old ORACLE_HOME, and then restarted to make it run from the newly patched ORACLE_HOME.

Note:

Part of the patching process includes applying Datapatch. When you move an Oracle Database 12c release 1 (12.1) or higher, Rapid Home Provisioning completes this step for you. When you move to a version previous to Oracle Database 12c release 1 (12.1), however, you must run Datapatch manually.

Workflow for Database Patching

Assume that a database named myorcldb is running on a working copy that was created from an Oracle Database 12c release 2 (12.2) gold image named DB122. The typical workflow for patching an Oracle Database home is as follows:
  1. Create a working copy of the Oracle Database that you want to patch, in this case DB122.
  2. Apply the patch to the working copy you created.
  3. Test and validate the patched working copy.
  4. Use the rhpctl add image command to create a gold image (for example, DB122_PATCH) from the patched working copy.

    Note:

    The working copy you specify in the preceding command must be hosted on the Rapid Home Provisioning Server in Rapid Home Provisioning-managed storage.
  5. Delete the patched working copy with the patched Oracle Database using the rhpctl delete workingcopy command.

    Note:

    Do not remove directly using the rm command or some other method, because this does not update the Rapid Home Provisioning inventory information.
  6. Create a working copy from the patched gold image, (DB122_PATCH).
  7. Move myorcldb to the working copy you just created.
  8. When you are confident that you will not need to roll back to the working copy on which the database was running at the beginning of the procedure, delete that working copy using the rhpctl delete workingcopy command.

Patching Oracle Database Using Batches

During database patching, Rapid Home Provisioning can sequentially process batches of nodes, with a number of nodes in each batch being restarted in parallel. This method maximizes service availability during the patching process. You can define the batches on the command line or choose to have Rapid Home Provisioning generate the list of batches based on its analysis of the database services running in the cluster.

5.4.4 Upgrading Oracle Database Software

There is a single Rapid Home Provisioning command for upgrading a database.

Use the rhpctl upgrade database command to upgrade to Oracle Database 12c release 1 (12.1.0.2) from Oracle Database 11g release 2 (11.2.0.3 and 11.2.0.4). Upgrading to Oracle Database 12c release 2 (12.2.0.1) is supported from Oracle Database 11g release 2 (11.2.0.3 and 11.2.0.4) and Oracle Database 12c release 1 (12.1.0.2).

Note:

The version of Oracle Grid Infrastructure on which the pre-upgrade database is running must be the same version or higher than the version of the database to which you are upgrading.
The destination for the upgrade can be a working copy already provisioned, or you can choose to create the working copy as part of this operation.
The pre-upgrade database can be running on a working copy (a managed home that was provisioned by Rapid Home Provisioning) or on an unmanaged home. In the first case, you can revert the upgrade process with a single RHPCTL command. Rapid Home Provisioning cannot revert an unmanaged home.

Note:

You can delete the source working copy at any time after completing an upgrade. Once you delete the working copy, however, you cannot perform a rollback. Also, use the rhpctl delete workingcopy command (as opposed to rm, for example) to remove the source working copy to keep the Rapid Home Provisioning inventory correct.

Related Topics

5.5 Persistent Home Path During Patching

Oracle recommends out-of-place patching when applying updates.

Out-of-place patching involves deploying the patched environment in a new directory path and then switching the software home to the new path. This approach allows for non-disruptive software distribution because the existing home remains active while the new home is provisioned, and also facilitates rollback because the unpatched software home is available if any problems are encountered after the switch.

A potential impediment to traditional out-of-place patching is that the software home path changes. While Rapid Home Provisioning manages this internally and transparently for Oracle Database and Oracle Grid Infrastructure software, some users have developed scripts which depend on the path. To address this, Rapid Home Provisioning uses a file system feature that enables separation of gold image software from the site-specific configuration changes, so the software home path is persistent throughout updates.

This feature is available with Oracle Database 12c release 2 (12.2) and Oracle Grid Infrastructure 12c release 2 (12.2) working copies provisioned in local storage. Also, if you provision an Oracle Database 12c release 2 (12.2) or an Oracle Grid Infrastructure 12c release 2 (12.2) home without using this feature, then, during a patching operation using either the rhpctl move database or rhpctl move gihome command, you can convert to this configuration and take advantage of the feature.

Note:

You can only patch Oracle Grid Infrastructure on a Rapid Home Provisioning Client with a home that is based on a persistent home path from a Rapid Home Provisioning Server.

5.6 Managing Rapid Home Provisioning Clients

Management tasks for Rapid Home Provisioning Clients include creation, enabling and disabling, creating users and assigning roles to those users, and managing passwords.

Using SRVCTL and RHPCTL, you can perform all management tasks for a Rapid Home Provisioning Client.

5.6.1 Creating a Rapid Home Provisioning Client

Users operate on a Rapid Home Provisioning Client to perform tasks such as requesting deployment of Oracle homes and querying gold images.

To create a Rapid Home Provisioning Client:

  1. If there is no highly available VIP (HAVIP) on the Rapid Home Provisioning Server, then, as the root user, create an HAVIP, as follows:
    # srvctl add havip -id id -address {host_name | ip_address}
    

    You can specify either a host name or IPv4 or IPv6 IP address. The IP address that you specify for HAVIP or the address that is resolved from the specified host name must not be in use when you run this command.

    Note:

    The highly available VIP must be in the same subnet as the default network configured in the Rapid Home Provisioning Server cluster. You can obtain the subnet by running the following command:

    $ srvctl config network -netnum network_number
  2. On the Rapid Home Provisioning Server as the Grid home owner, create the client data file, as follows:
    $ rhpctl add client -client client_cluster_name -toclientdata path
    

    RHPCTL creates the client data file in the directory path you specify after the -toclientdata flag. The name of the client data file is client_cluster_name.xml.

    Note:

    The client_cluster_name must be unique and it must match the cluster name of the client cluster where you run step 4.

  3. Copy the client data file that you created in the previous step to a directory on the client cluster that has read/write permissions to the Grid home owner on the Rapid Home Provisioning Client.
  4. Create the Rapid Home Provisioning Client by running the following command as root on the client cluster:
    # srvctl add rhpclient -clientdata path_to_client_data
       [-diskgroup disk_group_name -storage base_path]

    If you want to provision working copies to Oracle ACFS storage on this cluster, and you have already created a disk group for this purpose, then specify this disk group in the preceding command. In this case, also specify a storage path which will be used as a base path for all mount points when creating Oracle ACFS file systems for storing working copies.

    Note:

    Once you configure a disk group on a Rapid Home Provisioning Client, you cannot remove it from or change it in the Rapid Home Provisioning Client configuration. The only way you can do either (change or remove) is to completely remove the Rapid Home Provisioning Client using the srvctl remove client command, and then add it back with a different disk group, if necessary. Before you remove a Rapid Home Provisioning Client, ensure that you remove all registered users from this cluster and all working copies provisioned on this cluster.

  5. Start the Rapid Home Provisioning Client, as follows:
    $ srvctl start rhpclient
  6. Check the status of the Rapid Home Provisioning Client, as follows:
    $ srvctl status rhpclient

5.6.2 Enabling and Disabling Rapid Home Provisioning Clients

Rapid Home Provisioning Clients communicate with the Rapid Home Provisioning Server for all actions. You cannot run any RHPCTL commands without a connection to a Rapid Home Provisioning Server.

On the Rapid Home Provisioning Server, you can enable or disable a Rapid Home Provisioning Client by running the following command from the Rapid Home Provisioning Server cluster:

$ rhpctl modify client -client client_name -enabled TRUE | FALSE

To enable a Rapid Home Provisioning Client, specify -enabled TRUE. Conversely, specify -enabled FALSE to disable the client. When you disable a Rapid Home Provisioning Client cluster, all RHPCTL commands from that client cluster will be rejected by the Rapid Home Provisioning Server, unless and until you re-enable the client.

Note:

Disabling a Rapid Home Provisioning Client cluster does not disable any existing working copies on the client cluster. The working copies will continue to function and any databases in those working copies will continue to run, even if their Oracle home storage comes from the Rapid Home Provisioning Server cluster over NFS.

5.6.3 Deleting a Rapid Home Provisioning Client

Use the following procedure to delete a Rapid Home Provisioning Client.

  1. Before deleting the Rapid Home Provisioning Client, you must first delete the working copies and users on the Rapid Home Provisioning Server, as follows:
    1. Query the list of working copies that have been provisioned on the Rapid Home Provisioning Client cluster.

      Run the following command:

      $ rhpctl query workingcopy -client client_name
    2. Delete each of the working copies listed in the output of the preceding command.

      Run the following command for each working copy and specify the name of the working copy you want to delete:

      $ rhpctl delete workingcopy -workingcopy working_copy_name
    3. Query the list of users from the Rapid Home Provisioning Client cluster.

      Run the following command:

      $ rhpctl query user -client client_name
    4. Delete the users listed in the output of the preceding command, as follows:

      Run the following command and specify the name of the user you want to delete and the name of the client:

      $ rhpctl delete user -user user_name —client client_name
  2. On the Rapid Home Provisioning Client cluster, delete the client, as follows:
    1. Stop the Rapid Home Provisioning Client daemon.

      Run the following command:

      $ srvctl stop rhpclient
    2. Delete the Rapid Home Provisioning Client configuration.

      Run the following command:

      $ srvctl remove rhpclient
  3. Delete the client site configuration on the Rapid Home Provisioning Server cluster.

    Run the following command and specify the name of the client:

    $ rhpctl delete client -client client_name

5.6.4 Creating Users and Assigning Roles for Rapid Home Provisioning Client Cluster Users

When you create a Rapid Home Provisioning Client with the rhpctl add client command, you can use the -maproles parameter to create users and assign roles to them. You can associate multiple users with roles, or you can assign a single user multiple roles with this command.

After the client has been created, you can add and remove roles for users using the rhpctl grant role command and the rhpctl revoke role, respectively.

5.6.5 Managing the Rapid Home Provisioning Client Password

The Rapid Home Provisioning Client uses a password stored internally to authenticate itself with the RHP server. You cannot query this password, however, if for some reason, you are required to reset this password, then you can do so, as follows, on the RHP server cluster:

  1. Run the following command on the Rapid Home Provisioning Server cluster to generate a new password and store it in the client credential:
    $ rhpctl modify client -client client_name -password
    
  2. Run the following command on the Rapid Home Provisioning Server cluster to generate a credential file:
    $ rhpctl export client -client client_name -clientdata file_path
    

    For example, to generate a credential file for a Rapid Home Provisioning Client named mjk9394:

    $ rhpctl export client -client mjk9394 -clientdata /tmp/mjk9394.xml
    
  3. Continuing with the preceding example, transport the generated credential file securely to the Rapid Home Provisioning Client cluster and then run the following command on any node in the Rapid Home Provisioning Client cluster:
    $ srvctl modify rhpclient -clientdata path_to_mjk9394.xml
    
  4. Restart the Rapid Home Provisioning Client daemon by running the following commands on the Rapid Home Provisioning Client cluster:
    $ srvctl stop rhpclient
    $ srvctl start rhpclient

5.7 Rapid Home Provisioning Use Cases

Review these topics for step-by-step procedures to provision, patch, and upgrade your software using Rapid Home Provisioning.

Rapid Home Provisioning is a software lifecycle management solution and helps standardize patching, provisioning, and upgrade of your standard operating environment.

5.7.1 Creating an Oracle Grid Infrastructure 12c Release 2 Deployment

Provision Oracle Grid Infrastructure software on two nodes that do not currently have a Grid home, and then configure Oracle Grid Infrastructure to form a multi-node Oracle Grid Infrastructure installation.

Before You Begin

Provide configuration details for storage, network, users and groups, and node information for installing Oracle Grid Infrastructure in a response file. You can store the response file in any location on the Rapid Home Provisioning Server.

You can provision an Oracle Standalone Cluster, Oracle Application Clusters, Oracle Domain Services Cluster, or Oracle Member Clusters. Ensure that the response file has the required cluster configuration details.

Ensure that you have storage, network, and operating system requirements configured as stated in the Oracle Grid Infrastructure Installation Guide.

Procedure

  1. From the Rapid Home Provisioning Server, run the command:
    rhpctl add workingcopy -workingcopy GI122 -image GI_HOME_12201 –responsefile /u01/app/rhpinfo/GI_12201_install.rsp –root

    GI122 is the working copy based on the image GI_HOME_12201

    /u01/app/rhpinfo/GI_12201_install.rsp is the response file location.

    Provide root or sudo credentials to connect to the nodes.

    Cluster Verification Utility checks for preinstallation configuration as per requirements. Rapid Home Provisioning configures Oracle Grid Infrastructure.

Oracle Grid Infrastructure 12c release 2 is provisioned as per the settings in the same response file.

During provisioning, if an error occurs, the procedure stops and allows you to fix the error. After fixing the error, you can resume the provisioning operation from where it last stopped.

Watch a video

5.7.2 Provisioning an Oracle Database Home and Creating a Database

This procedure provisions Oracle Database 12c release 2 (12.2) software and creates Oracle Database instances.

Before You Begin

Ensure that there exists a gold image db12201 stored on the Rapid Home Provisioning Server.

Procedure

  1. From the Rapid Home Provisioning Server, provision the Oracle Database home software:
    rhpctl add workingcopy -image db12201 -path /u01/app/dbusr/product/12.2.0/db12201
      -client client_001 -oraclebase /u01/app/dbusr/ 
    -workingcopy db122 
    The command provisions the working copy db122 to the specified path on the cluster client_001, from the image db12201 .
  2. Create the database instance:
    rhpctl add database -workingcopy db122 -dbname db -dbtype RAC
    The command creates an Oracle RAC database instance db . You can use the add database command repeatedly to create more instances on the working copy.

Watch a video

5.7.3 Upgrading to Oracle Grid Infrastructure 12c Release 2

This procedure uses Rapid Home Provisioning to upgrade your Oracle Grid Infrastructure cluster from 11g release 2 (11.2.0.4) to 12c release 2 (12.2).

Before You Begin

To upgrade to Oracle Grid Infrastructure 12c release 2 (12.2.0.1), your source must be Oracle Grid Infrastructure 11g release 2 (11.2.0.3 or 11.2.0.4), or Oracle Grid Infrastructure 12c release 2 (12.1.0.2).

Ensure that groups configured in the source home match those in the destination home.

Ensure that you have an image GI_HOME_12201 of the Oracle Grid Infrastructure 12c release 2 (12.2.0.1) software to provision your working copy.

GI_11204 is the active Grid Infrastructure home on the cluster being upgraded. It is a working copy because in this example, Rapid Home Provisioning provisioned the cluster. Rapid Home Provisioning can also upgrade clusters whose Grid Infrastructure homes are unmanaged that is, homes that Rapid Home Provisioning did not provision.

Procedure

  1. Provision a working copy of the Oracle Grid Infrastructure 12c release 2 (12.2.0.1) software:
    rhpctl add workingcopy -workingcopy GI122 -image GI_HOME_12201 -root root

    GI122 is the working copy based on the image GI_HOME_12201.

  2. Upgrade your target cluster to the GI122 working copy:
    rhpctl upgrade gihome -sourcewc GI11204 -destwc GI122
    Rapid Home Provisioning identifies the cluster to upgrade based on the name of the source working copy, and upgrades to the working copyGI122.

5.7.4 Patching Oracle Grid Infrastructure Without Changing the Grid Home Path

This procedure explains how to patch Oracle Grid Infrastructure without changing the Grid home path.

Before You Begin

  • Ensure that the gold image containing the Grid home is imported and exists on the Rapid Home Provisioning Server.

  • Ensure that the directory you provide in the ­path option is not an existing directory.

  • If you are moving from one OLFS-compliant Grid home to another, then ensure that the image GIHOME_12201_LPM with Oracle Layered File System (OLFS) enabled, is available.

Procedure for Patching

  1. To patch a Grid home and move it to Oracle Layered File System (OLFS), from the Rapid Home Provisioning Server, run one of the following commands:
    1. To patch a Grid home managed by Rapid Home Provisioning (the source working copy exists because the Oracle home is managed by Rapid Home Provisioning):
      [GRID:grid@testuser:/grid_home]> rhpctl move gihome -srcwc GI_HOME_12201
       -destwc GI_HOME_12201_PSU1 -aupath  /u01/app/orabase/product/12.2.0.1/aupath
      -agpath /u01/app/orabase/product/12.2.0.1/aupath -image -path /u01/app/orabase/product/12.2.0.1/grid

      GI_HOME_12201 is the source working copy of Grid home to be patched and GI_HOME_12201_PSU1 is the working copy of the Grid home software with the patches applied.

      /u01/app/orabase/product/12.2.0.1/agpath and /u01/app/orabase/product/12.2.0.1/aupath are the logical paths that resolve to the physical path /u01/app/orabase/product/12.2.0.1/grid when the Grid home is patched.

    2. To patch an unmanaged Grid home (the source working copy does not exist because the Oracle home is not managed by Rapid Home Provisioning):
      [GRID:grid@testuser:/grid_home]> rhpctl move gihome -sourcehome /u01/app/grid
       -destwc GI_HOME_12201_PSU1 -aupath /u01/app/orabase/product/12.2.0.1/aupath 
      -agpath /u01/app/orabase/product/12.2.0.1/agpath -image -path /u01/app/orabase/product/12.2.0.1/grid

      /u01/app/grid is the path of the Grid home to be patched and GI_HOME_12201_PSU1 is the working copy of the Grid home software with the patches applied.

      /u01/app/orabase/product/12.2.0.1/agpath and /u01/app/orabase/product/12.2.0.1/aupath are the logical paths that resolve to the physical path /u01/app/orabase/product/12.2.0.1/grid when the Grid home is patched.

  2. To patch a Grid home that is compliant with Oracle Layered File System (OLFS), from the Rapid Home Provisioning Server, run the following:
    [GRID:grid@testuser:/grid_home]> rhpctl move gihome -sourcewc gihome12201_lpm
     -destwc gihome12201_psu1_lpm -aupath /u01/app/orabase/product/12.2.0.1/aupath 
    -image GIHOME_12201_LPM

    The Grid home running from the source working copy gihome12201_lpm is moved to the working copy gihome12201_psu1_lpm, based on the image GIHOME_12201_LPM and contains the patches.

5.7.5 Patching Oracle Grid Infrastructure and Oracle Databases Simultaneously

This procedure patches Oracle Grid Infrastructure and Oracle Databases on the cluster to the latest patch level without cluster downtime.

Before You Begin

In this procedure, Oracle Grid Infrastructure 12c release 2 (12.2.0.1) is running on the target cluster. Working copy GI_HOME_12201_WCPY is the active Grid home on this cluster. Working copy DB_HOME_12201_WCPY runs an Oracle RAC 12c release 2 (12.2.0.1) Database with running database instance db1. Working copy DB_HOME_12102_WCPY runs an Oracle RAC 12c release 1 (12.1.0.2) Database with running database instance db2

Ensure that you have images GI_HOME_12201_PSU1, DB_HOME_12201_PSU1, DB_HOME_12102_PSU5 with the required patches for Oracle Grid Infrastructure and Oracle RAC Database on the Rapid Home Provisioning Server.

The groups configured in the source home must match with those in the destination home.

Procedure

  1. Prepare target Oracle homes as follows:
    1. Provision software-only Grid home on the cluster to be patched:
      rhpctl add workingcopy -workingcopy GI_HOME_12201_PATCHED_WCPY 
      -image GI_HOME_12201_PSU1 –client CLUSTER_005 -softwareonly
    2. Provision each release Database home, without database instances, to be patched:
      rhpctl add workingcopy -workingcopy DB_HOME_12201_PATCHED_WCPY 
      -image DB_HOME_12201_PSU1
      rhpctl add workingcopy -workingcopy DB_HOME_12102_PATCHED_WCPY 
      -image DB_HOME_12102_PSU5
  2. Patch Oracle Grid Infrastructure and all Oracle RAC Databases on node1 as follows:
    rhpctl move gihome -sourcewc GI_HOME_12201_WCPY -destwc GI_HOME_12201_PATCHED_WCPY -auto 
    -dbhomes DB_HOME_12102_WCPY=DB_HOME_12102_PATCHED_WCPY,DB_HOME_12201_WCPY=DB_HOME_12201_PATCHED_WCPY -targetnode node1 -root

    When you run the command, you move your active Oracle Grid Infrastructure from working copy GI_HOME_12201_WCPY to GI_HOME_12201_PATCHED_WCPY, Oracle RAC Database db1 from DB_HOME_12201_WCPY to DB_HOME_12201_PATCHED_WCPY, and Oracle RAC Database db2 from DB_HOME_12102_WCPY to DB_HOME_12102_PATCHED_WCPY.

5.7.6 Patching Oracle Database 12c Release 1 Without Downtime

This procedure explains how to patch Oracle Database 12c release 1 (12.1.0.2) with the latest patching without bringing down the database.

Before You Begin

You have an Oracle Database db12102 that you want to patch to the latest patch level.

Ensure that the working copy db12102_psu based on the image DB12102_PSU contains the latest patches and is available.

Procedure

From the Rapid Home Provisioning Server, run one of the following commands as per your source and destination database:

  1. To patch an Oracle Database home managed by Rapid Home Provisioning, and there exist working copies of the source and destination databases, run:
    rhpctl move database -sourcewc db12102 -patchedwc db12102_psu

    db12102 is the source working copy of the database being patched

    db12102_psu is the working copy of the Oracle Database software with patches applied, based on the image DB12102_PSU.

  2. To patch an unmanaged Oracle Database home (source working copy does not exist because the Oracle home is not managed by Rapid Home Provisioning), run:
    rhpctl move database -sourcehome /u01/app/orabase/product/12.1.0.2/dbhome_1
     -patchedwc db12102_psu -targetnode node1

    targetnode specifies the node on which the database to be upgraded is running, because the source Oracle Database is on a 12.1.0.2 cluster.

    /u01/app/orabase/product/12.1.0.2/dbhome_1 is the path of the database being patched

    db12102_psu is the working copy of the Oracle Database software with patches applied, based on the image DB12102_PSU.

    Use the saved gold image for standardized patching of all your databases of release 12c release 1 to the same patch level.
  3. If for some reason, you want to rollback the patches applied to an unmanaged Oracle Database home, run:
    rhpctl move database -patchedwc db12102_psu 
    -sourcehome /u01/app/orabase/product/12.1.0.2/dbhome_1
     targetnode node1

For all Oracle Databases, you can also specify these additional options with the move database command:

  • -keepplacement: For admin-managed Oracle RAC Databases (not Oracle RAC One Node Database), Rapid Home Provisioning retains the services on the same nodes after the move.

  • -disconnect: Disconnects all sessions before stopping or relocating services.

  • -drain_timeout: Specify the time, in seconds, allowed for resource draining to be completed for planned maintenance operations. During the draining period, all current client requests are processed, but new requests are not accepted. This option is available only with Oracle Database 12c release 2 (12.2) or later.

  • -stopoption: Stops the database.

  • -nodatapatch: Ensures datapatch is not run for databases you are moving.

Watch a video

5.7.7 Upgrading to Oracle Database 12c Release 2

This procedure describes how to upgrade an Oracle Database from 11.2 to 12c release 2 with a single command, using Rapid Home Provisioning, both for managed and unmanaged Oracle homes.

Before you Begin

  • To upgrade to Oracle Database 12c release 2 (12.2.0.1), your source database must be either Oracle Database 11g release 2 (11.2.0.3 or 11.2.0.4), or Oracle Database 12c release 1 (12.1.0.2).

  • Oracle Grid Infrastructure on which the pre-upgrade database is running must be of the same release or later than the database release to which you are upgrading.

  • The source Oracle home to be upgraded can be a managed working copy, that is an Oracle home provisioned using Rapid Home Provisioning, or an unmanaged home, that is, an Oracle home not provisioned using Rapid Home Provisioning. If you are upgrading an unmanaged Oracle home, provide the complete path of the database for upgrade.

Procedure to Upgrade Oracle Database using Rapid Home Provisioning

  1. From the Rapid Home Provisioning Server, run one of the following commands as per your source and destination database:
    1. To upgrade an Oracle home managed by Rapid Home Provisioning, and there exist working copies of the source and destination databases, run:
      [GRID:grid@testuser:/grid_home]>  rhpctl upgrade database -dbname test_database 
      -sourcewc db112 -destwc db122 -root

      test_database is the name of the database being upgraded.

      db112 is the source working copy of the pre-upgrade database.

      db122 is the working copy of the upgraded Oracle Database software.

    2. To upgrade an unmanaged Oracle home (source working copy does not exist because the Oracle home is not managed by Rapid Home Provisioning), run:
      [GRID:grid@testuser:/grid_home]>  rhpctl move database -sourcehome 
      /u01/app/orabase/product/11.2.0/dbhome_1 -destwc db122 -targetnode node1 -root

      /u01/app/orabase/product/11.2.0/dbhome_1 is the path of the database being upgraded.

      db122 is the working copy of the upgraded Oracle Database software.

      targetnode specifies the node on which the database to be upgraded is running, because the source Oracle Database is on a 11.2.0.4 cluster.

The upgraded database is now managed by Rapid Home Provisioning. You can ensure that your database is patched to the latest level, using Rapid Home Provisioning.

Note:

During upgrade, if an error occurs, the procedure stops and allows you to fix the error. After fixing the error, you can resume the upgrade operation from where it last stopped.

Watch a video

5.7.8 Adding a Node to a Cluster and Scaling an Oracle RAC Database to the Node

To your two-node cluster, you can add a new node, and extend an Oracle RAC Database to the new node, using Rapid Home Provisioning.

Before You Begin

In this procedure, Oracle Grid Infrastructure 12c release 2 (12.2.0.1) is running on the cluster. Working copy GI_HOME_12202_WCPY is the active Grid home on this cluster.

The Oracle RAC Database home runs on the working copy DB_HOME_12202_WCPY .

Ensure that you have storage, network, and operating system requirements configured for the new node as stated in Oracle Grid Infrastructure Installation Guide.

Procedure

  1. From the Rapid Home Provisioning Server, run the following command to add a node to the existing Oracle Grid Infrastructure working copy:
    rhpctl addnode gihome -workingcopy GI_HOME_12202_WCPY -newnodes -root n3:n3-vip -root
    The command extends the cluster by adding node3.
  2. Add instances to the administrator-managed Oracle RAC Database on the new node:
    rhpctl addnode database -workingcopy DB_HOME_12202_WCPY -dbname db321 -node n3 -root
    The command extends the database home on the node3 and creates database db321 on this node.

Watch a video

5.7.9 Adding Gold Images for Rapid Home Provisioning

Create gold images of software home and store them on the Rapid Home Provisioning Server, to use later to provision Oracle homes.

Before You Begin

The Oracle home to be used for creating the gold image can be on the Rapid Home Provisioning Server, or Rapid Home Provisioning Client, or any target machine that the Rapid Home Provisioning Server can communicate with.

Procedure

Create gold images of Oracle homes in any of the following ways and store them on the Rapid Home Provisioning server:

  1. Import an image from an installed Oracle home on the Rapid Home Provisioning Server:
    rhpctl import image -image db12201 -path /share/software/122/dbhome -imagetype ORACLEDBSOFTWARE 

    The gold image of imagetype Oracle Database 12c release 2 software is created and stored on the Rapid Home Provisioning Server.

    You can also create by gold images of Oracle Grid Infrastructure or any other software by specifying -imagetype as ORACLEGISOFTWARE or SOFTWARE respectively.

  2. Import an image from an installed Oracle home on a Rapid Home Provisioning Client by running the following command from the Rapid Home Provisioning Client:
    rhpctl import image -image db12201 -path /u01/app/dbusr/product/12.2.0/

    The command creates and adds the image db12201 based on the local Oracle home installed in the specified path.

Note:

You cannot directly use images as software homes. Use images to create working copies of software homes.

5.7.10 Creating User Action to Deploy a Web Server

You can install and configure any type of software using Rapid Home Provisioning user actions. Review this procedure to automate deployment of Apache Web Server using Rapid Home Provisioning.

Rapid Home Provisioning supports creation of work flows to deploy and manage all types of software.
  1. Create the script to install Apache Web server:
    1. On the Rapid Home Provisioning Server, download and extract the Apache Web server installation kit.
    2. Create the script to install, configure, and start the Apache Web server.
  2. Register the script as a user action with Rapid Home Provisioning. Run the following command from the Rapid Home Provisioning Server:
    rhpctl useraction -useraction apachestart 
    -actionscript /user1/useractions/apacheinstall.sh 
    -post -optype ADD_WORKINGCOPY -onerror ABORT

    The command adds the apachestart user action for the action script stored in the specified directory. As per the specified properties, the user action runs after the ADD_WORKINGCOPY operation and aborts if there is any error.

  3. Create an image type and associate the user action with the image type:
    rhpctl add imagetype -imagetype apachetype -basetype SOFTWARE 
    -useraction "apachestart"

    The command creates a new image type called apachetype, a derivative of the basic image type SOFTWARE with an associated user action apacherstart.

  4. Create a gold image of the image type:
    rhpctl import image -image apacheinstall -path /user1/apache2219_kit/ 
    -imagetype apachetype

    The command creates a gold image apacheinstall with the script for Apache Web server installation, in the specified path based on the imagetype created earlier.

    To view the properties of this image, run the rhpctl query image -image apacheinstall command.
  5. Deploy a working copy of the gold image on the target:
    rhpctl add workingcopy -workingcopy apachecopy -image apacheinstall 
    -path /user1/apacheinstallloc -sudouser user1 
    -sudopath /usr/local/bin/sudo -node node1 -user user1 
    -useractiondata "/user1/apachehome:1080:2.2.19

    Rapid Home Provisioning provisions the software to the target and runs the script apachestart specified in the user action. You provide the Apache Web server configuration details such as port number with the useractiondata option. If the target is a Rapid Home Provisioning Client, then you need not specify sudo credentials.

You can similarly, create other user actions and automate installation and configuration of software homes using Rapid Home Provisioning.