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

Pushing your image to Docker Hub


In the previous recipe, we saw how to run your microservice as a Docker container. Your image is not really useful unless you make it easier for shipping. In order for your image to be accessible from other places, you should first host it somewhere.

There are two ways of doing this: either push your image to the Docker Hub central repository, or create your own private Docker registry and push it there. Repositories created on Docker Hub are by default public. You can still purchase various plans to make your repositories private. That is completely up to you and depends on your use case.

Getting ready

  1. Before you can push the image to Docker Hub, you will first need a Docker Hub account. If you already have one, skip this step. If you don't have one, go to https://hub.docker.com/ and start creating an account for yourself. You will need three things:

    • User ID

    • Email associated

    • Password

  2. After you have created a new account, log in with your credentials. Take some...