Installing Avi Controller in Amazon Web Services

Overview

This installation guide discusses how to integrate Avi Vantage with Amazon Elastic Compute Cloud (Amazon EC2) instances. The Amazon EC2 is one of the services provided by Amazon Web Service (AWS). Amazon EC2 instance types comprise various combination of memory, storage, CPU, and networking capacity. The integration of the Amazon EC2 instances with Avi Vantage provides flexibility to choose from a varied range of resources based on the an application or user requirements. Avi Vantage offers elastic application services that extend beyond load balancing to deliver real-time application and security insights, simplify troubleshooting, auto scale predictively, and enable developer self-service and automation in Amazon Web Services. The Avi Vantage Platform has three core components:

  • Avi Service Engines: The Avi Controller analyzes traffic and, based on real-time analytics, can scale out / scale in SEs to load-balance traffic that varies over time.
  • Avi Controller cluster: Avi Service Engines (SEs) handle all data plane operations within Avi Vantage by receiving and executing instructions from the Avi Controller. The SEs perform load balancing and handle client and server traffic.
  • Avi admin console: The Avi Console is a modern web-based user interface that provides role-based access to control, manage and monitor applications.


For more information on Avi Vantage’s components, refer to Avi Vantage Architectural Overview.

Prerequisites

  • Ports for management and network services
  • Credential methods
  • Knowledge of AWS VPC

Enabling Ports for Management and Network Services


Avi Controller and Avi Service Engines use specific ports for management and network services. The firewall should allow traffic for these ports.

For the detailed information on the required management ports, refer to Protocol Ports Used by Avi Vantage for Management Communication

Note: The ports mentioned in the article are applicable for both Avi Controller and Service Engine communication with AWS Cloud.

Configuring Credential Methods


When deploying Avi Vantage within Amazon Web Services (AWS), the installation wizard prompts for input of credential information. You are not required to enter AWS Secret and Access key credentials. The credentials can be entered in either of the following forms:

Note: The credential methods mentioned in this section are used during AWS cloud configuration.

  • Identity and Access Management (IAM) roles: IAM roles are the set of policies that define access to resources within AWS. The roles and the policies that define their access are defined in JSON files. This method does not require an AWS account key. Instead, the role and policy files must be downloaded from Avi Networks and installed using the AWS CLI. (Download links for the role and policy files, and the required AWS CLI syntax, are provided in IAM Roles.) After setting up the IAM roles, return to this article to install the Avi Vantage EC2 instance. Use this method if you don’t want to enter AWS credentials. Following are the mandatory IAM roles that should be configured through Amazon Management Console:
    • vmimport
    • AviController-Refined-Role

    Note: During cloud creation in AWS, an AMI is created using which Service Engines are created. As part of AMI creation, a vmdk disk image is imported to AWS as a snapshot and then the snapshot is registered as an AMI. So, vmimport role is required for importing VMDK disk image in AWS as a snapshot.
    For more details on IAM roles, refer to IAM Role Setup for Installation into AWS..

  • AWS customer account key: A unique authentication key associated with the AWS account. Access credentials are needed by the Avi Controller to communicate with AWS APIs. Note: AWS cloud configuration with Avi SaaS Controller only supports the Use Access/Secret Key credentials method.
    For more information on using access key on AWS, to Managing Access Keys for Your AWS Account User.

  • Use Cross-Account AssumeRole: Avi Vantage can be deployed for Amazon Web Services (AWS) with multiple AWS accounts utilizing the IAM AssumeRole functionality that provides access across AWS accounts to the AWS resources/API from the respective accounts, instead of sharing user Access Key ID and Secret Access Key from different accounts.
    For the detailed information on Cross-Account AssumeRole, refer to AWS Cross-Account AssumeRole Support.

Knowledge of AWS VPC


Knowledge of AWS VPC (Virtual Private Cloud) is required for configuring your network space (e.g., availability zone, subnets of Controller and SEs).

All IP addresses (e.g., Controller management IP, SE management IP, virtual service IPs, and server IP addresses) need to be planned and configured accordingly.

Minimum Requirements and Recommendations

