Apache Mesos Cookbook - David Blomquist - E-Book

Apache Mesos Cookbook E-Book

David Blomquist

0,0
32,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Over 50 recipes on the core features of Apache Mesos and running big data frameworks in Mesos

About This Book

  • Learn to install and configure Mesos to suit the needs of your organization
  • Follow step-by-step instructions to deploy application frameworks on top of Mesos, saving you many hours of research and trial and error
  • Use this practical guide packed with powerful recipes to implement Mesos and easily integrate it with other application frameworks

Who This Book Is For

This book is for system administrators, engineers, and big data programmers. Basic experience with big data technologies such as Hadoop or Spark would be useful but is not essential. A working knowledge of Apache Mesos is expected.

What You Will Learn

  • Set up Mesos on different operating systems
  • Use the Marathon and Chronos frameworks to manage multiple applications
  • Work with Mesos and Docker
  • Integrate Mesos with Spark and other big data frameworks
  • Use networking features in Mesos for effective communication between containers
  • Configure Mesos for high availability using Zookeeper
  • Secure your Mesos clusters with SASL and Authorization ACLs
  • Solve everyday problems and discover the best practices

In Detail

Apache Mesos is open source cluster sharing and management software. Deploying and managing scalable applications in large-scale clustered environments can be difficult, but Apache Mesos makes it easier with efficient resource isolation and sharing across application frameworks.

The goal of this book is to guide you through the practical implementation of the Mesos core along with a number of Mesos supported frameworks. You will begin by installing Mesos and then learn how to configure clusters and maintain them. You will also see how to deploy a cluster in a production environment with high availability using Zookeeper.

Next, you will get to grips with using Mesos, Marathon, and Docker to build and deploy a PaaS. You will see how to schedule jobs with Chronos. We'll demonstrate how to integrate Mesos with big data frameworks such as Spark, Hadoop, and Storm. Practical solutions backed with clear examples will also show you how to deploy elastic big data jobs.

You will find out how to deploy a scalable continuous integration and delivery system on Mesos with Jenkins. Finally, you will configure and deploy a highly scalable distributed search engine with ElasticSearch.

Throughout the course of this book, you will get to know tips and tricks along with best practices to follow when working with Mesos.

Style and approach

This step-by-step guide is packed with powerful recipes on using Apache Mesos and shows its integration with containers and big data frameworks.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 128

Veröffentlichungsjahr: 2017

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Apache Mesos Cookbook

 

 

 

 

 

 

 

 

 

 

Powerful recipes and useful techniques to get started with Apache Mesos

 

 

 

 

 

 

 

 

 

 

David Blomquist
Tomasz Janiszewski

 

BIRMINGHAM - MUMBAI

< html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

Apache Mesos Cookbook

Copyright © 2017 Packt Publishing

 

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

 

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

 

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

 

First published: July 2017

 

Production reference: 1310717

Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.

 

ISBN 978-1-78588-462-7

www.packtpub.com

Credits

Authors

David Blomquist

Tomasz Janiszewski

Copy Editor

Safis Editing

Reviewer

Radoslaw Gruchalski

Project Coordinator

Kinjal Bari

Commissioning Editor

Kunal Parikh

Proofreader

Safis Editing

Acquisition Editor

Meeta Rajani

Indexer

Pratik Shirodkar

Content Development Editor

Mamata Walkar

Graphics

Kirk D'penha

Technical Editor

Varsha Shivhare

Production Coordinator

Shantanu Zagade

About the Authors

David Blomquist has worked with computer technology for almost 30 years. He studied electrical engineering at Arizona State University and chemical engineering at the University of Texas. David is currently the president and CTO of Tentra, a systems integration company. When he is not wrangling large-scale container deployments into well behaved PaaS herds, he can be found skiing or hiking, while patiently waiting for the next ski season to begin.

Tomasz Janiszewski is a software engineer who is passionate about distributed systems. He believes in free and open source philosophy and occasionally contributes to projects on GitHub. He actively participates in the Mesos community and spreads his knowledge on mailing lists and StackOverflow. He is involved in Marathon development and building PaaS on top of Mesos and Marathon.

About the Reviewer

