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
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
-
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)
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:
Related 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.
Related Topics
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 therhpctl 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 theTESTABLE
orRESTRICTED
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.
Related Topics
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.
-
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
. -
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. -
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 theDB12IMAGE
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 |
|
ADD_WORKINGCOPY |
|
ADD_DATABASE |
|
DELETE_WORKINGCOPY |
|
DELETE_DATABASE |
|
MOVE_GIHOME |
|
MOVE_DATABASE |
|
UPGRADE_GIHOME |
|
UPGRADE_DATABASE |
|
ADDNODE_DATABASE |
|
DELETENODE_DATABASE |
|
ADDNODE_GIHOME |
|
DELETENODE_GIHOME |
|
ADDNODE_WORKINGCOPY |
|
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 |
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 |
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:
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
Related Topics
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.
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.
Related Topics
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.
-
Uses the value of the user group from the command line, if provided, for OSDBA or OSASM, or both.
-
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 toRHP_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 toRHP_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 toLOCAL
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 useNFS
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.
rhpctl add workingcopy
command to install and configure Oracle Grid Infrastructure, and to enable simple and repeatable creation of standardized deployments.
-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.
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.
This section includes the following topics:
Related 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.
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.
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 torm
, 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.
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.
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:
-
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, nodesn2
andn3
form the second batch, and noden4
forms the last batch. The command defines the source working copy aswc1
and the patched (destination) working copy aswc2
.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.
-
-
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
andn3
). The command terminates by reporting that the second batch was successfully patched. -
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-skip
parameters. 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 thatdatapatch
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 copyGI121WC2
-
Oracle RAC Database
db1
from working copyDB121WC1
to working copyDB121025WC1
-
Oracle RAC Database
db2
in working copyDB112WC1
to working copyDB112045WC1
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:
-
Runs any configured pre-operation user actions for moving the Oracle Grid Infrastructure (
move gihome
). -
Runs any configured pre-operation user actions for moving the database working copies (
move database
). -
Stops services running on the node, and applies drain and disconnect options.
-
Performs the relevant patching operations for Oracle Clusterware and Oracle Database.
-
Runs any configured post-operation user actions for moving the database working copies (
move database
). -
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
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 therhpctl 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.
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.
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.
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.
Note:
Because you cannot move to a home that is not managed by Rapid Home Provisioning, rollback applies to working copies, only.-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 namedmyorcldb
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:
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.
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.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 therhpctl 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:
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.
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.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
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
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
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
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
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:
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
: Ensuresdatapatch
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
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
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:
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.