9 Managing OMCe with the PaaS CLI

As an alternative to using the PaaS Service Manager UI and Oracle Cloud Stack Manager UI to manage the lifecyle of your OMCe service instance and stack, respectively, you can perform the same lifecycle operations with the PaaS Service Manager command line interface (CLI). The CLI is a thin wrapper over PaaS REST APIs that you can use to run command to create, start, stop, apply patches, backup, restore, and delete a service.

Before you can use the PaaS CLI, you must have the cURL command-line tool and Python 3.3 or later. To get the PaaS CLI, you’ll have to perform the following actions:

Action How Do I Do It?

Download the CLI

To download from the Oracle Cloud User Interface, see Downloading the CLI from the Oracle Cloud User Interface in the PaaS Service Manager Command Line Interface Reference.

To download using a REST API, see Downloading the CLI by Using the REST API in the PaaS Service Manager Command Line Interface Reference.

Install the CLI

See Installing the Command Line Interface in the PaaS Service Manager Command Line Interface Reference.

Configure the CLI

See Configuring the Command Line Interface in the PaaS Service Manager Command Line Interface Reference.

Some common Oracle Cloud Stack Manager commands are listed here.

Stack Command Description

psm stack create

Create a stack.

psm stack delete

Delete a stack.

psm stack start

psm stack stop

Start or stop all resources in the specified stack.

psm stack describe

List detailed information about a stack.

psm stack list

List all stack instances in the identity domain.

psm stack resume

Resume creating a stack. Use this command when creation of a stack was stopped when an error occurred and the stack creation wasn’t rolled back.

psm stack operation-status

List detailed information about a stack operation, particularly a stack creation operation.

Some common service commands are listed here.

Service Instance Command Description

psm omce services

List all active service instances within your identity domain. Set the output level to verbose to see all the details about each instance.

psm omce service

Display the details for a specified service.

psm omce start

psm omce stop

Start or stop the OMCe service instance.

psm omce restore

Restore a OMCe service instance from the specified backup.

psm omce backup

Initiate an on-demand backup for the OMCe service instance.

psm omce patch

Apply a patch to the specified OMCe service instance.

psm omce available-patches

List all available patches for an OMCe service instance.

psm omce applied-patches

List all applied patches to an OMCe service instance.

psm omce rollback

Rollback a patch for the specified OMCe service instance.

psm omce restart

Restart an OMCe administration server.

Replace omce with the appropriate service type from this list:

  • BOTSCFG

  • BOTSINT

  • BOTSCON

  • BOTSPIP

  • BOTSMGM

  • OEHCS

  • CXACFG

  • CXAPOD

  • CXAANA

  • CXACOL

  • MobileCorePOD

  • MobileCCC

See Oracle Cloud PaaS Service Manage Command Line Interface Reference for a complete list of OMCe commands, their syntax, and parameters.

Monitor Your OMCe Stack with the CLI

You can monitor the OMCe stack with the Oracle Cloud Stack Manager console or you can monitor it from the command line:
  1. Run the stack list command.
    Use the output to identify the names of your cloud stacks. For example:
    psm stack list
    
    {
      "identityDomain":"MyIdentityDomain",
      "stacks":[
         {
              "serviceName":"MyStack1",
              "description":"",
              "serviceURI":"http://example.org:7200//paas/api/v1.1/instancemgmt/
    MyIdentityDomain/services/stack/instances/MyStack1",
              "state":"READY",
              "stateDetail":"Ready",
              "identityDomain":"MyIdentityDomain",
              "createdBy":"joe@example.com",
              "creationJobId":"80161",
              "creationTime":"2016-07-26T15:48:18.366+0000",
              "lastModifiedTime":"2016-07-26T15:48:18.365+0000",
              "template":{
              "templateName":"MyTemplate",
              "templateVersion":"1.0.0",
              "templateURI":"http://example.org:7200//paas/api/v1.1/
    instancemgmt/MyIdentityDomain/templates/cst/instances/MyTemplate/export?
    version=1.0.0"
              }
           },
           {
              "serviceName":"MyStack2",
              "description":"",
              "serviceURI":"http://example.org:7200//paas/api/v1.1/instancemgmt/
    MyIdentityDomain/services/stack/instances/MyStack1",
              "state":"READY",
              "stateDetail":"Ready",
              "identityDomain":"MyIdentityDomain",
              "createdBy":"joe@example.com",
              "creationJobId":"80161",
              "creationTime":"2016-07-27T15:48:18.366+0000",
              "lastModifiedTime":"2016-07-27T15:48:18.365+0000",
              "template":{
              "templateName":"MyTemplate",
              "templateVersion":"1.0.0",
              "templateURI":"http://example.org:7200//paas/api/v1.1/
    instancemgmt/MyIdentityDomain/templates/cst/instances/MyTemplate/export?
    version=1.0.0"
                }
            }
        ]
    }
  2. Use the stack describe command:

    To get details about a specific stack psm stack describe -n MyStack1

    To show all details of the stack, append —expand all

