page 1 of 14 · will create 1 mesos master node with size m3.xlarge, and 2 mesos nodes with size...

14
Page 1 of 14

Upload: others

Post on 20-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Page 1 of 14 · 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

Page 1 of 14

Page 2: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 2 of 14

view onlineInstalling Avi Integration with Mesos in AWS

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

Avi VantageAvi 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.

Components

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.

Page 3: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 3 of 14

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/OSMesosphere 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

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 or from the DC/OS CLI with the /marathon 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 Vantage15.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

 

Page 4: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 4 of 14

1.

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 OverviewAvi Vantage solution tightly integrates with the Mesos environment, providing enterprise-grade proxy services in the Mesos environment along with these additional benefits:

Firewall/ micro-segmentationApplication visibilityAutoscaling

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.

InstallationIn 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.

Click on Cloud Formation under Management Tools.

Page 5: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 5 of 14

1.

2. 3.

1.

2.

Click on Create Stack.Select Specify an Amazon S3 url, under Choose a template.

Copy-and-paste the following link: https://s3-us-west-1.amazonaws.com/avi-tm/avi-mesos.cloudformation.jsonClick Next to proceed.

Page 6: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 6 of 14

4. 1. 2. 3.

5.

6.

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

AWS Cloud Formation takes you to an Options page. Click on Next.

AWS Cloud Formation takes you to a Review page. Scroll down, select the Accept AWS agreement checkbox, and click Finish.

Page 7: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 7 of 14

6.

7.

1. 2.

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

Click on Outputs.

Page 8: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 8 of 14

2.

3. 4.

5.

6.

Copy the Mesos master?s URL from the field.

Open a new browser window and paste the Mesos master?s URL.Copy the Mesos master?s IP address.

Open a new browser window and type the URL of the Mesos master. The URL should look be like this: https://mesos-:9443master-ip

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, admin.

Page 9: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 9 of 14

6.

1. 2.

1.

Application Creation in Marathon

Download Docker.json from . Save the file in Downloads.https://s3-us-west-1.amazonaws.com/avi-tm/Docker.jsonOpen 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

Log in to Marathon: https:// :8080marathon-ip

Page 10: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 10 of 14

1.

2.

1. 1.

Log in to the Avi Controller to verify that the application is getting load balanced.

Access Web Service through Avi Vantage

Browse to EC2 Load Balancing instance.Click on

Page 11: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 11 of 14

1. 1.

2. 3.

2. 1.

2.

to go to the AWS homepage.Select EC2 and click on Load Balancing in the left pane.Click on the "PublicSlaveL" instance in the Load Balancer field ("avi-mesos-PublicSlaveL" in this example.)

Edit the ELB instance to forward traffic to the application in the Mesos environment.Verify the application port from the Avi Controller web interface. Select the application and hover near the name.

Click on Listener and edit ELB Listener to change the HTTP listener to the service (application) port number.

Page 12: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 12 of 14

2.

2.

3.

3.

Click on Health Check and edit ELB health Check to the application port number.

Click on the Description tab for the same ELB instance. Copy the DNS name and paste it into a new browser tab.

Page 13: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 13 of 14

3.

1.

2.

Paste the DNS name into a new browser window.

Click on WebApp1 to verify that live traffic is flowing through.

Page 14: Page 1 of 14 · 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

Avi Networks — Technical Reference (17.1)Installing Avi Integration with Mesos in AWS

Copyright © 2018 Avi Networks, Inc. Page 14 of 14

3.

2.

Related Articles:Upgrading Avi Vantage SoftwareUpgrades in an Avi GSLB Environment