クラウド管理者は、Google Cloud Platform (GCP) プラグインを利用してロード バランサを作成することにより、高可用性などのカスタム ソリューションをサポートできます。
特定の要件をサポートするように、ロード バランサ構成のいくつかの側面を構成できます。たとえば、これらの機能は、SAP NetWeaver および SAP Hana 用のインフラストラクチャのプロビジョニングをサポートできます。この構成により、複数のロード バランサ インスタンスを、それぞれ異なるアベイラビリティ ゾーンに展開できます。
ロード バランサをプロビジョニングする前に、
VMware Aria Automation 内の適切なコンポーネントを設定する必要があります。
- GCP クラウド アカウントを持っていない場合は、作成します。
- フレーバー マッピングとイメージ マッピングを設定します。
- デフォルトのネットワーク プロファイルを作成します。
- コンピューティング アベイラビリティ ゾーンを作成し、適切にタグ付けします。これらのタグにより、テンプレート内の特定のアベイラビリティ ゾーンにインスタンスとインスタンス グループをプロビジョニングできます。
これらの手順を完了したら、
Automation Assembler の
[デザイン] タブを開いてテンプレートを作成できます。テンプレートを作成するときは、次の要因を考慮してください。
- テンプレートは、健全性チェック、インスタンス、インスタンス グループ、バックエンド サービス、転送ルール、ファイアウォールの仕様を満たす適切なロード バランサ構成をモデル化している必要があります。
- テンプレートは、展開先の仮想マシンとアベイラビリティ ゾーンを指定している必要があります。
内部 TCP ロード バランサの設定
次のテンプレートは、SAP Hana 用の内部 TCP ロード バランサを設定する方法の例を示しています。このテンプレートを展開するには、以下が必要です。
この例のテンプレートでは、いくつかのリソースに対して割り当てヘルパーを使用して割り当てロジックを提供しています。テンプレートには、2 つのインスタンス、インスタンス グループ、1 つの健全性チェック リソース、1 つのファイアウォール リソース、1 つのバックエンド サービス リソース、1 つの転送ルール リソースが含まれています。
このテンプレートを展開した後、Google Cloud コンソールにログインして、インスタンス グループに追加するインスタンスをフィルタリングして選択できます。オプションとして、インスタンス グループと同じゾーン内のインスタンスのみが表示されます。Google Cloud コンソールで、インスタンス グループを参照してください。
formatVersion: 1
inputs:
suffix:
type: string
title: ''
resources:
Allocations_Image_1:
type: Allocations.Image
properties:
image: ubuntu
Allocations_Compute_1:
type: Allocations.Compute
properties:
accountType: gcp
constraints:
- tag: zone-a
Allocations_Compute_2:
type: Allocations.Compute
properties:
constraints:
- tag: zone-b
Allocations_Flavor_1:
type: Allocations.Flavor
properties:
flavor: medium
Idem_GCP_COMPUTE_NETWORK_1:
type: Idem.GCP.COMPUTE.NETWORK
properties:
name: network-doc-1-${input.suffix}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
auto_create_subnetworks: false
Idem_GCP_COMPUTE_SUBNETWORK_1:
type: Idem.GCP.COMPUTE.SUBNETWORK
properties:
name: subnetwork-doc-1-${input.suffix}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
network: ${Idem_GCP_COMPUTE_NETWORK_1.resource_id}
region: ${resource.Allocations_Compute_1.selectedRegion.name}
ip_cidr_range: '10.0.10.0/24'
Idem_GCP_COMPUTE_INSTANCE_1:
type: Idem.GCP.COMPUTE.INSTANCE
properties:
name: vm-doc-1-${input.suffix}
zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
can_ip_forward: false
project: ${resource.Allocations_Compute_1.selectedCloudAccount.additionalProperties.gcp.project}
network_interfaces:
- name: nic0
stack_type: IPV4_ONLY
subnetwork: ${Idem_GCP_COMPUTE_SUBNETWORK_1.resource_id}
disks:
- initialize_params:
disk_name: disk-doc-boot-1-${input.suffix}
source_image: ${resource.Allocations_Image_1.selectedImageId}
disk_size_gb: 12
disk_type: ${'/projects/' + resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project + '/zones/' + resource.Allocations_Compute_1.selectedPlacementCompute.id + '/diskTypes/pd-standard'}
boot: true
auto_delete: true
machine_type: ${'/projects/' + resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project + '/zones/' + resource.Allocations_Compute_1.selectedPlacementCompute.id + '/machineTypes/' + resource.Allocations_Flavor_1.selectedInstanceTypeName}
tags:
items:
- net-tag-1
- net-tag-2
Idem_GCP_COMPUTE_INSTANCE_2:
type: Idem.GCP.COMPUTE.INSTANCE
properties:
name: vm-doc-2-${input.suffix}
zone: ${resource.Allocations_Compute_2.selectedPlacementCompute.id}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
can_ip_forward: false
project: ${resource.Allocations_Compute_1.selectedCloudAccount.additionalProperties.gcp.project}
network_interfaces:
- name: nic0
stack_type: IPV4_ONLY
subnetwork: ${Idem_GCP_COMPUTE_SUBNETWORK_1.resource_id}
disks:
- initialize_params:
disk_name: disk-doc-boot-2-${input.suffix}
source_image: ${resource.Allocations_Image_1.selectedImageId}
disk_size_gb: 12
disk_type: ${'/projects/' + resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project + '/zones/' + resource.Allocations_Compute_1.selectedPlacementCompute.id + '/diskTypes/pd-standard'}
boot: true
auto_delete: true
machine_type: ${'/projects/' + resource.Allocations_Flavor_1.selectedCloudAccount.additionalProperties.gcp.project + '/zones/' + resource.Allocations_Compute_2.selectedPlacementCompute.id + '/machineTypes/' + resource.Allocations_Flavor_1.selectedInstanceTypeName}
tags:
items:
- net-tag-1
- net-tag-2
Idem_GCP_COMPUTE_INSTANCE_GROUP_1:
type: Idem.GCP.COMPUTE.INSTANCE_GROUP
properties:
name: ig-doc-1-${input.suffix}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id}
network: ${Idem_GCP_COMPUTE_NETWORK_1.resource_id}
Idem_GCP_COMPUTE_INSTANCE_GROUP_2:
type: Idem.GCP.COMPUTE.INSTANCE_GROUP
properties:
name: ig-doc-2-${input.suffix}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
zone: ${resource.Allocations_Compute_2.selectedPlacementCompute.id}
network: ${Idem_GCP_COMPUTE_NETWORK_1.resource_id}
Idem_GCP_COMPUTE_HEALTH_CHECK_1:
type: Idem.GCP.COMPUTE.HEALTH_CHECK
properties:
name: hc-doc-1-${input.suffix}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
type_: TCP
check_interval_sec: 10
timeout_sec: 10
unhealthy_threshold: 2
healthy_threshold: 2
tcp_health_check:
port: 80
proxy_header: NONE
Idem_GCP_COMPUTE_FIREWALL_1:
type: Idem.GCP.COMPUTE.FIREWALL
properties:
name: f-doc-1-${input.suffix}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
network: ${Idem_GCP_COMPUTE_NETWORK_1.resource_id}
direction: INGRESS
target_tags:
- net-tag-1
- net-tag-2
allowed:
- ip_protocol: tcp
ports:
- ${resource.Idem_GCP_COMPUTE_HEALTH_CHECK_1.tcp_health_check.port}
Idem_GCP_COMPUTE_BACKEND_SERVICE_1:
type: Idem.GCP.COMPUTE.BACKEND_SERVICE
properties:
name: bs-doc-1-${input.suffix}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
health_checks:
- ${resource.Idem_GCP_COMPUTE_HEALTH_CHECK_1.resource_id}
load_balancing_scheme: INTERNAL
region: ${resource.Allocations_Compute_1.selectedRegion.id}
network: ${Idem_GCP_COMPUTE_NETWORK_1.resource_id}
failover_policy:
drop_traffic_if_unhealthy: true
disable_connection_drain_on_failover: true
failover_ratio: 1
backends:
- group: ${resource.Idem_GCP_COMPUTE_INSTANCE_GROUP_1.resource_id}
- group: ${resource.Idem_GCP_COMPUTE_INSTANCE_GROUP_2.resource_id}
failover: true
Idem_GCP_COMPUTE_FORWARDING_RULE_1:
type: Idem.GCP.COMPUTE.FORWARDING_RULE
properties:
ip_protocol: TCP
name: fr-doc-1-${input.suffix}
account: ${resource.Allocations_Compute_1.selectedCloudAccount.name}
load_balancing_scheme: INTERNAL
backend_service: ${resource.Idem_GCP_COMPUTE_BACKEND_SERVICE_1.resource_id}
all_ports: true
region: ${resource.Allocations_Compute_1.selectedRegion.id}
subnetwork: ${Idem_GCP_COMPUTE_SUBNETWORK_1.resource_id}
ip_address: '10.0.10.102'