The OCI Cloud Shell is an excellent way of quickly using the OCI CLI and other tools for managing you OCI environment from the command line, but what if you’re still using the OCI Classic services?
If you’re running in an environment with access to both OCI and OCI Classic Services, or maybe you’re in the process of moving from OCI Classic to OCI then the following tips will help you run the OCI Classic command line utilities from with the OCI Cloud Shell
opccli for OCI Classic Compute, Storage, and Networking
ftmclifor OCI Classic Object Storage
psmcli for OCI Classic Platform Services, DBCS, JCS, SOACS etc.
opc command line utility
opc command line utility is used to manage the OCI Classic Compute Service resources. The
opc cli can manage the lifecycle of the OCI Classic compute instances, networking, block storage, and orchestrations.
Download the opc cli to your local machine https://www.oracle.com/downloads/cloud/opc-cli-downloads.html. e.g.
Open Cloud Shell in the OCI Console and select the Upload option from the menu and upload the opc cli zip file.
In the Cloud Shell terminal extract the uploaded zip to get the opc command line executable.
$ unzip opc-cli-18.1.2.zip linux/opc
opc command can now be run in the Cloud Shell from the
$ ./linux/opc --help
To use the opc cli with your OCI Classic environment you need to create the required profile configuration files.
$ mkdir -p ~/.opc/profiles
$ touch ~/.opc/password
$ chmod 600 ~/.opc/password
Create the file
~/.opc/profiles/default, setting the appropriate Compute Service ID, User name, and Compute Classic REST endpoint details.
~/.opc/password file with your account password.
You can now run the opc cli against your Classic environment, e.g. to list all compute instances.
$ ./linux/opc -F state,name compute instance list /Compute-a123456
For more details on using the opc cli refer to the CLI Reference for Oracle Cloud Infrastructure Compute Classic
ftmcli command line utility
ftmcli command line utility is used to manage the OCI Classic Object Storage containers and objects
Download the ftmcli to your local machine from https://www.oracle.com/downloads/cloud/storage-cloud-upload-cli-downloads.html
Open Cloud Shell in the OCI Console and select the Upload option from the menu and upload the ftmcli zip file.
In the Cloud Shell terminal extract the
ftmcli.jar file from the uploaded zip, e.g.
$ unzip ftmcli-v2.4.3.zip ftmcli-v2.4.3/ftmcli.jar
You can now run the
ftmcli utility using the java command already pre-installed in Cloud Shell.
$ java -jar ./ftmcli-v2.4.3/ftmcli.jar --help
To use ftmcli to list the OCI Classic Object Storage containers set the username and storage rest endpoint in the command options, e.g.
$ java -jar ftmcli.jar list \
--user firstname.lastname@example.org \
Enter your password: ********
For more details on using the ftmcli refer to the Command-Line Reference for Oracle Cloud Infrastructure Object Storage Classic
psm command line utility
psm command line utility can be used the manage the lifecycle of several Platform service in OCI and OCI Classic, including Database Classic (DBCS) Java Cloud Service (JCS) and SOA Cloud Service (SOACS).
Download the psm utility from the Platform Service Console. From the User Profile icon select Help > Download Center
Download the PaaS Service Manager (PSM) Command Line Interface (CLI)
Open Cloud Shell in the OCI Console and select the Upload option from the menu and upload the
In the Cloud Shell terminal install the psm utility as python package for the local user.
$ pip3 install --user ./psmcli.zip
You can now run the
psm utility in Cloud Shell from the
$ .local/bin/psm --help
Run the setup command to configure the psm cli to connect with the OCI Classic services. Note the Identity domain is the tenancy name for Traditional accounts, or the idcs ID for Cloud Accounts.
$ .local/bin/psm setup
Retype Password: ********
Identity domain: a123456
Output format [short]:
Use OAuth? [n]:
psm cli to manage your Classic Platform Services, e.g. to list all Database Classic services.
$ .local/bin/psm DBCS services
For more details on using the psm cli refer to the PaaS Service Manager Command Line Interface Reference