클라우드 관리자는 GCP(Google Cloud Platform) 플러그인을 활용하여 고가용성을 비롯한 사용자 지정 솔루션을 지원하기 위한 로드 밸런서를 생성할 수 있습니다.
특정 요구 사항을 지원하도록 로드 밸런서 구성의 여러 측면을 구성할 수 있습니다. 이러한 기능은 예를 들어 SAP NetWeaver 및 SAP Hana에 대한 프로비저닝 인프라를 지원할 수 있습니다. 이 구성을 사용하면 서로 다른 가용성 영역에 서로 다른 로드 밸런서 인스턴스를 배포할 수 있습니다.
로드 밸런서를 프로비저닝하기 전에
VMware Aria Automation에서 적절한 구성 요소를 설정해야 합니다.
- GCP 클라우드 계정이 없는 경우 생성합니다.
- 플레이버 및 이미지 매핑을 설정합니다.
- 기본 네트워크 프로파일을 생성합니다.
- 계산 가용성 영역을 생성하고 적절하게 태그를 지정합니다. 이러한 태그를 사용하면 템플릿의 특정 가용성 영역에 인스턴스 및 인스턴스 그룹을 프로비저닝할 수 있습니다.
이러한 단계를 완료한 후에는
Automation Assembler에서
설계 탭을 열어 템플릿을 생성할 수 있습니다. 템플릿을 구축할 때 다음 요소를 고려하십시오.
- 템플릿은 상태 점검, 인스턴스, 인스턴스 그룹, 백엔드 서비스, 전달 규칙 및 방화벽에 대한 규격을 사용하여 적절한 로드 밸런서 구성을 모델링해야 합니다.
- 템플릿은 배포해야 하는 가상 시스템 및 가용성 영역을 지정해야 합니다.
내부 TCP 로드 밸런서 설정
다음 템플릿은 SAP Hana에 대한 내부 TCP 로드 밸런서를 설정하는 방법을 보여줍니다. 이 템플릿을 배포하려면 다음이 필요합니다.
- 네트워크
- 하위 네트워크 IP CIDR 범위
- 내부 로드 밸런서의 VIP(가상 IP) 주소
이것은 전달 규칙에 대해 설정한 주소입니다. NetWeaver 및 SAP Harbor에 대한 IP 주소를 예약하는 방법을 알아보려면 Google Cloud 설명서를 참조하십시오.
이 예제 템플릿은 할당 도우미를 사용하여 여러 리소스에 대한 할당 논리를 제공합니다. 템플릿에는 인스턴스 그룹, 상태 점검 리소스, 방화벽 리소스, 백엔드 서비스 리소스 및 전달 규칙 리소스라는 두 개의 인스턴스가 포함됩니다.
이 템플릿을 배포한 후 Google Cloud Console에 로그인하여 인스턴스 그룹에 추가할 인스턴스를 필터링하고 선택할 수 있습니다. 인스턴스 그룹과 동일한 영역에 있는 인스턴스만 옵션으로 표시됩니다. Google Cloud Console에서 인스턴스 그룹을 참조하십시오.
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'