Oracle Cloud Infrastructure
Cloud Platform
Oracle Cloud Infrastructure (OCI)
概要
Oracle Cloud Infrastructure (OCI)は、Oracleが提供するエンタープライズ向けクラウドプラットフォームです。Autonomous Databaseや高性能なExadataなど、データベース分野での革新的な技術力を活かしたサービスが特徴で、特に大企業や金融機関での利用が拡大しています。Oracleの長年のエンタープライズ経験を基盤として、高い性能とセキュリティを兼ね備えたクラウドサービスを提供します。
詳細
OCIは2016年にサービスを開始し、現在では全世界47リージョンでサービスを展開しています。特にAutonomous Database、Exadata Cloud Service、高性能コンピューティング(HPC)分野で業界をリードしており、従来のオンプレミスOracle環境のクラウドマイグレーションを容易にします。2025年の主要な新機能として、Oracle Database 23aiを使用したリフレッシュ可能なクローンの作成、HeatWave MySQL 9.3.0サポート、Generative AIサービスでのxAI Grokモデル統合、ゼロトラストパケットルーティング(ZPR)セキュリティ機能、Kubernetes 1.32.1サポートなどが含まれます。
主要な特徴
- Autonomous Database: 自動運用・自動セキュリティ・自動修復機能を持つ革新的なデータベース
- Exadata Cloud Service: 極めて高いパフォーマンスを実現するデータベース専用クラウド
- 高性能コンピューティング: GPU、HPC、ベアメタルによる高速計算処理
- マルチクラウド: Microsoft Azure、Google Cloudとの統合サポート
- エンタープライズセキュリティ: エンタープライズグレードのセキュリティと コンプライアンス機能
2025年最新機能
- Generative AI: xAI Grokモデル統合とAI開発キット(ADK)
- Autonomous Database: Oracle Database 23ai対応とリフレッシュ可能クローン
- HeatWave: MySQL 9.3.0、8.4.5、8.0.42サポート
- セキュリティ: ゼロトラストパケットルーティング(ZPR)とAI安全機能
- Kubernetes: バージョン1.32.1サポートとネットワークセキュリティグループ
メリット・デメリット
メリット
- 業界最高レベルのデータベースパフォーマンスとAutonomous機能
- Oracleエコシステムとの完全な統合とシームレスな移行
- 企業向けの高度なセキュリティとコンプライアンス機能
- ベアメタルとVMの柔軟な選択によるコストパフォーマンス
- 24時間365日の専門的なエンタープライズサポート
- Exadataによる他社を圧倒するデータベース処理能力
- 予測可能で透明性の高い価格体系
デメリット
- AWSやAzureと比較してサービス数が少ない
- 開発者コミュニティが他の主要クラウドよりも小さい
- 一部リージョンでのサービス可用性の制限
- Oracle以外の技術スタックでの学習コストが高い
- 新興企業やスタートアップでの導入事例が少ない
- サードパーティツールとの連携が限定的な場合がある
参考ページ
- Oracle Cloud Infrastructure公式サイト
- Oracle Cloud Infrastructure ドキュメント
- Oracle Cloud Infrastructure 料金計算ツール
- Oracle Cloud Infrastructure アーキテクチャ センター
- Oracle Cloud Infrastructure 無料利用枠
- Oracle Cloud Infrastructure トレーニング
書き方の例
基本セットアップとアカウント設定
# Oracle Cloud CLI のインストール
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
# 設定ファイルの初期化
oci setup config
# 認証情報の確認
oci iam region list --output table
# デフォルト設定
oci setup autocomplete
oci setup repair-file-permissions ~/.oci/config
# プロファイル設定の確認
oci iam user get --user-id <user-ocid>
# リージョンとテナンシーの確認
oci iam tenancy get --tenancy-id <tenancy-ocid>
# 利用可能なサービスリストの確認
oci iam compartment list --all
コンピュートサービス(VM、コンテナ)
import oci
# OCI設定ファイルから認証情報を読み込み
config = oci.config.from_file()
compute_client = oci.core.ComputeClient(config)
networking_client = oci.core.VirtualNetworkClient(config)
# 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)
# サブネットの作成
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)
# 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)
# Container Engine for Kubernetes (OKE) クラスター作成
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)
ストレージとデータベースサービス
# Object Storageの操作
object_storage_client = oci.object_storage.ObjectStorageClient(config)
# バケットの作成
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)
# ファイルのアップロード
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
)
# 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年新機能:Oracle Database 23ai
is_auto_scaling_enabled=True,
is_dedicated=False
)
autonomous_db_response = database_client.create_autonomous_database(autonomous_db_details)
# 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)
ネットワークとセキュリティ
# 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)
# 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)
# 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年新機能)
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)
サーバーレスとFunctions
# 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)
# 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_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)
モニタリングとDevOps統合
# Cloud Monitoringメトリクスの取得
monitoring_client = oci.monitoring.MonitoringClient(config)
# メトリクスクエリの実行
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)
# Loggingサービスの設定
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)
# 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ドメインの作成(設定は管理コンソールで行う)
# アプリケーションのパフォーマンス監視とトレーシング
# 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)