image Commands

Use commands with the image keyword to add, delete, import, and manage gold images.

rhpctl add image

Use the rhpctl add image command to create an image from an existing working copy and add it to the list of existing images on the Fleet Patching and Provisioning Server configuration.

Syntax

rhpctl add image -image image_name -workingcopy working_copy_name
   [-imagetype image_type] [-series series_name] [-state {TESTABLE | RESTRICTED | PUBLISHED}]

Parameters

Table A-27 rhpctl add image Command Parameters

Command Option Description
-image image_name

Specify the name of the image that you want to add.

-workingcopy working_copy_name

Specify the name of the working copy from which to create the image.

Note:

The working copy must be stored on ACFS storage for this command to work. Oracle FPP returns an error if the working copy is stored on a local storage device.
-imagetype image_type

Specify the software type. ORACLEDBSOFTWARE (default) for Oracle Database software, ORACLEGISOFTWARE for Oracle Grid Infrastructure software, ORACLEGGSOFTWARE for Oracle GoldenGate software, LINUXOS for Linux operating system ISO, or SOFTWARE for all other software. If you use custom image types, then specify the name of your image type.

-series series_name

If you want to add an image to an image series, then specify the name of an image series.

-state {TESTABLE | RESTRICTED | PUBLISHED}

Specify the state of the image.

Usage Notes

See Also:

Patching Oracle Database for details about how to use this command in the workflow for creating patched Oracle Database software homes

Example

An example of this command is:

$ rhpctl add image -image DB12201_PATCH -workingcopy temp_wcpy_db12201_patch

rhpctl allow image

Allows access to an image by a user or a role.

Syntax

rhpctl allow image -image image_name {-user user_name [-client cluster_name]
    | -role role_name}

Parameters

Table A-28 rhpctl allow image Command Parameters

Parameter Description
-image image_name

Specify the name of the image to which you want to allow access.

-user user_name [-client cluster_name | -role role_name

Specify the either of the following:

  • A user for which you want to allow access to the image and, optionally, the cluster name of the client cluster with the user.

  • The role for which you want to allow access to the image.

Examples

To allow access to an image named PRODIMAGE:
$ rhpctl allow image -image PRODIMAGE -user mjk -client GHC1

rhpctl delete image

Deletes a specific image.

Syntax

rhpctl delete image -image image_name [-schedule {timer_value | NOW}]

Usage Notes

  • Specify the name of the image you want to delete

  • Optionally, you can use the -schedule parameter to schedule a time to run this operation, in ISO-8601 format, as in the following example:
    2018-07-25T19:13:17+05

    If you choose to use this parameter, then you must run this command on the Fleet Patching and Provisioning Server. If NOW is specified, then the job is scheduled immediately.

  • This command will fail if the image belongs to one or more series

  • This command will fail if there are any provisioned working copies based on this image

Example

The following example deletes an image named PRODIMAGEV0:

$ rhpctl delete image -image PRODIMAGEV0

rhpctl deploy image

Deploys an image to a specific node in a client cluster.

Syntax

rhpctl deploy image -image image_name [-targetnode node_name
  {-sudouser sudo_user_name -sudopath sudo_binary_path | -root}]

Parameters

Table A-29 rhpctl deploy image Command Parameters

Parameter Description
-image image_name

Specify the name of the image you want to deploy.

-targetnode node_name

Optionally, you can specify the name of a node to which you want to deploy the image. This parameter is required if the node hosting the home is not a Fleet Patching and Provisioning Client.

-sudouser sudo_user_name -sudopath sudo_binary_path | -root]

If you use the -targetnode parameter, then you must specify either sudo or root to perform super user operations.

Usage Notes

You can only run this command from a Fleet Patching and Provisioning Server.

Example

The following example deploys an Oracle Database Appliance image to a node:

$ rhpctl deploy image -image ODA1 -targetnode racgbox1 -root

rhpctl disallow image

Disallows access to an image by a user or a role.

Syntax

rhpctl disallow image -image image_name {-user user_name [-client client_name]
    | -role role_name}

Parameters

Table A-30 rhpctl disallow image Command Parameters

Parameter Description
-image image_name

Specify the name of the image to which you want to disallow access.

