Book Image

Microservices Deployment Cookbook

By : Vikram Murugesan
Book Image

Microservices Deployment Cookbook

By: Vikram Murugesan

Overview of this book

This book will help any team or organization understand, deploy, and manage microservices at scale. It is driven by a sample application, helping you gradually build a complete microservice-based ecosystem. Rather than just focusing on writing a microservice, this book addresses various other microservice-related solutions: deployments, clustering, load balancing, logging, streaming, and monitoring. The initial chapters offer insights into how web and enterprise apps can be migrated to scalable microservices. Moving on, you’ll see how to Dockerize your application so that it is ready to be shipped and deployed. We will look at how to deploy microservices on Mesos and Marathon and will also deploy microservices on Kubernetes. Next, you will implement service discovery and load balancing for your microservices. We’ll also show you how to build asynchronous streaming systems using Kafka Streams and Apache Spark. Finally, we wind up by aggregating your logs in Kafka, creating your own metrics, and monitoring the metrics for the microservice.
Table of Contents (15 chapters)
Microservices Deployment Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Monitoring your microservice logs in Mesos


We've already seen that viewing logs in Marathon is not very easy. Oftentimes, you will want to perform more advanced operations, such as tailing logs, viewing logs on screen, or viewing multiple logs at the same time. Fortunately, you can do this using Mesos. In this recipe, we will learn how to monitor application logs-in other words, task logs-using the Mesos web UI.

Getting ready

To check this out, deploy the geolocation microservice using Marathon. If you have to restart your Mesos cluster, do so. In Marathon, use JSON mode and the JSON that was used in recipe Scaling your Microservice in Marathon to deploy the application.

How to do it...

  1. Once your application has started, go to the Mesos web interface using the URL http://192.168.99.100:5050, and verify that your application's task is running:

  2. From the preceding screenshot, you can see that there is one active task and several completed tasks for the geolocation microservice. The completed tasks...