Oracle PaaS Service Manager (PSM) is a command line tool that allows you to provision, configure, and manage the life cycle of Oracle PaaS platforms and products. It acts as a wrapper around the REST APIs, and makes it easier to interact with the PaaS services from the command line and scripts.
This is Part #1 in our 3 Part series on Oracle PaaS Service Manager (PSM). In this blog we will look at how to locate and download the PSM CLI. In subsequent blog posts we will show you how you can very easily securely Dockerise PSM CLI and how to use PSM CLI.
To get started with PSM there are two ways of downloading the CLI client
- Download from the Oracle Cloud User Interface
- Download using the REST API
Download Via the Oracle Cloud User Interface
Log into the Oracle Cloud Console and click on the Menu icon in the top left
Select "Services" from the Menu
Select one of the PaaS Services displayed in the menu. For example Java, Database, Analytics, SOA, Integration etc. In our example we are going to select "Database"
From the service console of the PaaS Service that you selected, click on the round circle with your initials in it to open the menu. Select "Help" followed by "Download Center"
This brings up a dialogue displaying the items that you can download. In our example there is only PSM. Click on the download arrow to commence the download.
Download Via the REST API
We can download the
psm CLI using
curl and the REST API. Before you begin, you will need to locate your Oracle Cloud Account Identity Domain, and the region.
Locate the Oracle Cloud Account Details
- Log into the Oracle Cloud User Interface
- The lower portion of the Dashboard list the services that you are currently using within your account via a series of tiles. Click on the menu icon of one of the tiles and select "View Details"
- From the service details we can see "Identity Service Id" (highlighted in the red box), this is our Identity Domain. To find our region we look at the "REST Endpoint", and we have highlighted the region value in yellow. Valid regions include "us","aucom", and "europe"
Using curl with the REST API
- We can set the values of our username, password, Identity Domain, and region as shell environment variables for use in our
PSM_USERNAMEfirstname.lastname@example.org PSM_PASSWORD=OMITTED PSM_IDENTITY_DOMAIN=idcs-XXXXXXXXXXXXXXXXXXXXXX PSM_REGION=aucom
- Use the following
curlcommand to access the PSM REST endpoint to download the
curl -X GET -u $(PSM_USERNAME):$(PSM_PASSWORD) -H X-ID-TENANT-NAME:$(PSM_IDENTITY_DOMAIN) https://psm.$(PSM_REGION).oraclecloud.com/paas/core/api/v1.1/cli/$(PSM_IDENTITY_DOMAIN)/client -o psmcli.zip
- New versions of
psmCLI are released as new features of the cloud are made available. To make it easier to download newer version of
psm, we rename the file from
mv psmcli.zip `unzip -qql psmcli.zip | head -n1 | tr -s ' ' | cut -d ' ' -f5- | cut -d '/' -f1`.zip
Installing PSM CLI
Having successfully located and downloaded the
psm CLI you can now proceed to installing it. Ensure that you have completed the installation and configuration of the prerequisite version of python before installing.
Keep an eye out for the next blog post which will cover using PSM CLI.