Aria Automation
Home Page VCF Automation

Deploying VMware Avi Load Balancer resources with VMware Aria Automation Templates

With the release of VMware Aria Automation 8.16.1 and the new Avi Load Balancer resources let’s look at how to integrate these new resources into your templates. To get familiar with the new resources see the following documentation, Setting up plug-in based VMware Avi Load Balancer resource.

The new VMware Aria Automation and Avi Load Balancer integration provides the ability for the Aria Automation administrator to design templates that take advantage of the extensive L4-L7 load balancing scenarios Avi supports. Additionally, we have exposed all of the Avi resources in the Template canvas to provide complete flexibility in your template designs. All of this together will enable the administrator to provide your users with a self-service catalog to provision Avi resources either as a service or with clustered resources as shown below. For additional examples see our extensive documentation here.



Automation Assembler Template Example

In this example, I will show how to create a cluster of web servers in a Security Group, backed by an Avi Virtual Service IP (VS VIP), Virtual Service (VS), and a Pool with the web servers as members. Also, we will create an Application Profile and Health Monitor. With multiple Avi controllers added to the environment we use a cloud zone allocation helper for provisioning based on cloud account type and constraint tags.

The demo environment has two Avi Controllers named ‘controller1’ and ‘controller2’ with capability tags ‘env:dev’ and ‘env:prod’ respectively. Additionally, there is a vCenter added with both capability tags.

VMware Avi Cloud Accounts

2 Node Web Server

To begin let’s review an aria automation template with two web servers connected to an existing network called ‘VMNetwork-PortGroup’.

2 node web server template

2 Node Web Server added to an Avi Load Balancer

To expand on the 2-node web server template let’s add the web servers to a Pool, create a Virtual Service, and VIP referencing the existing vSphere network.

2 Node Web Server added to an Avi Load Balancer template

VIP

To begin we assign a dynamic name leveraging the uuid function, set a description, and define the Cloud Account to create the VS_VIP resource to. Next, we start by defining a VIP with an id of 0. Set auto_allocate_ip to true, so the Avi controller will Auto-allocate a VIP from the provided subnet. Since the auto_allocate_ip property requires a subnet name, we pass the name of the network resource we are provisioning the web servers on to reference on the Avi controller.

Virtual Service

To create the virtual service, set the dynamic name, description, cloud account, and Avi Cloud type. Then we set the Virtual Service’s port number to 80 for the HTTP web server. Finally, we reference the VS VIP and Pool by their respective resource id’s.

Pool

Create the pool by defining the dynamic name, description, and cloud account. Then set the default server port to define the destination server port the traffic will be sent to.


2 Node Web Server added to an Avi Load Balancer with Cloud Zone Allocation Helpers, Persistence Profiles, Health Monitors, and Security Groups

With the basics configured above, the next step is to consider more advanced environments and deployments.

In this template example, we use a Cloud Zone Allocation Helper and constraint tagging to dynamically provision the request. This is very useful in environments with multiple Avi Cloud Accounts. Next, we create Persistence Profiles and Health Monitors and reference them in our pool configuration. Finally, add the deployed web servers to the desired Security Group.

Cloud Zone Allocation Helper

With Allocation Helpers, we can leverage capability tags like ‘env:dev’ assigned to the ‘controller1’ Cloud Account. For example, you may have multiple VCF workload domains each with their own Avi controller. To ensure the load balancer is created on the Avi controller for the workload domain, we can use the cloud zone allocation helper with the workload domains tag.

Persistence Profiles

Next, create a Persistence Profile to persist the clients to the same server based on their client IP address.

Health Monitors

For the health monitor create an HTTP monitor to monitor port 80 where the web server is running.

Security Group

Lastly, we add the deployed web servers to an existing security group by leveraging the ‘env:dev’ constraint tag.


ALB – Web Servers Template

Now let’s put all of this together in a complete example.

Complete Example


For additional information see our YouTube playlist, Cloud Management blog, and TechZone for additional content.


Discover more from VMware Cloud Foundation (VCF) Blog

Subscribe to get the latest posts sent to your email.