Managing Oracle Cloud Platform Services Using PSM-CLI
Oracle has Platform as a Service (PaaS) as one of its offerings. PaaS provides infrastructure and middleware on which we can build, integrate, deploy and manage applications, thus offering ready-to-use programming components for applications on which advanced features can be added by the developers.
Oracle has many platform services available in cloud as both Oracle Cloud Infrastructure (OCI /Gen 2) and Oracle Cloud Infrastructure Classic (OCI-C /Gen 1). In OCI-C service, user will be able to manage all the activities related to service lifecycle and configuration.
We have two different ways to manage our services i.e., either from our console URL or with the help of Command Line Interface (CLI) commands. With the easy user interface, users mostly prefer to manage their Oracle Cloud Platform services via console itself. But, we also have another option offered by Oracle on cloud, where we can use PaaS Service Manager’s Command Line Interface (PSM-CLI) to manage the lifecycle of various platform services offered by Oracle Cloud.
CLI is basically a thin wrapper over PaaS REST APIs that invokes these APIs to support common PaaS features, which includes creating and managing the instances. It also supports Oracle Cloud Stack Manager, a PaaS tool which automates the provisioning and deletion of cloud environments.
Consider a case where you want your IT administrator to start/stop service alone. With the access to console, he/she may be able to access other important information too. So, in this case, the best way is to make the administrator use PSM-CLI commands to carry out the operation. With the help of these commands, we can also do scripting for the recurring tasks, such as restarting services, deployments, provisioning new environments etc. When compared to performing operations via console, admin operations can be managed more effectively by using PSM on Oracle Cloud.
In brief, the advantages of managing Oracle Cloud Platform Services using PSM-CLI are:
- Automation of recurring tasks
- Improved security by restricting the access to console
- Effective management of admin operations
and Configuring PSM-CLI
For detailed information on installation, you can refer to the link below: https://docs.oracle.com/en/cloud/paas/java-cloud/pscli/abouit-paas-service-manager-command-line-interface.html
Managing the Services Using CLI
Let us consider the service as Oracle Analytics Cloud with service name OracleAnalytics.
To Stop the
> psm autoanalyticsinst stop-service -s OracleAnalytics
We can validate the same under Activity tab on our console.
Following are the available PSM-CLI commands that we can use with Oracle Analytics Cloud Services:
- psm autoanalyticsinst create-service – Creates a service
- psm autoanalyticsinst delete-service – Deletes a service
- psm autoanalyticsinst service – Displays the service details
- psm autoanalyticsinst services – Lists all active services within IDD
- psm autoanalyticsinst stop-service – Stops a service that is running
- psm autoanalyticsinst start-service – Starts a service
- psm autoanalyticsinst activities – Lists the activities of a service
- psm autoanalyticsinst update-service – Updates the service payload
- psm autoanalyticsinst scale-service – Scaling of a compute node
- psm autoanalyticsinst operation-status – Shows the Job status on CLI
By following this simple installation and configuring steps, we can use PaaS-CLI commands to manage different platform services offered by Oracle Cloud. This enables us to perform admin operations in a very simple and efficient way than using GUI. They also provide a chance to automate the recurring tasks performed on Oracle Cloud.
Contact for further details
Sr. Software Engineer – OACS