De VMware Aria Automation-integratie met Avi Load Balancer ondersteunt de toewijzing van virtuele IP-adressen van de virtuele service via Avi Load Balancer IPAM. U kunt ook het IP-adres in de sjabloon of als invoer opgeven.
Houd er bij het ontwerpen van uw sjabloon rekening mee dat hoewel sommige eigenschappen mogelijk niet als vereist zijn gemarkeerd, ze mogelijk nog steeds nodig zijn om uw sjabloon te laten werken, afhankelijk van uw gebruikssituatie. De volgende sjabloonvoorbeelden bieden richtlijnen voor verschillende scenario's voor IPAM, vSphere en NSX Cloud.
In sommige van de sjabloonvoorbeelden die gebruikmaken van het kenmerk tier1_lr, kan de naam tier1_lr alleen worden gebruikt wanneer de naam van de logische laag-1-router dezelfde is als de id. Anders moet u het volledige pad voor logische laag-1-router gebruiken, bijvoorbeeld /infra/tier-1s/20f6a214-e8b3-4bb3-aaeb-6c06639ada23.
Voordat u begint
- Configureer het subnet en het IPAM-profiel in de Avi Load Balancer Controller.
- Configureer VMware Aria Automation.
- Maak uw Avi Load Balancer-cloudaccount in Automation Assembler, maak een project en voeg uw cloudzones toe.
- Configureer het netwerk voor inrichting.
Ga naar , zoek het netwerk dat moet worden gebruikt voor de inrichting en configureer de IPv4/IPv6 CIDR- en DNS-servers.
- Configureer de imagetoewijzing.
Ga naar en volg de prompts op het scherm om een nieuwe imagetoewijzing te maken.
Zie Meer informatie over imagetoewijzingen in VMware Aria Automation.
- Configureer het netwerkprofiel.
Ga naar en volg de prompts op het scherm om een nieuw netwerkprofiel te maken.
Zie Meer informatie over netwerkprofielen in VMware Aria Automation.
Statisch IP-adres in VS VIP
Deze Avi Load Balancer-voorbeeldsjabloon bevat een virtuele service, een VS VIP en een pool. Een vSphere-cluster van virtuele machines wordt toegewezen aan de pool. De VS VIP heeft een statisch IP-adres.
formatVersion: 1
inputs:
count:
type: integer
title: vm-count
default: 2
resources:
Idem_AVILB_APPLICATIONS_POOL_1:
type: Idem.AVILB.APPLICATIONS.POOL
properties:
name: pool-${uuid()}
account: Avi
default_server_port: 8000
networks:
- network_ref: ${resource.Cloud_vSphere_Network_1.resourceName}
health_monitor_refs:
- System-HTTP
servers: ${map_to_object(resource.Cloud_vSphere_Machine_1[*].address, "ip", "addr")}
Idem_AVILB_APPLICATIONS_VIRTUAL_SERVICE_1:
type: Idem.AVILB.APPLICATIONS.VIRTUAL_SERVICE
properties:
name: vs-${uuid()}
account: Avi
traffic_enabled: true
services:
- port: 8000
pool_ref: ${resource.Idem_AVILB_APPLICATIONS_POOL_1.name}
vsvip_ref: ${resource.Idem_AVILB_APPLICATIONS_VS_VIP_1.name}
Idem_AVILB_APPLICATIONS_VS_VIP_1:
type: Idem.AVILB.APPLICATIONS.VS_VIP
properties:
name: vip-${uuid()}
account: Avi
vip:
- enabled: true
ip_address:
addr: 10.202.20.80
type: V4
Cloud_vSphere_Machine_1:
type: Cloud.vSphere.Machine
properties:
count: ${input.count}
image: webserver
cpuCount: 1
totalMemoryMB: 1024
networks:
- network: ${resource.Cloud_vSphere_Network_1.id}
assignment: static
Cloud_vSphere_Network_1:
type: Cloud.vSphere.Network
properties:
networkType: existing
Avi Load Balancer IPAM in VS VIP voor vCenter-cloud
Deze Avi Load Balancer-voorbeeldsjabloon is voor vCenter-cloud.
De VS VIP-resource definieert de ipam_network_subnet-sectie met network ref en subnet. Deze definitie maakt Avi Load Balancer om een IP-adres toe te wijzen van het gedefinieerde Avi Load Balancer IPAM-profiel bij het maken van de VS VIP in de Avi Load Balancer Controller.
Het gedefinieerde cluster van poolleden gebruikt een statische netwerktoewijzing. In Automation Assembler configureert u een netwerk, bijvoorbeeld Domein, IPv4/IPv6 CIDR, een standaardgateway en DNS-servers. Vervolgens stelt u een netwerkprofiel in met een netwerkbereik dat gebruikmaakt van dit netwerk. Wanneer clusters worden gemaakt, worden de IP-adressen uit het netwerkbereik toegewezen aan de clusters.
inputs:
count:
type: integer
title: count
default: 2
resources:
Allocations_CustomNaming_1:
type: Allocations.CustomNaming
properties:
resourceType: Generic
numberOfNamesToGenerate: 5
templateName: aviBP
Idem_AVILB_PROFILES_HEALTH_MONITOR_1:
type: Idem.AVILB.PROFILES.HEALTH_MONITOR
properties:
name: test-mon-${resource.Allocations_CustomNaming_1.selectedNames[0]}
type: HEALTH_MONITOR_PING
account: aviAcct
is_federated: false
monitor_port: 8000
send_interval: 8
receive_timeout: 4
successful_checks: 4
failed_checks: 4
Idem_AVILB_APPLICATIONS_POOL_1:
type: Idem.AVILB.APPLICATIONS.POOL
metadata:
layoutPosition:
- 0
- 2
properties:
name: test-pool-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: aviAcct
lb_algorithm: LB_ALGORITHM_ROUND_ROBIN
default_server_port: 8000
networks:
- network_ref: ${resource.Cloud_vSphere_Network_1.resourceName}
health_monitor_refs:
- ${resource.Idem_AVILB_PROFILES_HEALTH_MONITOR_1.name}
servers: ${map_to_object(resource.Cloud_vSphere_Machine_1[*].address, "ip", "addr")}
Idem_AVILB_APPLICATIONS_VIRTUAL_SERVICE_1:
type: Idem.AVILB.APPLICATIONS.VIRTUAL_SERVICE
properties:
name: test-vs-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: aviAcct
cloud_type: CLOUD_NONE
type: VS_TYPE_NORMAL
traffic_enabled: true
services:
- enable_ssl: false
port: 8000
pool_ref: ${resource.Idem_AVILB_APPLICATIONS_POOL_1.name}
vsvip_ref: ${resource.Idem_AVILB_APPLICATIONS_VS_VIP_1.name}
Cloud_vSphere_Machine_1:
type: Cloud.vSphere.Machine
properties:
count: ${input.count}
image: webserver
cpuCount: 1
totalMemoryMB: 1024
networks:
- network: ${resource.Cloud_vSphere_Network_1.id}
assignment: static
Cloud_vSphere_Network_1:
type: Cloud.vSphere.Network
metadata:
layoutPosition:
- 2
- 0
properties:
networkType: existing
Idem_AVILB_APPLICATIONS_VS_VIP_1:
type: Idem.AVILB.APPLICATIONS.VS_VIP
properties:
name: test-vip-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: aviAcct
vip:
- auto_allocate_floating_ip: false
auto_allocate_ip: true
auto_allocate_ip_type: V4_ONLY
avi_allocated_fip: false
avi_allocated_vip: false
enabled: true
ipam_network_subnet:
network_ref: ${resource.Cloud_vSphere_Network_1.resourceName}
subnet:
ip_addr:
addr: 10.202.20.0
type: V4
mask: 22
Avi Load Balancer IPAM in VS VIP voor NSX Cloud
Deze Avi Load Balancer-voorbeeldsjabloon is voor Avi Load Balancer in NSX Cloud.
Voor het inrichten van Avi Load Balancer in NSX Cloud moet een logische laag-1-router worden gedefinieerd (tier1_lr) en/of een VF-context (vrf_context_ref) in de Avi Load Balancer-pool, virtuele service en VS VIP-resources.
De VS VIP-resource definieert de ipam_network_subnet-sectie met network ref en subnet. Deze definitie maakt Avi Load Balancer om een IP-adres toe te wijzen van het gedefinieerde Avi Load Balancer IPAM-profiel bij het maken van de VS VIP in de Avi Load Balancer Controller.
formatVersion: 1
inputs: {}
resources:
Allocations_CustomNaming_1:
type: Allocations.CustomNaming
properties:
resourceType: Generic
numberOfNamesToGenerate: 5
templateName: avinsxBP
Cloud_vSphere_Machine_1:
type: Cloud.vSphere.Machine
properties:
count: 2
image: webserver
cpuCount: 1
totalMemoryMB: 1024
networks:
- network: ${resource.Cloud_vSphere_Network_1.id}
assignment: static
Idem_AVILB_APPLICATIONS_VS_VIP_1:
type: Idem.AVILB.APPLICATIONS.VS_VIP
properties:
name: test-vip-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: avinsx
tier1_lr: DONT-DELETE-AVI-Admin-E2E
vrf_context_ref: T1-DONT-DELETE-AVI-Admin-E2E
vip:
- auto_allocate_floating_ip: false
auto_allocate_ip: true
auto_allocate_ip_type: V4_ONLY
avi_allocated_fip: false
avi_allocated_vip: false
enabled: true
ipam_network_subnet:
network_ref: ${resource.Cloud_vSphere_Network_1.resourceName}
subnet:
ip_addr:
addr: 192.168.223.0
type: V4
mask: 24
Idem_AVILB_APPLICATIONS_VIRTUAL_SERVICE_1:
type: Idem.AVILB.APPLICATIONS.VIRTUAL_SERVICE
properties:
name: test-vs-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: avinsx
cloud_type: CLOUD_NONE
type: VS_TYPE_NORMAL
traffic_enabled: true
vrf_context_ref: T1-DONT-DELETE-AVI-Admin-E2E
services:
- enable_ssl: false
port: 80
port_range_end: 8000
pool_ref: ${resource.Idem_AVILB_APPLICATIONS_POOL_1.name}
vsvip_ref: ${resource.Idem_AVILB_APPLICATIONS_VS_VIP_1.name}
Idem_AVILB_APPLICATIONS_POOL_1:
type: Idem.AVILB.APPLICATIONS.POOL
properties:
name: test-pool-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: avinsx
lb_algorithm: LB_ALGORITHM_ROUND_ROBIN
tier1_lr: DONT-DELETE-AVI-Admin-E2E
vrf_ref: T1-DONT-DELETE-AVI-Admin-E2E
health_monitor_refs:
- System-Ping
servers: ${map_to_object(resource.Cloud_vSphere_Machine_1[*].address, "ip", "addr")}
Cloud_vSphere_Network_1:
type: Cloud.vSphere.Network
properties:
networkType: existing
Infoblox IPAM in VS VIP voor NSX Cloud
Deze Avi Load Balancer-voorbeeldsjabloon is gebaseerd op de Avi Load Balancer-integratie met Infoblox. De sjabloon maakt gebruik van Infoblox IPAM om een IP-adres aan de VS VIP voor Avi Load Balancer in NSX Cloud toe te wijzen.
Het kenmerk network_ref van de sectie ipam_network_subnet in de sjabloon is ingesteld op het volledige pad van het netwerksegment dat is gedefinieerd in Infoblox. Houd er rekening mee dat de waarde voor network_ref een volledig pad moet zijn, inclusief het voorvoegsel /api/network/. Dit is anders dan andere ref-kenmerken.
formatVersion: 1
inputs:
count:
type: integer
title: count
default: 2
resources:
Idem_AVILB_APPLICATIONS_VIRTUAL_SERVICE_1:
type: Idem.AVILB.APPLICATIONS.VIRTUAL_SERVICE
properties:
name: infoblox-vs-${uuid()}
account: aviinfoblox
vrf_context_ref: nested-T1
services:
- port: 8000
vsvip_ref: ${resource.Idem_AVILB_APPLICATIONS_VS_VIP_1.name}
pool_ref: ${resource.Idem_AVILB_APPLICATIONS_POOL_1.name}
Idem_AVILB_APPLICATIONS_VS_VIP_1:
type: Idem.AVILB.APPLICATIONS.VS_VIP
properties:
name: infoblox-vip-${uuid()}
account: aviinfoblox
vrf_context_ref: nested-T1
tier1_lr: nested-T1
vip:
- auto_allocate_ip: true
ipam_network_subnet:
network_ref: /api/network/infoblox--default--192.168.225.0-24
Idem_AVILB_APPLICATIONS_POOL_1:
type: Idem.AVILB.APPLICATIONS.POOL
properties:
name: infoblox-pool-${uuid()}
account: aviinfoblox
tier1_lr: nested-T1
default_server_port: 8000
health_monitor_refs:
- System-HTTP
servers: ${map_to_object(resource.Cloud_vSphere_Machine_1[*].address, "ip", "addr")}
Cloud_vSphere_Machine_1:
type: Cloud.vSphere.Machine
properties:
count: ${input.count}
image: webserver
cpuCount: 2
totalMemoryMB: 4096
networks:
- network: ${resource.Cloud_NSX_Network_1.id}
assignment: static
Cloud_NSX_Network_1:
type: Cloud.NSX.Network
properties:
networkType: existing
Bestaande NSX-beveiligingsgroep voor poolleden
Deze Avi Load Balancer-voorbeeldsjabloon gebruikt een bestaande NSX-beveiligingsgroep om poolleden toe te wijzen.
Het kenmerk nsx_securitygroup wordt gedefinieerd en ingesteld op de naam van de bestaande NSX-beveiligingsgroep in de Idem.AVILB.APPLICATIONS.POOL-resource.
formatVersion: 1
inputs:
count:
type: integer
title: vm-count
default: 2
resources:
Idem_AVILB_APPLICATIONS_VS_VIP_1:
type: Idem.AVILB.APPLICATIONS.VS_VIP
properties:
name: vip-sg-${uuid()}
account: ${resource.Allocations_CloudZone_1.selectedCloudAccount.name}
tier1_lr: DONT-DELETE-AVI-Admin-E2E
vrf_context_ref: T1-DONT-DELETE-AVI-Admin-E2E
vip:
- auto_allocate_floating_ip: false
auto_allocate_ip: true
enabled: true
auto_allocate_ip_type: V4_ONLY
ipam_network_subnet:
network_ref: SEG-DONT-DELETE-AVI-Admin-E2E-Two-Arm-VSVIP
subnet:
ip_addr:
addr: 192.168.223.0
type: V4
mask: 24
Allocations_CloudZone_1:
type: Allocations.CloudZone
properties:
accountType: avilb
constraints:
- tag: avi-nsx
Idem_AVILB_APPLICATIONS_VIRTUAL_SERVICE_1:
type: Idem.AVILB.APPLICATIONS.VIRTUAL_SERVICE
properties:
name: vs-sg-${uuid()}
account: ${resource.Allocations_CloudZone_1.selectedCloudAccount.name}
vrf_context_ref: T1-DONT-DELETE-AVI-Admin-E2E
traffic_enabled: true
services:
- port: 8000
vsvip_ref: ${resource.Idem_AVILB_APPLICATIONS_VS_VIP_1.name}
pool_ref: ${resource.Idem_AVILB_APPLICATIONS_POOL_1.name}
Idem_AVILB_APPLICATIONS_POOL_1:
type: Idem.AVILB.APPLICATIONS.POOL
properties:
name: pool-sg-${uuid()}
account: ${resource.Allocations_CloudZone_1.selectedCloudAccount.name}
tier1_lr: DONT-DELETE-AVI-Admin-E2E
vrf_ref: T1-DONT-DELETE-AVI-Admin-E2E
lb_algorithm: LB_ALGORITHM_ROUND_ROBIN
health_monitor_refs:
- System-Ping
nsx_securitygroup:
- avinsxgroup
Twee afzonderlijke machineclusters in één pool
servers in de Idem-pool verschilt van de normale bindingseigenschappen. Deze verbindt de adressen van de twee serverclusters wanneer de functie map_to_object op de volgende manier wordt aangeroepen:
${map_to_object(resource.Cloud_vSphere_Machine_1[*].address + resource.Cloud_vSphere_Machine_2[*].address, "ip", "addr")}
Andere onderdelen, zoals de toewijzingshelper voor de virtuele service, VS VIP, statusmonitor en cloudzone, worden op de normale manier gebruikt.
formatVersion: 1
inputs: {}
resources:
Idem_AVILB_PROFILES_HEALTH_MONITOR_1:
type: Idem.AVILB.PROFILES.HEALTH_MONITOR
properties:
name: monitor-${resource.Allocations_CustomNaming_1.selectedNames[0]}
type: HEALTH_MONITOR_PING
account: ${resource.Allocations_CloudZone_1.selectedCloudAccount.name}
is_federated: false
monitor_port: 8000
send_interval: 8
receive_timeout: 4
successful_checks: 4
failed_checks: 4
Allocations_CloudZone_1:
type: Allocations.CloudZone
properties:
accountType: avilb
constraints:
- tag: avi-vcenter
Idem_AVILB_APPLICATIONS_POOL_1:
type: Idem.AVILB.APPLICATIONS.POOL
properties:
name: pool-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: ${resource.Allocations_CloudZone_1.selectedCloudAccount.name}
lb_algorithm: LB_ALGORITHM_ROUND_ROBIN
default_server_port: 8000
servers: ${map_to_object(resource.Cloud_vSphere_Machine_1[*].address + resource.Cloud_vSphere_Machine_2[*].address, "ip", "addr")}
health_monitor_refs:
- ${resource.Idem_AVILB_PROFILES_HEALTH_MONITOR_1.name}
Idem_AVILB_APPLICATIONS_VS_VIP_1:
type: Idem.AVILB.APPLICATIONS.VS_VIP
properties:
name: vip-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: ${resource.Allocations_CloudZone_1.selectedCloudAccount.name}
vip:
- auto_allocate_ip: true
auto_allocate_ip_type: V4_ONLY
enabled: true
placement_networks:
- network_ref: ${resource.Cloud_vSphere_Network_1.resourceName}
subnet:
ip_addr:
addr: 10.202.20.0
type: V4
mask: 22
Allocations_CustomNaming_1:
type: Allocations.CustomNaming
properties:
resourceType: Generic
numberOfNamesToGenerate: 1
templateName: avi-vcenter-bp
Idem_AVILB_APPLICATIONS_VIRTUAL_SERVICE_1:
type: Idem.AVILB.APPLICATIONS.VIRTUAL_SERVICE
properties:
name: vs-${resource.Allocations_CustomNaming_1.selectedNames[0]}
account: ${resource.Allocations_CloudZone_1.selectedCloudAccount.name}
traffic_enabled: true
services:
- port: 8000
pool_ref: ${resource.Idem_AVILB_APPLICATIONS_POOL_1.name}
vsvip_ref: ${resource.Idem_AVILB_APPLICATIONS_VS_VIP_1.name}
Cloud_vSphere_Machine_1:
type: Cloud.vSphere.Machine
properties:
count: 2
image: photon
cpuCount: 1
totalMemoryMB: 1024
networks:
- network: ${resource.Cloud_vSphere_Network_1.id}
assignment: static
Cloud_vSphere_Machine_2:
type: Cloud.vSphere.Machine
properties:
count: 3
image: photon
cpuCount: 1
totalMemoryMB: 1024
networks:
- network: ${resource.Cloud_vSphere_Network_1.id}
assignment: static
Cloud_vSphere_Network_1:
type: Cloud.vSphere.Network
properties:
networkType: existing