Oracle Cloud Infrastructure (OCI) provides a powerful browser-based terminal called Oracle Cloud Shell that allows administrators, developers, and cloud engineers to work directly from the OCI Console without installing any local tools.
Cloud Shell comes preconfigured with useful utilities such as:
- OCI CLI
- Terraform
- Git
- Kubectl
- Python SDKs
- Java SDKs
- SQL tools
- Linux utilities
This makes Oracle Cloud Shell one of the easiest ways to start managing Oracle Cloud resources.
Launching Oracle Cloud Shell
When Cloud Shell starts, you will see a welcome screen similar to the following:
Welcome to Oracle Cloud Shell. Your Cloud Shell machine comes with 5GB of storage for your home directory. Your Cloud Shell (machine and home directory) are located in: India West (Mumbai). You are using Cloud Shell in tenancy karandodwal as OCI local user karandodwal@gmail.com Type `help` for more info.
Understanding the Welcome Message
1. Browser-Based Linux Terminal
Oracle Cloud Shell provides a fully functional Linux terminal directly inside the OCI web console. No SSH setup or local installation is required.
2. Persistent 5GB Storage
Your Cloud Shell machine comes with 5GB of storage for your home directory.
Oracle provides persistent storage for your home directory. This means:
- Your scripts remain saved
- Terraform files persist
- Downloaded files remain available
- Git repositories stay intact
- OCI CLI configurations are preserved
Even after you close the browser session, your files remain available.
3. Region Information
Your Cloud Shell (machine and home directory) are located in: India West (Mumbai)
The Cloud Shell environment runs in your OCI region. In this example, the Cloud Shell session is hosted in:
- OCI Region: India West (Mumbai)
- Region Identifier: ap-mumbai-1
This helps reduce latency when working with resources in the same region.
4. Tenancy and User Information
You are using Cloud Shell in tenancy karandodwal as OCI local user karandodwal@gmail.com
This confirms:
- The OCI tenancy being used
- The authenticated OCI user
- The identity under which OCI CLI commands will execute
Cloud Shell automatically authenticates your OCI session, so there is usually no need to manually configure API keys.
Cloud Shell Tutorial Prompt
When Cloud Shell launches for the first time, OCI may offer an interactive tutorial:
================================================================== Welcome to the Oracle Cloud Shell Tutorial Cloud Shell is a web-based terminal which includes many useful tools including current versions of the OCI CLI and SDKs. Would you like to run a tutorial to learn more about all the features included in Cloud Shell? (Type N to quit) [Y|N] N If you want to run it in the future you can just type cstutorial.
What is cstutorial?
Oracle provides a built-in interactive learning tutorial for Cloud Shell.
You can launch it anytime using:
cstutorial
The tutorial explains:
- OCI CLI basics
- File management
- Cloud Shell features
- Editor usage
- Terminal customization
- Working with OCI resources
Checking OCI CLI in Cloud Shell
One of the biggest advantages of Cloud Shell is that the OCI CLI is already installed and configured.
Running the command:
oci
displays the OCI CLI help menu:
karandodwa@cloudshell:~ (ap-mumbai-1)$ oci Usage: oci [OPTIONS] COMMAND [ARGS]...
What is OCI CLI?
OCI CLI (Oracle Cloud Infrastructure Command Line Interface) is a tool that allows you to manage OCI services directly from the terminal.
Instead of using the web console, administrators can automate operations using scripts and commands.
OCI CLI Architecture
OCI CLI commands generally follow this structure:
oci <service> <resource> <action>
Example
oci iam user list --compartment-id <compartment_ocid>
This command:
- Uses the IAM service
- Works with users
- Performs the list action
Interactive OCI CLI Mode
OCI CLI supports an interactive mode that helps users with command completion and syntax guidance.
Example:
oci -i
This mode is very useful for beginners learning OCI CLI commands.
Important OCI CLI Options
Check OCI CLI Version
oci --version
Display Output in Table Format
oci iam region list --output table
Enable Debug Mode
oci --debug
Useful for troubleshooting API requests and authentication issues.
Specify OCI Region
oci --region ap-mumbai-1
Allows commands to target a specific OCI region.
OCI CLI Services Available in Cloud Shell
The OCI CLI supports almost every Oracle Cloud service.
From the output, we can see major service categories such as:
- Compute
- Networking
- Storage
- Database
- AI Services
- Monitoring
- Security
- DevOps
- Kubernetes
- Load Balancing
- Object Storage
- Generative AI
Examples of OCI CLI Services
| Service | Description |
|---|---|
| compute | Manage OCI Compute Instances |
| network | Manage VCNs, subnets, gateways, route tables |
| os | Manage Object Storage buckets and files |
| db | Manage Oracle Database Services |
| ce | Manage Kubernetes Engine (OKE) |
| vault | Manage OCI Vault and secrets |
| logging | Manage OCI logging services |
| generative-ai | Manage OCI Generative AI services |
Example OCI CLI Commands
List OCI Regions
oci iam region list
List Compartments
oci iam compartment list --all
List Compute Instances
oci compute instance list \ --compartment-id <compartment_ocid>
List Object Storage Buckets
oci os bucket list \ --compartment-id <compartment_ocid> \ --namespace-name <namespace>
Why Use Oracle Cloud Shell?
1. No Local Installation
No need to install:
- OCI CLI
- Terraform
- SDKs
- kubectl
2. Pre-Authenticated Environment
Cloud Shell automatically authenticates to OCI using your logged-in OCI identity.
3. Accessible Anywhere
You only need:
- A browser
- OCI Console access
4. Ideal for Automation
Cloud Shell is excellent for:
- Automation scripts
- Terraform deployments
- Kubernetes management
- Database administration
- OCI resource management
Cloud Shell for Database Administrators
Oracle Cloud Shell is extremely useful for DBAs working with:
- Autonomous Database
- Base Database Service
- Exadata Cloud Service
- Oracle Database@AWS
- Oracle Database@Azure
DBAs can use OCI CLI to:
- Create databases
- Manage backups
- Scale databases
- Monitor resources
- Automate administration tasks
Cloud Shell Security Benefits
- No need to store API keys locally
- Integrated OCI authentication
- Runs inside Oracle Cloud Infrastructure
- Secure browser-based access
- Temporary compute environment with persistent storage
Conclusion
Oracle Cloud Shell provides a powerful and convenient way to manage Oracle Cloud Infrastructure directly from the browser.
With built-in OCI CLI, SDKs, Terraform, Kubernetes tools, and persistent storage, Cloud Shell eliminates the complexity of setting up local environments.
Whether you are a cloud administrator, developer, DevOps engineer, or DBA, Oracle Cloud Shell offers a secure and efficient environment for managing OCI resources and automating cloud operations.
Combined with OCI CLI support for hundreds of Oracle Cloud services, Cloud Shell becomes an essential productivity tool for modern cloud administration.
No comments:
Post a Comment