Start or Stop a Stack with the CLI

Besides using the Oracle Cloud Stack Manager console, you can also start or stop all the resources in a stack from the PSM Command Line Interface (CLI).
  1. Run the stack start or stack stop command and provide the name of the stack:

    psm stack start —n name

    psm stack stop —n name

  2. Periodically check the progress of the start or stop operation:

    psm stack operation-status —j jobID

    When you start or stop a job, the output includes the job ID number.

Delete a Stack with the CLI

You can delete a stack from the command line:
  1. Run the stack delete command and include the name of the stack:

    psm stack delete -n name

  2. Check the progress of the delete operation by running the stack operation command and providing the job ID:

    psm stack operation -j jobID

Monitor a Service Instance with the PaaS CLI

Display details of a single OMCe service instance within your identity domain with the psm omce service command.

This command takes the following parameters:
Parameter Description

-s|--service-name serviceName

Specifies the instance.

-of|--output-format json|html|short

(Optional) Specifies the output format. You can specify which format to use as the default with the psm setup command. See Configuring the Command Line Interface in the Oracle Cloud PaaS Service Manage Command Line Interface Reference.

Display a list of all active OMCe service instances within your identity domain with the psm omce services command.

This command takes the following parameters:
Parameter Description

-o|--output–level verbose

(Optional) Displays the full set of details in the output for each service instance.

-of|--output-format json|html|short

(Optional) Specifies the output format. You can specify which format to use as the default with the psm setup command. See Configuring the Command Line Interface in the Oracle Cloud PaaS Service Manage Command Line Interface Reference

Precheck Before Patching with the PaaS CLI

Prior to patching an OMCe service instance, run the psm omce precheck–patch command to identify potential issues that could prevent the patch operation from completing. This command returns reports on
  • disk space shortage

  • database connectivity failure

  • server access failure

  • storage access failure

This command doesn’t check if other administrative operations, such as backup or restore, are in progress even though the operations would prevent a patch operation from completing.

This command takes the following parameters:
Parameter Description

-s|--service-name serviceName

Specifies the instance.

-p--patch—id patchId

Specifies the patch Id for the patch to precheck.

-of|--output-format json|html|short

(Optional) Specifies the output format. You can specify which format to use as the default with the psm setup command. See Configuring the Command Line Interface in the Oracle Cloud PaaS Service Manage Command Line Interface Reference.

Patch an OMCe Service with the PaaS CLI

Patch an OMCe service instance with the psm omce patch command.

This command takes the following parameters:
Parameter Description

-s|--service-name serviceName

Specifies the instance.

-p--patch—id patchId

Specifies the patch.

Use the available-patch command to retrieve the patch Id.

-n|--additional-note free form note text

(Optional) Provides additional information about the patch in free-form text.

-of|--output-format json|html|short

(Optional) Specifies the output format. You can specify which format to use as the default with the psm setup command. See Configuring the Command Line Interface in the Oracle Cloud PaaS Service Manage Command Line Interface Reference.

Rollback a Patch with the PaaS CLI

If you need to roll back a patch, use the psm omce rollback command.

This command takes the following parameters.
Parameter Description

-s|--service-name serviceName

Specifies the instance.

-r--rollback-id nn

Identifies the patch operation to roll back.

Use the applied–patches command to retrieve the rollback Id.

-n|--additional-note free form note text

Provides additional information about the patch rollback in free-form text.

-of|--output-format json|html|short

(Optional) Specifies the output format. You can specify which format to use as the default with the psm setup command. See Configuring the Command Line Interface in the Oracle Cloud PaaS Service Manage Command Line Interface Reference.