Part#1: Getting Started with Oracle PaaS Service Manager for Oracle PaaS Automation

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

  1. Download from the Oracle Cloud User Interface
  2. Download using the REST API

Download Via the Oracle Cloud User Interface

  1. Log into the Oracle Cloud Console and click on the Menu icon in the top left

  2. Select "Services" from the Menu

  3. 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"

  4. 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"

  5. 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

  1. Log into the Oracle Cloud User Interface
  2. 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"
  3. 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

  1. We can set the values of our username, password, Identity Domain, and region as shell environment variables for use in our curl command.
PSM_USERNAME=name@company.com  
PSM_PASSWORD=OMITTED  
PSM_IDENTITY_DOMAIN=idcs-XXXXXXXXXXXXXXXXXXXXXX  
PSM_REGION=aucom  
  1. Use the following curl command to access the PSM REST endpoint to download the psm CLI
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  
  1. New versions of psm CLI 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 psmcli.zip to psmcli-<VERSION>.zip
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.

Andrew Dorman

Andrew Dorman is a leading Oracle FMW and Cloud practitioner, with over a decade of experience empowering organisations with Service-Oriented Architecture and Cloud Computing