Radoslaw Gruchalski is a software engineer specializing in distributed systems. With over 17 years' commercial experience, 5 of which have been exclusively in the IoT and big data processing landscape, he currently focuses on helping his clients in the area of design, architecture, and the implementation of distributed, fault-tolerant platforms for cloud, hybrid, and on-premise deployments. His hands-on experience with the design, architectural, implementation, and operational aspects of the SMACK stack, together with his deep understanding of what it takes to deploy distributed systems, makes him an invaluable asset to have in your team.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www.packtpub.com/mapt Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

Fully searchable across every book published by Packt

Copy and paste, print, and bookmark content

On demand and accessible via a web browser

Customer Feedback

Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/178588462X.

 

If you'd like to join our team of regular reviewers, you can email us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

Table of Contents

Preface

What this book covers

What you need for this book

Who this book is for

Sections

Getting ready

How to do it…

How it works…

There's more…

See also

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

Getting Started with Apache Mesos

Introduction

Installing Mesos on Ubuntu 16.04 from packages

Getting ready

How to do it...

How it works...

See also

Installing Mesos on Ubuntu 14.04 from packages

Getting ready

How to do it...

How it works...

See also

Installing Mesos on CentOS 7 and RHEL 7 from packages

Getting ready

How to do it...

How it works...

See also

Preparing Ubuntu 16.04 for a Mesos installation from source code

Getting ready

How to do it...

How it works...

Preparing Ubuntu 14.04 for a Mesos installation from source code

Getting ready

How to do it...

How it works...

Preparing OS X (Yosemite and El Capitan) for a Mesos Installation from source code

Getting ready

How to do it...

How it works...

Downloading, building, and installing the Mesos source code

Getting ready

How to do it...

How it works...

There's more...

Configuration tips

Build tips

Installation tips

Implementing High Availability with Apache ZooKeeper

Introduction

Configuring ZooKeeper installed from packages on Ubuntu 14.04, Ubuntu 16.04, CentOS 7, or RHEL 7

Getting ready

How to do it...

Configuring Mesos masters with ZooKeeper

Configuring Mesos agents with ZooKeeper

How it works...

There's more...

Configuring ZooKeeper on Ubuntu 14.04, 16.04, and OS X from source

Getting ready

How to do it...

Configuring Mesos masters with ZooKeeper

Configuring Mesos agents with ZooKeeper

How it works...

There's more...

Running and Maintaining Mesos

Introduction

Logging and debugging

Getting ready

How to do it...

How it works...

Monitoring

Getting ready

How to do it...

How it works...

See also

Setting attributes for agents

How to do it...

How it works...

Defining roles and resources

How to do it...

How it works...

There's more...

Dynamic reservations

Persistent volumes

Oversubscription

How to do it...

How it works...

See also

Controlling permissions using access control lists

Getting ready

How to do it...

How it works...

Agent authentication

Getting ready

How to do it...

Master

Agent

Marathon

How it works...

Encryption SSL

Getting ready

How to do it...

How it works...

Upgrading Mesos

How to do it...

How it works...

Understanding the Scheduler API

Introduction

Installing Protobuf

Getting ready

How to do it...

How it works...

Registering frameworks

How to do it...

How it works...

Handling events

How to do it...

How it works...

Declining offers

How to do it...

How it works...

Scheduling tasks

How to do it...

How it works...

Acknowledging task updates

How to do it...

How it works...

Killing tasks

How to do it...

How it works...

State persistence

How to do it...

How it works...

Reconciliation

How to do it...

How it works...

Managing Containers

Introduction

Enabling the Mesos containerizer

Getting ready

How to do it...

How it works...

Enabling POSIX isolators

Getting ready

How to do it....

How it works...

Enabling the POSIX disk isolator

Getting ready

How to do it...

How it works...

Configuring the shared filesystem isolator

Getting ready

How to do it...

How it works...

Configuring cgroup isolators

Getting ready

How to do it...

How it works...

Configuring the port mapping network isolator

Getting ready

How to do it...

How it works...

Configuring Docker image support for the Mesos containerizer

Getting ready

How to do it...

How it works...

Using the Docker containerizer

Getting ready

How to do it...

How it works...

Running an image from a private repository

Getting ready