Minimum Requirements for AWS virtual machines

The following table lists the minimum requirements for the VMs on which the Avi Controller and Avi SEs are installed.

Component Memory vCPUs Disk
Avi Controller 24 GB 8 64 GB
Service Engine 2 GB 2 10 GB

Instances Types according to the deployment types

For the Avi Controller, Avi recommends the following Instance Types for three deployment sizes:

Deployment Size Virtual Service Scale Instance Type Memory vCPUs Disk (Minimum)
Small 100 m4.2xlarge 32 GB 8 64 GB
Medium 1000 c4.4xlarge /
m4.4xlarge
30 GB /
64 GB
16 /
16
64 GB
Large 5000 c4.8xlarge /
m4.10xlarge
60 GB /
160 GB
32 /
40
64 GB

Avi Controller Sizing

Refer to the section Disk Capacity Allocation on the Avi Controller Sizing KB for recommended hard disk size.

Resiliency and Redundancy

For added resiliency and redundancy, the Avi Controller can be deployed as a 3-node cluster. [See Overview of Avi Vantage High Availability.] In this case, a separate VM is needed for each of the 3 Avi Controller nodes. The requirements are the same for each node.

Avi Controller Instantiation

Note: vmimport role is mandatory for installing Avi Vantage in AWS. For more details on IAM role refer to IAM Role Setup for Installation into AWS.

To install Avi Vantage in AWS, deploy an EC2 instance of the Avi Controller and then run the Avi Controller setup wizard.

Deploying an EC2 Avi Controller Instance

  • Access Amazon Web Services (AWS) using https://aws.amazon.com and log in using your AWS credentials. Go to the Avi Vantage page on AWS Marketplace here.

    Avi Vantage on AWS Marketplace

  • Click Continue to start the AMI deployment process. You can either perform a 1-Click launch or a Manual Launch via the EC2 console, API, or CLI. The subsequent screenshots below go through the Manual (EC2 Console) installation process.

    AVI AWS AMI

  • Based on the deployment scale considerations, choose an appropriate instance type. Amazon defines its EC2 instance types AWS Instances.
    Note: Starting with NSX Advanced Load Balancer 22.1.3, AWS IMDSv2 is supported for the deployment.

  • Refer to the Minimum Requirements and Recommendations section for minimum requirements and recommendations as mentioned previously.
    The below example shows a choice of 4 CPUs and 16 GB memory.

    m4_xlarge_instance
    Note:Starting with Avi Vantage release 22.1.4, 1G (memory) instances are deprecated, and 2G (memory) instances are the recommended minimum value.

  • Select the appropriate VPC from the Network pull-down list and select the network from the Subnet pull-down list. This is the subnet in which the Controller will get the IP for the management NIC. Also, select the Enable termination protection option.

    VPC_options

    Note: If installing with an IAM role instead of an AWS customer account key, select IAM role if you have created as explained in Credential Method. In this example we have used the IAM Role AviController-Refined-Role.

  • In the Size (G/B) field, enter 64 to allocate 64 GB to the Avi Controller instance, and go to the “Next:Tag Instance” option.

    Storage

  • Enter a name for this Avi Controller instance.

    Tag_instance

  • Create a security group that allows traffic through the firewall, to allow management communication between the Avi Controller and the Avi Service Engines (SEs)

    Security_group

  • Select SSD as the storage type. (This enhances the responsiveness of the Avi Controller web interface.)

    SSD

  • Review your EC2 instance, and click Launch.

    Review_instance_launch

  • Key Pair Settings
    If you don’t have a key pair, create a new key pair. After downloading the key pair, change the permissions to “400” (chmod 400 “.pem”) to do SSH.

    new_key_pair

  • If you have a key pair, select a key pair for AMI authentication.

    existing_key_pair

  • The deployment status of the Avi Controller EC2 instance into AWS is displayed. When the instance is ready (status “running”), you can access the instance using a private or public IP address. Wait for all checks to pass before setting up the Controller.

    running_instance

Configuring Avi Vantage

Initial Configuration


