Oracle Cloud Infrastructure
Cloud Platform
Oracle Cloud Infrastructure (OCI)
Overview
Oracle Cloud Infrastructure (OCI) is Oracle's enterprise-focused cloud platform. It features innovative technologies leveraging Oracle's database expertise, including Autonomous Database and high-performance Exadata services, with growing adoption among large enterprises and financial institutions. Built on Oracle's decades of enterprise experience, OCI provides cloud services that combine high performance with robust security.
Details
OCI launched its services in 2016 and now operates across 47 regions worldwide. It leads the industry particularly in Autonomous Database, Exadata Cloud Service, and High Performance Computing (HPC), facilitating easy cloud migration of traditional on-premises Oracle environments. Key 2025 features include support for Oracle Database 23ai refreshable clones, HeatWave MySQL 9.3.0 support, xAI Grok model integration in Generative AI services, Zero Trust Packet Routing (ZPR) security features, and Kubernetes 1.32.1 support.
Key Features
- Autonomous Database: Revolutionary database with self-driving, self-securing, and self-repairing capabilities
- Exadata Cloud Service: Database-dedicated cloud delivering extreme performance
- High Performance Computing: GPU, HPC, and bare metal for high-speed computational processing
- Multi-cloud: Integrated support with Microsoft Azure and Google Cloud
- Enterprise Security: Enterprise-grade security and compliance features
Latest 2025 Features
- Generative AI: xAI Grok model integration and Agent Development Kit (ADK)
- Autonomous Database: Oracle Database 23ai support and refreshable clones
- HeatWave: MySQL 9.3.0, 8.4.5, and 8.0.42 support
- Security: Zero Trust Packet Routing (ZPR) and AI safety features
- Kubernetes: Version 1.32.1 support and network security groups
Pros and Cons
Pros
- Industry-leading database performance and Autonomous capabilities
- Complete integration with Oracle ecosystem and seamless migration
- Advanced enterprise security and compliance features
- Cost-effective performance with flexible bare metal and VM options
- 24/7 specialized enterprise support
- Unmatched database processing power with Exadata
- Predictable and transparent pricing structure
Cons
- Fewer services compared to AWS and Azure
- Smaller developer community than other major cloud providers
- Limited service availability in some regions
- Higher learning curve for non-Oracle technology stacks
- Fewer adoption cases among startups and emerging companies
- Limited third-party tool integrations in some cases
Reference Pages
- Oracle Cloud Infrastructure Official Site
- Oracle Cloud Infrastructure Documentation
- Oracle Cloud Infrastructure Pricing Calculator
- Oracle Cloud Infrastructure Architecture Center
- Oracle Cloud Infrastructure Free Tier
- Oracle Cloud Infrastructure Training
Code Examples
Basic Setup and Account Configuration
# Install Oracle Cloud CLI
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
# Initialize configuration file
oci setup config
# Verify authentication
oci iam region list --output table
# Default settings
oci setup autocomplete
oci setup repair-file-permissions ~/.oci/config
# Verify profile settings
oci iam user get --user-id <user-ocid>
# Check region and tenancy
oci iam tenancy get --tenancy-id <tenancy-ocid>
# List available services
oci iam compartment list --all
Compute Services (VMs, Containers)
import oci
# Load authentication from OCI config file
config = oci.config.from_file()
compute_client = oci.core.ComputeClient(config)
networking_client = oci.core.VirtualNetworkClient(config)
# Create VCN (Virtual Cloud Network)
vcn_details = oci.core.models.CreateVcnDetails(
compartment_id="<compartment-ocid>",
display_name="my-vcn",
cidr_block="10.0.0.0/16"
)
vcn_response = networking_client.create_vcn(vcn_details)
# Create Subnet
subnet_details = oci.core.models.CreateSubnetDetails(
compartment_id="<compartment-ocid>",
vcn_id=vcn_response.data.id,
display_name="my-subnet",
cidr_block="10.0.1.0/24",
availability_domain="AD-1"
)
subnet_response = networking_client.create_subnet(subnet_details)
# Launch Compute Instance
launch_instance_details = oci.core.models.LaunchInstanceDetails(
compartment_id="<compartment-ocid>",
display_name="my-oracle-vm",
shape="VM.Standard.E4.Flex",
shape_config=oci.core.models.LaunchInstanceShapeConfigDetails(
ocpus=2,
memory_in_gbs=16
),
source_details=oci.core.models.InstanceSourceViaImageDetails(
source_type="image",
image_id="<oracle-linux-image-ocid>"
),
create_vnic_details=oci.core.models.CreateVnicDetails(
subnet_id=subnet_response.data.id
)
)
instance_response = compute_client.launch_instance(launch_instance_details)
# Create Container Engine for Kubernetes (OKE) cluster
container_engine_client = oci.container_engine.ContainerEngineClient(config)
cluster_details = oci.container_engine.models.CreateClusterDetails(
compartment_id="<compartment-ocid>",
name="my-oke-cluster",
vcn_id=vcn_response.data.id,
kubernetes_version="v1.32.1",
options=oci.container_engine.models.ClusterCreateOptions(
service_lb_subnet_ids=[subnet_response.data.id]
)
)
cluster_response = container_engine_client.create_cluster(cluster_details)
Storage and Database Services
# Object Storage operations
object_storage_client = oci.object_storage.ObjectStorageClient(config)
# Create bucket
namespace = object_storage_client.get_namespace().data
bucket_details = oci.object_storage.models.CreateBucketDetails(
name="my-oracle-bucket",
compartment_id="<compartment-ocid>",
public_access_type="NoPublicAccess"
)
bucket_response = object_storage_client.create_bucket(namespace, bucket_details)
# Upload file
with open("sample.txt", "rb") as file:
object_storage_client.put_object(
namespace_name=namespace,
bucket_name="my-oracle-bucket",
object_name="sample.txt",
put_object_body=file
)
# Create Autonomous Database
database_client = oci.database.DatabaseClient(config)
autonomous_db_details = oci.database.models.CreateAutonomousDatabaseDetails(
compartment_id="<compartment-ocid>",
display_name="my-autonomous-db",
db_name="MYAUTODBDEV",
admin_password="MySecurePassword123#",
cpu_core_count=1,
data_storage_size_in_tbs=1,
db_version="23ai", # 2025 new feature: Oracle Database 23ai
is_auto_scaling_enabled=True,
is_dedicated=False
)
autonomous_db_response = database_client.create_autonomous_database(autonomous_db_details)
# Create Block Volume
blockstorage_client = oci.core.BlockstorageClient(config)
volume_details = oci.core.models.CreateVolumeDetails(
compartment_id="<compartment-ocid>",
display_name="my-block-volume",
size_in_gbs=50,
availability_domain="AD-1"
)
volume_response = blockstorage_client.create_volume(volume_details)
Networking and Security
# Create Internet Gateway
internet_gateway_details = oci.core.models.CreateInternetGatewayDetails(
compartment_id="<compartment-ocid>",
vcn_id=vcn_response.data.id,
display_name="my-internet-gateway",
is_enabled=True
)
igw_response = networking_client.create_internet_gateway(internet_gateway_details)
# Configure Route Table
route_rules = [
oci.core.models.RouteRule(
destination="0.0.0.0/0",
destination_type="CIDR_BLOCK",
network_entity_id=igw_response.data.id
)
]
route_table_details = oci.core.models.CreateRouteTableDetails(
compartment_id="<compartment-ocid>",
vcn_id=vcn_response.data.id,
display_name="my-route-table",
route_rules=route_rules
)
route_table_response = networking_client.create_route_table(route_table_details)
# Create Security List
ingress_rules = [
oci.core.models.IngressSecurityRule(
protocol="6", # TCP
source="0.0.0.0/0",
tcp_options=oci.core.models.TcpOptions(
destination_port_range=oci.core.models.PortRange(min=22, max=22)
)
),
oci.core.models.IngressSecurityRule(
protocol="6", # TCP
source="0.0.0.0/0",
tcp_options=oci.core.models.TcpOptions(
destination_port_range=oci.core.models.PortRange(min=80, max=80)
)
)
]
security_list_details = oci.core.models.CreateSecurityListDetails(
compartment_id="<compartment-ocid>",
vcn_id=vcn_response.data.id,
display_name="my-security-list",
ingress_security_rules=ingress_rules
)
security_list_response = networking_client.create_security_list(security_list_details)
# Network Security Group (2025 new feature)
nsg_details = oci.core.models.CreateNetworkSecurityGroupDetails(
compartment_id="<compartment-ocid>",
vcn_id=vcn_response.data.id,
display_name="my-nsg"
)
nsg_response = networking_client.create_network_security_group(nsg_details)
Serverless and Functions
# Create OCI Functions Application
functions_client = oci.functions.FunctionsManagementClient(config)
application_details = oci.functions.models.CreateApplicationDetails(
compartment_id="<compartment-ocid>",
display_name="my-functions-app",
subnet_ids=[subnet_response.data.id]
)
app_response = functions_client.create_application(application_details)
# Create API Gateway
api_gateway_client = oci.apigateway.GatewayClient(config)
gateway_details = oci.apigateway.models.CreateGatewayDetails(
compartment_id="<compartment-ocid>",
display_name="my-api-gateway",
endpoint_type="PUBLIC",
subnet_id=subnet_response.data.id
)
gateway_response = api_gateway_client.create_gateway(gateway_details)
# Function deployment configuration
function_details = oci.functions.models.CreateFunctionDetails(
display_name="my-python-function",
application_id=app_response.data.id,
image="<region>.ocir.io/<tenancy>/my-function:latest",
memory_in_mbs=128,
timeout_in_seconds=30
)
function_response = functions_client.create_function(function_details)
Monitoring and DevOps Integration
# Get Cloud Monitoring metrics
monitoring_client = oci.monitoring.MonitoringClient(config)
# Execute metrics query
query_details = oci.monitoring.models.SummarizeMetricsDataDetails(
namespace="oci_computeagent",
query="CpuUtilization[1m].mean()",
compartment_id="<compartment-ocid>",
start_time=datetime.utcnow() - timedelta(hours=1),
end_time=datetime.utcnow(),
resolution="1m"
)
metrics_response = monitoring_client.summarize_metrics_data(query_details)
# Configure Logging service
logging_client = oci.logging.LoggingManagementClient(config)
log_group_details = oci.logging.models.CreateLogGroupDetails(
compartment_id="<compartment-ocid>",
display_name="my-log-group"
)
log_group_response = logging_client.create_log_group(log_group_details)
# Create DevOps Build Pipeline
devops_client = oci.devops.DevopsClient(config)
build_pipeline_details = oci.devops.models.CreateBuildPipelineDetails(
project_id="<devops-project-ocid>",
display_name="my-build-pipeline",
description="Oracle Cloud Build Pipeline"
)
build_pipeline_response = devops_client.create_build_pipeline(build_pipeline_details)
# Application Performance Monitoring (APM)
apm_config_client = oci.apm_config.ConfigClient(config)
# APM domain creation (configuration done via management console)
# Application performance monitoring and tracing
# Create Deployment Pipeline
deployment_pipeline_details = oci.devops.models.CreateDeploymentPipelineDetails(
project_id="<devops-project-ocid>",
display_name="my-deployment-pipeline",
description="Oracle Cloud Deployment Pipeline"
)
deployment_pipeline_response = devops_client.create_deployment_pipeline(deployment_pipeline_details)