Installing Avi Integration with Mesos in AWS

This article describes how to deploy Avi Vantage with Mesosphere DC/OS in Amazon Web Services (AWS).

Avi Vantage

Avi Vantage is a software-based solution that provides elastic application delivery services and real-time analytics, such as load balancing, SSL termination, and user-to-application timing. aws-mesos-install-arch


Avi Vantage is a fully distributed, virtualized system that consists of Avi Controller and Avi Service Engines (SEs), running as containers.

  • Avi Controller: Container that acts as a single point of control and management, providing a web interface, analytics, and REST API. Avi Controller manages the life cycle of Avi SEs by creating, controlling, and deleting them. The Avi Controller stores and manages all policies related to services and management. The Avi Controller is also a single point of contact exposed to other cloud platforms and SDN controllers. For example, it can communicate with the Mesosphere DC/OS master, a VMware vCenter, an OpenStack controller, and Cisco APIC.
  • Avi Service Engine (SE): Container that takes actual user traffic and provides application delivery services while collecting real-time metrics for user-to-application timing. An Avi SE is dynamically created, plumbed into the network, and provisioned with a service policy by the Avi Controller, as required to deploy an application in Marathon. The application is treated as a virtual service in Avi Vantage. The virtual service can be a combination of an IP address and TCP/UDP port number, or just a port number, that represents a load balancing service.

Integration with Mesosphere DC/OS

Mesosphere DC/OS

Mesosphere DC/OS is host cluster resource management system. Mesosphere DC/OS provides resource management in terms of CPU, memory and host ports.

The DC/OS also includes a set of core system services, such as a native Marathon instance to manage processes and installable services, and Mesos-DNS for service discovery. The DC/OS provides a web interface and a command-line interface (CLI) to manage the deployment and scaling of your applications.


Marathon manages all processes and services throughout the DC/OS cluster. Marathon starts and monitors applications and services, and automatically heals failures.

A native Marathon instance is installed as a part of Mesosphere DC/OS. After DC/OS has been started, you can manage the native Marathon instance through the web interface at /marathon or from the DC/OS CLI with the dcos marathon command.

Docker Hub

Docker Hub is a registry service for building and shipping application or service containers on a cloud or hosted privately. It provides a centralized resource for container image discovery, distribution, and change management.

Docker Hub is responsible for image management for all applications, services, and big data infrastructure throughout the Mesos infrastructure.

CoreOS and Fleet

CoreOS is an operating system optimized for container-based solutions using Linux as well as Docker containers. Fleet is one of the distributed cluster management services provided by CoreOS. Fleet is used for cluster job scheduling.

Software Versions

Software Version
Avi Vantage 15.3.1 or higher
Mesosphere DC/OS 1.0.0
Marathon 0.9.1
CoreOS 717.3.0
Docker client, server 1.6.2
Fleet 0.10.2


Note: When deploying the Avi Controller on CentOS with Mesosphere, Avi recommends CentOS 7.2 and CentOS kernel 3.18 or later. The Docker Engine should use Overlay FS.

System Time (NTP) Requirement

The system time on all nodes must be synchronized. Use of a Network Time Protocol (NTP) server is recommended.

Solution Overview

Avi Vantage solution tightly integrates with the Mesos environment, providing enterprise-grade proxy services in the Mesos environment along with these additional benefits:

  • Firewall/ micro-segmentation
  • Application visibility
  • Autoscaling

In a Mesos environment, the Avi Controller requires an Avi SE to be created on every Mesos node. The Avi Controller requests Fleet to create SEs on all Mesos nodes. A Docker image of the Avi SE is provided through Docker hub.

In a Mesos environment, applications are created in Marathon. The Avi Controller communicates with Marathon to synchronize application configuration. The Avi Controller then configures proxy policies for all applications on all SEs on all nodes. As all applications in a Mesos environment communicate with each other through the proxy service, Avi Vantage can provide a single point of management for proxy as well as firewall services, as well as network application visibility.

The Avi Controller gets information about applications from Marathon, and gets information about application resources from the Mesos master. The Avi Controller has information about the network performance of all applications. The Avi Controller combines network performance information with Marathon information and Mesos master information to decide whether to autoscale application. When needed, the Avi Controller requests Marathon to perform autoscaling.


In this installation procedure, Amazon Cloud Formation is used to create a Mesos infrastructure. The Cloud Formation script will create 1 Mesos master node with size m3.xlarge, and 2 Mesos nodes with size t2.medium.

The Avi Controller container is spun up as a container on the Mesos master node along with Marathon and Fleet.

Mesos Infrastructure Bring-up Through AWS

To begin, log in to your AWS account using an Internet browser.

  1. Click on Cloud Formation under Management Tools.
  2. Click on Create Stack.
  3. Select Specify an Amazon S3 url, under Choose a template.
    1. Copy-and-paste the following link:
    2. Click Next to proceed.


  4. AWS Cloud Formation takes you to the Details page.
    1. Provide a name for your stack.
    2. Accept the EULA.
    3. Provide a KeyName and then click Next.


  5. AWS Cloud Formation takes you to an Options page. Click on Next.
  6. AWS Cloud Formation takes you to a Review page. Scroll down, select the Accept AWS agreement checkbox, and click Finish.
  7. AWS Cloud Formation takes around 10-20 minutes to deploy all VMs and bringing up all services. Once Cloud Formation stack is successfully deployed, the status should be CREATE_COMPLETE as shown in this example.

Verify Infrastructure Bring-up

  1. Click on Outputs.
  2. Copy the Mesos master’s URL from the field.
  3. Open a new browser window and paste the Mesos master’s URL.
  4. Copy the Mesos master’s IP address.
  5. Open a new browser window and type the URL of the Mesos master. The URL should look be like this: https://mesos-master-ip:9443
  6. Accept the security warning to proceed to the login page for the Avi Controller's web interface. Log in to the Avi Controller with username and password admin,

Application Creation in Marathon

  1. Download Docker.json from Save the file in Downloads.
  2. Open an SSH session to the Mesos master's IP address, and post the application:
    curl -H "Content-Type: application/json" -X POST -d@Downloads/Docker.json http://:8080/v2/apps

Application Verification

  1. Log in to Marathon: https://marathon-ip:8080aws-mesos-install-awsconsole10
  2. Log in to the Avi Controller to verify that the application is getting load balanced.

Access Web Service through Avi Vantage

  1. Browse to EC2 Load Balancing instance.
    1. Click on EC2-icon to go to the AWS homepage.
    2. Select EC2 and click on Load Balancing in the left pane.
    3. Click on the "PublicSlaveL" instance in the Load Balancer field ("avi-mesos-PublicSlaveL" in this example.)
  2. Edit the ELB instance to forward traffic to the application in the Mesos environment.
    1. Verify the application port from the Avi Controller web interface. Select the application and hover near the name.
    2. Click on Listener and edit ELB Listener to change the HTTP listener to the service (application) port
    3. Click on Health Check and edit ELB health Check to the application port
  3. Click on the Description tab for the same ELB instance. Copy the DNS name and paste it into a new browser tab.

    1. Paste the DNS name into a new browser window.
    2. Click on WebApp1 to verify that live traffic is flowing through.