このページでは、Red Hat RPM オーケストレータを使用して AlloyDB Omni をデプロイして管理するためのさまざまな YAML 構成の例を示します。
DBCluster の構成
最小限の DBCluster
スタンドアロン DBCluster を取得するための基本構成。
DBCluster: metadata: name: alloydb-prod spec: databaseVersion: 18.1.0 primarySpec: adminUser: passwordRef: name: db-pw-alloydb-prod resources: disks: - name: DataDisk path: /mnt/disks/pgsql
完全な DBCluster
すべてのオプションを示す包括的な DBCluster 構成。
DBCluster: metadata: name: alloydb-prod spec: databaseVersion: 18.1.0 mode: "" availability: numberOfStandbys: 2 enableAutoFailover: true enableAutoHeal: true autoFailoverTriggerThreshold: 2 autoHealTriggerThreshold: 2 healthcheckPeriodSeconds: 10 primarySpec: adminUser: passwordRef: name: db-pw-alloydb-prod parameters: max_connections: "100" max_wal_size: "2GB" max_worker_processes: "32" log_connections: "on" log_disconnections: "on" log_hostname: "on" log_statement: "none" huge_pages: "off" tcp_keepalives_idle: "10" tcp_keepalives_interval: "10" tcp_keepalives_count: "10" resources: cpu: 16 memory: 64Gi disks: - name: DataDisk path: /mnt/disks/pgsql - name: ObsDisk path: /obs dbLoadBalancerOptions: onprem: loadBalancerIP: 10.1.0.95 loadBalancerType: "internal" loadBalancerInterface: "eth0"
Secret の構成
パスワードを使用した例:
Secret: metadata: name: db-pw-sample-st-1 spec: type: Opaque data: sample-st-1: cG9zdGdyZXM=
証明書を使用した例:
Secret: metadata: name: dbs-alloydbomni-cluster spec: type: Opaque data: ca.crt: <base64_ca_certificate> tls.crt: <base64_tls_certificate> tls.key: <base64_tls_private_key>
PgBouncer の構成
PgBouncer: metadata: name: pgbouncer-sample spec: accessMode: "rw" allowSuperUserAccess: true dbClusterRef: dbcluster-sample port: 6432
BackupPlan の構成
次のサンプルは、Cloud Storage バケットにバックアップを保存する BackupPlan を構成する方法を示しています。
BackupPlan: metadata: name: backupplan-sample-dbc spec: dbclusterRef: sample-dbc backupLocation: type: GCS gcsOptions: bucket: sample-backup-bucket key: /backups
バックアップ構成
Backup の例
Backup: metadata: name: backup-sample spec: backupPlanRef: backupplan-sample-dbc dbclusterRef: sample-dbc
切り替え構成
切り替え構成の例
Switchover: metadata: name: switchover-alloydb-prod-12345 spec: dbclusterRef: "alloydb-prod"
切り替え構成
フェイルオーバー構成の例
Failover: metadata: name: failover-alloydb-prod-abcde spec: dbclusterRef: "alloydb-prod"