Starting with Avi Vantage release 18.2.3, the default password option for admin user is no longer available.


local@Avi-Dev:~# ssh -i avitest-aws-key.pem admin@10.10.1.1 "sudo /opt/avi/scripts/initialize_admin_user.py --password Password@123" 
  
 Avi Cloud Controller
 
 Avi Networks software, Copyright (C) 2013-2017 by Avi Networks, Inc.
 All rights reserved.
 
 Version:      18.2.3
 Date:         2019-05-01 22:43:26 UTC
 Build:        9063
 Management:   10.10.1.1/24                 UP
 Gateway:      10.10.1.10                   UP
 
 
 
 [node1.controller.local] Executing task 'sync_linux_one_user' 
 DEPLOY_OVERRIDES {} 
 [node1.controller.local] sudo: export PYTHONPATH=/opt/avi/python/lib && /opt/avi/scripts/linux_user_maintenance.py --sync-user '{"username": "admin", "uid": 2000, "is_sudoer": true, "controller": true, "unix_crypt_password": "abc12345", "delete": false}'
 [node1.controller.local] out: The user `admin' is already a member of `sudo'.
 [node1.controller.local] out:
 
 [node1.controller.local] Executing task 'sync_cli_user' 
 Resetting password for user admin. 
 Password reset complete
 local@Avi-Dev:~#

Once the admin password is configured, point your browser to the Avi Controller IP and follow the remaining steps as mentioned below.

  • Provide details for DNS and NTP Settings (This information can be entered later on too).

    dns

  • Provide the desired email address for sending alerts from the controller (Can be set up at a later stage).

    smtp

  • Select No Orchestrator to complete the initial configuration.

    no-orchestrator.png

  • Continue by clicking on No for Support multiple Tenants (Multi-tenancy can be enabled later).

    VMware-deploy-WriteAccessmode-Ctlr-setup-multtenantsbox-162

  • Once the setup is completed, the browser will automatically refresh to the Avi Controller dashboard. This completes the installation process. The Avi Controller is now ready for deploying virtual services.

  1. The next step is to configure AWS cloud on Avi Vantage. For more information on this, refer to Configuring Avi Vantage for Application Delivery in Amazon Web Services.
  2. Once the cloud is configured on Avi Controller, complete the steps for configuring virtual service. For more information, refer to Virtual Service Creation on Avi Vantage.

Encryption Options Available for AWS Deployment

  • SNS and SQS Encryption
    Server-Side Encryption (SSE) of Amazon Simple Queue Service (SQS) message queues is supported by Avi Vantage starting in release 17.2.8. Encrypting a queue does not encrypt backlogged messages, nor does turning off encryption remove encryption from backlogged messages. SQS queue encryption is supported only in 3 AWS regions as of the time of this writing: US EAST (N. Virginia), US EAST (Ohio), and US WEST (Oregon).
    For more information on SNS and SQS encryption, refer to the following articles:
  • EBS Encryption
    Amazon EBS encryption is a solution offered to encrypt EBS volumes. Encrypting EBS volumes and attaching it to the supported instance type encrypts the data inside the volume, all data moving between the volume and the instance, all snapshots created from the volume, and all volumes created from those snapshots. Avi Vantage supports enabling EBS and S3 encryption using AWS SSE-KMS which encrypts the Amazon Machine Image (AMI).
    For more information on Amazon EBS encryption support, refer to Amazon EBS Encryption Support in Avi Vantage.

Note:
Starting with NSX Advanced load balancer 22.1.3, GP3 is the default EBS volume type. Prior to this, GP2 was the default EBS volume type.

DPDK support on AWS native AMI SE

Starting with Avi Vantage release 20.1.1, DPDK support on AWS native AMI SE is available at the Service Engine level. The following options are available under the SE Group boot-up properties for the DPDK support:

  • se_dpdk_pmd – This configuration knob enables the DPDK mode when the value of the se_dpdk_pmd parameter is set to 1.
  • max_queues_per_vnic – The max_queues_per_vnic parameter in SE-group properties allows configuring the maximum number of queues per dispatcher.

Notes:

Additional Information