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)

Configuring agents

To configure agents, follow these steps:

  1. In the slaves tab, type the following commands:
$ cd /etc/mesos-slave 
$ sudo mkdir conf 
  1. Repeat this for all the agents.
  2. In the conf directory, create a credential.json file for all agents:
$ cd conf 
$ sudo touch credential.json 
$ sudo vi credential.json 
  1. Add the following code in the credential.json file:
         "principal": "agent", 
         "secret": "agents_secret" 
  1. Save and exit using :wq!

This is the secret that the agents will use to get authenticated by the master. We added similar secrets for the master previously. The master will now know what secrets to use to get authenticated.

Repeat the preceding steps for all the agents.

The following steps will notify the master about the location of the credential file:

  1. These steps are similar to what we followed...