Oracle Cloud
01 / 02

Compute, Networking & Storage

Compute, Networking & Storage

CLI & Compartments

oci setup config                              # interactive credentials setup

oci iam compartment create --name "my-project" --description "..."

oci compute instance launch \
  --compartment-id <compartment-ocid> \
  --shape VM.Standard.E4.Flex \
  --image-id <image-ocid> \
  --subnet-id <subnet-ocid>

VCN — Virtual Cloud Network

oci network vcn create --compartment-id <ocid> --cidr-block 10.0.0.0/16 --display-name my-vcn
oci network subnet create --vcn-id <vcn-ocid> --cidr-block 10.0.1.0/24

# Region = broader geographic area; each region contains multiple
# Availability Domains (isolated data centers) — spread resources across
# ADs within a region for fault tolerance against a single data center failure

IAM Policies

# OCI policy syntax reads like plain English — notably more readable
# than some other clouds' JSON policy documents
Allow group Developers to manage instances in compartment my-project
Allow group Developers to read object-family in compartment my-project

Object Storage

oci os bucket create --compartment-id <ocid> --name my-bucket
oci os object put --bucket-name my-bucket --file report.pdf
oci os object put --bucket-name my-bucket --file archive.zip --storage-tier Archive
# Archive tier — lower cost, slower access, for infrequently-read data

Keep your own version of these notes — editable, searchable, and organised by your stack.

Start free