-user user_name [-client client_name | -role role_name

Specify either of the following:

  • A user for which you want to disallow access to the image and, optionally, the cluster name of the client cluster with the user.

  • The role for which you want to disallow access to the image.

Examples

To disallow access to an image:
$ rhpctl disallow image -image PRODIMAGE -user mjk -client GHC1

rhpctl import image

Creates an image on the Fleet Patching and Provisioning Server.

Use the rhpctl import image command to create an image by copying the entire software contents from the specified path to the Oracle Fleet Patching and Provisioning Server.

Syntax

rhpctl import image -image image_name {-path path | -zip zipped_home_path 
   | -location zipped_home_path | -notify [-cc user_list]} 
   [-imagetype image_type] [-pathowner user_name] [-version software_version] 
   [-state {TESTABLE | RESTRICTED | PUBLISHED}] [-location zipped_home_path] [-client cluster_name]
   [-targetnode node_name [-sudouser sudo_user_name -sudopath sudo_binary_path | 
   -root | cred cred_name | -auth plugin_name [-arg1 name1:value1 [-arg2 name2:value2 ... ]]]] 
   [-useractiondata user_action_data] [] [-series series_name]

Parameters

Table A-31 rhpctl import image Command Parameters

Parameter Description
-image image_name

Specify the name of the image that you want to add.

-path path

Specify the absolute path location of the software home that you want to import. For Oracle Database images, this is the ORACLE_HOME.

-zip zipped_home_path

Specify the absolute path of the compressed software home to be imported (a ZIP or TAR file).

Note:

Do not use this option when importing an image from another platform. This option works only on the same platform, for example, if you are on a Linux platform, then you can use the -zip option to import an image only from another Linux system.
-location zipped_home_path

Specify the location of the compressed image file on the target.

-notify [-cc users_list]

Send an email notification.

Specify a list of users to whom email notifications is sent (in addition to the owner of working copy).

-imagetype image_type

Specify the software type. Use ORACLEDBSOFTWARE (default) for Oracle database software, ORACLEGISOFTWARE for Oracle Grid Infrastructure software, ODAPATCHSOFTWARE for engineered systems (Oracle Data Appliance), EXAPATCHSOFTWARE for Oracle Exadata software, or SOFTWARE for all other software. For a custom image type, use the image type name.

-version software_version

Optionally, you can specify the version of the software you are importing.

-pathowner user_name

Specify the user with read access to the files and directories under the specified path.

Note: This parameter is applicable only for non-Oracle database software homes.

-state {TESTABLE | RESTRICTED | PUBLISHED

Specify whether the state of the image is testable, restricted, or published.

-location zipped_home_path

Location of the compressed image file on the target.

-client cluster_name

Specify the name of the client cluster.

-targetnode node_name

Specify the name of the node from which you want to import the image. This parameter is required if the node hosting the home is not an Fleet Patching and Provisioning Client.

-sudouser sudo_user_name -sudopath sudo_binary_path | -root]

If you use the -targetnode parameter, then you must specify either sudo or root to perform super user operations.

-auth plugin-name [-arg1 name1:value1 [-arg2 name2:value2 ...]]

Use an authentication plugin to access the remote node.

Optionally provide a list of arguments to the plugin.

-useractiondata user_action_data

Optionally, you can pass a value to the useractiondata parameter of the user action script.

-series series_name

The name of the series.

Usage Notes

  • You can only run this command on a Fleet Patching and Provisioning Server.

  • When you import an Oracle Database or Oracle Grid Infrastructure software home, the version of the home must be one of the versions that Fleet Patching and Provisioning supports for provisioning and patching.

Examples

The following example imports an image:

$ rhpctl import image -image PRODIMAGEV1 -path /u01/app/product/12.1.0/dbhome -pathowner orcl

The following example imports an engineered system image:

$ rhpctl import image -image ODA1 -imagetype ODAPATCHSOFTWARE -path /tmp/ODAPatchBundle -version 12.1.2.8.0

rhpctl instantiate image

Requests copies of gold images from a peer Fleet Patching and Provisioning Server.

Syntax

rhpctl instantiate image -server server_cluster_name {-image image_name
  | -series series_name | -imagetype image_type | -all}

Parameters

Table A-32 rhpctl instantiate image Command Parameters

Parameter Description
-server server_cluster_name

Specify a Fleet Patching and Provisioning Server cluster from which you want to request images.

-image image_name | -series series_name | -imagetype image_type | -all

You can request copies of gold images from a peer Fleet Patching and Provisioning Server, specifically, by image name, series name, or image type. Alternatively, you can use the -all parameter to request copies of all gold images from the peer Fleet Patching and Provisioning server.

If you choose to request images by image type, then specify ORACLEDBSOFTWARE (default) for Oracle Database software, ORACLEGISOFTWARE for Oracle Grid Infrastructure software, ORACLEGGSOFTWARE for Oracle GoldenGate software, and SOFTWARE for all other software. For a custom image type, use the image type name.

Usage Notes

  • User actions associated with an image being copied are not themselves copied.

  • Groups configuration of a gold image is replicated in copies sent to peers.

  • Copies of gold images are in the PUBLISHED state.

rhpctl modify image

Modifies the configuration details of an image.

Syntax

rhpctl modify image -image image_name -imagetype image_type

Parameters

Table A-33 rhpctl modify image Command Parameters

Parameter Description
-image image_name

Specify the name of the image that you want to modify.

-imagetype image_type

You can modify the software type. Use ORACLEDBSOFTWARE (default) for Oracle database software, ORACLEGISOFTWARE for Oracle Grid Infrastructure software, or SOFTWARE for all other software. For a custom image type, use the image type name.

rhpctl query image

Displays the configuration of an existing image.

Syntax

rhpctl query image {[[-image image_name [-dbtemplate]] | [[-imagetype image_type]
  [-version version] [-platform platform]]] 
  [-server server_cluster_name | -client client_name | -local] | -drift}
  [-rhpserver rhps_regex]

Parameters

Table A-34 rhpctl query image Command Parameters

Parameter Description
-image image_name [-dbtemplate]

Specify the name of the image you want to query.

Optionally, you can use the -dbtemplate parameter to display template file names in the default template directory.

-imagetype image_type

Specify the software type. Use ORACLEDBSOFTWARE (default) for Oracle database software, ORACLEGISOFTWARE for Oracle Grid Infrastructure software, or SOFTWARE for all other software. For a custom image type, use the image type name.

–version version

Specify the version of the image software you are querying.

-platform platform

Specify the operating system platform to which the image corresponds.

-server server_cluster_name

Specify the name of the server cluster to which the image corresponds.

-client client_name

If this paramenter is used with the -image option, the command checks if the specified client has the given image instantiated on it. Otherwise, the use of the parameter lists the images instantiated on the given client.

-local

List the images stored on the current client.

-drift

List the the bug fixes not included in the golden image.

-rhpserver rhps_regex

Specify a regular expression to match the cluster name of the servers where the operation must be executed.

Usage Notes

If you use the -version parameter, then the version must have five fields, such as 12.1.0.2.4.

If you use the -platform parameter, then you can use Linux_AMD64, Linux_S390, Linux_PPC, IBM_AIX_PPC64, HP_IA64, Linux_Itanium, Solaris_SPARC64, Linux_LOP, and Intel_Solaris_AMD64

The -rhpserver parameter indicates where the operation should be executed and the -server parameter indicates what the operation should be about. When -rhpserver is used, the command is executed on the servers whose name matches the regular expression provided. When -server is used, the command is about the server provided. For example:

  • The following command executes locally and lists the images that have been replicated to peerA
    rhpctl query image -server peerA
  • The following command executes on peerA and lists the images have been configured on peerA
    rhpctl query image -rhpserver peerA 
  • The following command executes on all servers and lists the images that each server has replicated on peerA
    rhpctl query image -server peerA -rhpserver .+' 

When issuing a command for a peer server using the -rhpserver option, the user running the command must be an existing user of the peer server and the user must have a required role. To enable a user from a peer server to run commands on the local server, run the rhpctl grant role command to grant a required role to the peer server user and to specify the cluster name of the peer server to which the user belongs. For example:

$ rhpctl grant role -role role_name -user user_name -client cluster_name

To add multiple users, run the following command:

$ rhpctl grant role -client cluster_name -maproles role=user_name[+user_name...][,role=user_name[+user_name...]...]

For information about granting roles with RHPCTL, refer to rhpctl grant role

rhpctl promote image

Promotes an image.

Syntax

rhpctl promote image -image image_name -state {TESTABLE | RESTRICTED | PUBLISHED}

Parameters

Table A-35 rhpctl promote image Command Parameters

Parameter Description
-image image_name

Specify the name of the image that you want to promote.

-state {TESTABLE | RESTRICTED | PUBLISHED}

Specify one of the following as the name of the state of the image:

  • TESTABLE:
  • RESTRICTED:
  • PUBLISHED:

Example

To promote an image named PRODIMAGE:
$ rhpctl promote image -image PRODIMAGE -state RESTRICTED

rhpctl uninstantiate image

Stops updates for previously requested images from a peer Fleet Patching and Provisioning Server.

Syntax

rhpctl uninstantiate image -server server_cluster_name {-image image_name
  | -series series_name | -imagetype image_type | -all}

Parameters

Table A-36 rhpctl uninstantiate image Command Parameters

Parameter Description
-server server_cluster_name

Specify a Fleet Patching and Provisioning Server cluster from which you want to stop updates.

-image image_name | -series series_name | -imagetype image_type | -all

You can updates from a peer Fleet Patching and Provisioning Server, specifically, by image name, series name, or image type. Alternatively, you can use the -all parameter to stop updates from the peer Fleet Patching and Provisioning server.

If you choose to stop updates by image type, then specify ORACLEDBSOFTWARE (default) for Oracle Database software, ORACLEGISOFTWARE for Oracle Grid Infrastructure software, ORACLEGGSOFTWARE for Oracle GoldenGate software, and SOFTWARE for all other software. For a custom image type, use the image type name.