How to do it...

How it works...

Using container network interface

Getting ready

How to do it...

How it works...

Monitoring containers with Sysdig

Getting ready

How to do it...

How it works...

Deploying PaaS with Marathon

Introduction

Installing and configuring Marathon

Getting ready

How to do it...

How it works...

Monitoring Marathon

Getting ready

How to do it...

How it works...

Launching an application

Getting ready

How to do it...

How it works...

Launching a Docker container

Getting ready

How to do it...

How it works...

Setting up the discovery service

Getting ready

How to do it...

How it works...

Enabling SSL

Getting ready

How to do it...

How it works...

Enabling basic access authentication

Getting ready

How to do it...

How it works...

Using a custom authentication plugin

Getting ready

How to do it...

How it works...

Tuning Marathon

Getting ready

How to do it...

How it works...

Job Scheduling with Metronome

Introduction

Installing and configuring Metronome

How to do it...

How it works...

Monitoring Metronome

How to do it...

How it works...

Scheduling jobs

How to do it...

How it works...

Continuous Integration with Jenkins

Introduction

Building the Jenkins Mesos plugin

Getting ready

How to do it...

How it works...

Installing Jenkins

How to do it...

Enabling the Jenkins Mesos plugin

Getting ready

How to do it...

Preface

Apache Mesos was the first open source cluster manager to handle workloads in a distributed environment through dynamic resource sharing and isolation. It is great for deploying and managing applications in large-scale cluster environments.

Since its inception, Mesos has been under constant development and it is one of the most mature, robust and stable cluster managers in both the open source and commercial software worlds.

This guide is packed with powerful recipes for using Apache Mesos and its integration with containers and frameworks.

What this book covers

Chapter 1, Getting Started with Apache Mesos, provides instructions for installing Mesos on several different operating systems.

Chapter 2, Implementing High Availability with Apache ZooKeeper, teaches you how to install Apache Zookeeper and configure it with Mesos to create a multi-master, highly available Mesos cluster.

Chapter 3, Running and Maintaining Mesos, describes the components of a running Mesos cluster and shows you how to configure them.

Chapter 4, Understanding the Scheduler API, first teaches you about frameworks and how they interact with Mesos, then proceeds to show you how to develop a simple framework.

Chapter 5, Managing Containers, shows you how to deploy and manage containerizers in Mesos.

Chapter 6, Deploying PaaS with Marathon, demonstrates how to install and configure Marathon and other tools required to set up a private PaaS.

Chapter 7, Job Scheduling with Metronome, shows you how to run a cron service on Mesos.

Chapter 8, Continuous Integration with Jenkins, teaches you how to run a highly scalable Jenkins continuous integration and continuous delivery system on Mesos.

What you need for this book

We recommend one server or virtual machine installed with Ubuntu 14.04 as a development environment for following most of the recipes in this book. To test the high availability recipes in Chapter 2, Implementing High Availability with Apache ZooKeepera minimum of six servers or virtual machines is required. Chapters 1, Getting Started with Apache Mesosand Chapter 2, Implementing High Availability with Apache ZooKeeperwill guide you through installing and configuring Mesos and ZooKeeper on multiple operating systems but we recommend mastering the recipes in chapters 3 – 8 on Ubuntu 14.04 before adapting them for other supported operating systems.

Who this book is for

This book is for systems administrators, engineers, and programmers who are interested in using Mesos. Basic experience with distributed systems and cluster management would be helpful but is not essential. A working knowledge of the Linux operating system is expected.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it…, How it works…, There's more…, and See also). To give clear instructions on how to complete a recipe, we use these sections as follows:

Getting ready

This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There's more…

This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: " By default, Marathon logs to stdout and syslog."

A block of code is set as follows:

cat <<EOF > /etc/systemd/system/traefik.service[Unit]Description=TraefikWants=network-online.targetAfter=network.target network-online.target[Service]Restart=on-failureExecStart=/usr/bin/traefik[Install]WantedBy=multi-user.targetEOF

Any command-line input or output is written as follows:

curl -k https://localhost:8443/ping

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: " You should also be able to see Marathon listed as a framework in the Mesos UIFrameworkstab."

Warnings or important notes appear like this.