Book Image

Learn Apache Mesos

By : Manuj Aggarwal
Book Image

Learn Apache Mesos

By: Manuj Aggarwal

Overview of this book

Apache Mesos is an open source cluster manager that provides efficient resource isolation and sharing across distributed applications or frameworks. This book will help you build a strong foundation of Mesos' capabilities along with practical examples to support the concepts explained throughout the book. Learn Apache Mesos dives straight into how Mesos works. You will be introduced to the distributed system and its challenges and then learn how you can use Mesos and its framework to solve data problems. You will also gain a full understanding of Mesos' internal mechanisms and get equipped to use Mesos and develop applications. Furthermore, this book lets you explore all the steps required to create highly available clusters and build your own Mesos frameworks. You will also cover application deployment and monitoring. By the end of this book, you will have learned how to use Mesos to make full use of machines and how to simplify data center maintenance.
Table of Contents (10 chapters)

Introduction to Amazon Web Service (AWS)

AWS is a secured cloud service platform that offers computing power. This is where we can run an EC2 instance for our master and slave, and then for the Marathon framework. It offers database storage as well.

We will use a MySQL database that offers more functionality to help the environment scale and grow.

AWS environment

For creating a VPC, EC2 instance, security groups, and load-balancers, perform the following steps:

  1. Create a Virtual Private Cloud:

  1. Create an EC2 instance: two for Marathon, three for Mesos master servers, and three for the Mesos slave servers:

  1. Install the Mesos master application, Marathon:
  1. Install ZooKeeper:

  1. Insert Docker to run Docker images on all the slave servers. We will install the Mesos slave as well:

  1. Use Marathon to deploy the application, and those tasks will launch on slave servers. We will use a WordPress Docker container:

Also, we will see how to load-balance Marathon and Mesos master servers. This will help to manage the Mesos UI and Marathon UI. It is not necessary to go every time on each Marathon server as the load-balancer will take care of that. If one of the master servers is down, it will redirect to another one, so this is where your management will become easy:

Use Marathon-lb HAProxy to load-balance your application request:

This was a quick overview of what we are going to cover in the upcoming chapters.