使用 Terraform 新增 VCF 設備
本頁面說明如何使用端對端 (E2E) Terraform 自動化模組,為 Google Cloud 上 VMware 解決方案中的其他 VMware Cloud Foundation (VCF) 管理設備,佈建 Google Cloud 負載平衡器、預留的內部 IPv4 位址和 Cloud DNS 記錄。
新增其他設備
如要將新的管理設備新增至現有叢集,請使用您在初始部署叢集時使用的 Terraform 工作區和狀態檔案 (terraform.tfstate)。如果設備應位於管理子網路,請將設備新增至 mgmt_ip_values 對應。如果設備應位於 NSX TEP 子網路,請將設備新增至 nsx_ip_values 對應。
下列步驟說明如何新增 VCF Automation Appliance 虛擬 IP (VIP) (auto-vip) 和 VCF Automation Runtime (auto-platform) 設備 (根據 e2e-terraform/sample_management_cluster.tfvars 檔案中的範例設定):
更新變數定義檔案 (
management_cluster.tfvars):將deployment_mode變數設為"appliance_addition",並直接將新的設備項目新增至mgmt_ip_values(或nsx_ip_values) 對應:deployment_mode = "appliance_addition" mgmt_ip_values = { # VCF Control Plane Core Services "sddcm" = "10.200.0.9" # VCF SDDC Manager Appliance "collector" = "10.200.0.10" # VMware Cloud Proxy Appliance "vc01" = "10.200.0.11" # Management vCenter Server Appliance (VCSA) "license" = "10.200.0.16" # VCF License Manager Service "shared01" = "10.200.0.17" # VCF Instance Service Manager "vidb" = "10.200.0.18" # VMware Workspace ONE Access / Identity Broker "vsp01" = "10.200.0.50" # VCF Services Runtime Platform "vsrt" = "10.200.0.51-10.200.0.62" # VCF Services Runtime IP Pool # VMware Aria Suite Operations & Automation Services "ops01" = "10.200.0.12" # VMware Aria Operations Primary Node "ops02" = "10.200.0.24" # VMware Aria Operations Replica Node "ops03" = "10.200.0.25" # VMware Aria Operations Data Node "fleetlcm" = "10.200.0.13" # VMware Aria Operations Fleet Management Service # New appliances added in this operation "auto-vip" = "10.200.0.20" # VCF Automation Appliance VIP "auto-platform" = "10.200.0.21" # VCF Automation Runtime # "auto-node" = "10.200.0.81-10.200.0.85" # VCF Automation Cluster Node IP Pool (5 nodes) # NSX Management Cluster & Management Interfaces "nsx01" = "10.200.0.14" # NSX Management Cluster Floating Virtual IP (VIP) "nsx02" = "10.200.0.15" # NSX Manager Node 1 Management IP "nsx03" = "10.200.0.22" # NSX Manager Node 2 Management IP "nsx04" = "10.200.0.23" # NSX Manager Node 3 Management IP }生成並套用 Terraform 執行計畫:
terraform plan -var-file='management_cluster.tfvars' -out=tfplan terraform apply tfplan
預期行為
套用 appliance_addition 設定時,Terraform 會執行下列不中斷作業:
- 為新設備預留靜態內部 IPv4 位址 (
10.200.0.20和10.200.0.21)。 - 佈建區域性後端服務 (
vcf-mgmt-sample-auto-vip-lb和vcf-mgmt-sample-auto-platform-lb),並設定GARP_RA高可用性快速 IP 移動政策。 - 佈建區域轉送規則 (
vcf-mgmt-sample-auto-vip-fr和vcf-mgmt-sample-auto-platform-fr)。 - 在 Cloud DNS 中註冊正向 (
A) 和反向 (PTR) 記錄。
後續步驟
- 使用線上或離線存放區,在 VCF 9.x 叢集中部署設備。
- 如要瞭解如何調度叢集容量,請參閱「使用 Terraform 管理節點容量」。