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)

Installing Marathon-LB

In this example, we will perform a blue/green deployment technique using the Python script and special Marathon-LB labels in your application definitions.

You need to first install Marathon-LB, using a Docker image, by executing the following command:

docker run -d -p 9090:9090

As you can see in the preceding command, 9090 is the port to which your HAProxy will bind–you access the HAProxy web page to find out the status of your load balancer. Then, next is -p 8081:10001. This is where your services will run. Here, we set it to 10000 and 8081. So, we have exposed the 8081 port where your application will get accessed; and inside Docker, 10000 will be used. So, this is how your port mapping will happen. After that, we defined --add-host.

This variable needs to be defined if you don't have any DNS. If you have DNS in your environment, you...