Professional Documents
Culture Documents
There are many automation tools to build and manage resources such as Compute,
Networking, Database, Load Balancer, etc in Oracle Cloud Infrastructure (OCI) like APIs,
SDKs, Command Line Interface(CLI), Terraform, Ansible.
Overview of CLI
Advantages of using CLI Over Cloud Console
Steps to install OCI Command Line Interface (CLI)
Basic Commands of CLI
Note: CLI requests are authenticated using API keys, so we need to generate a key pair.
mkdir ~/.oci
openssl genrsa -out ~/.oci/oci_api_key.pem 2048
o Tenancy OCID: This can be found in the OCI console under Administration >
Tenancy Details.
o User OCID: which can be found in the OCI console under Identity > Users >
K21AcademyUser
o Region Name:
oci os ns get
Create a compartment
It is not possible to giving access to Oracle console to everyone in a team due to some security
and privacy issues. So to perform all the services of OCI without using Oracle console CLI
interface is used.