Welcome to Manning India!

We are pleased to be able to offer regional eBook pricing for Indian residents.
All eBook prices are discounted 40% or more!
Bootstrapping Microservices with Docker, Kubernetes, and Terraform
Ashley Davis
  • MEAP began October 2019
  • Publication in Fall 2020 (estimated)
  • ISBN 9781617297212
  • 325 pages (estimated)
  • printed in black & white

An excellent introduction to the technologies and concepts involved in microservice implementation.

Chris Kolosiwsky
The best way to learn microservices development is to build something! Bootstrapping Microservices with Docker, Kubernetes, and Terraform guides you from zero though to a complete microservices project, including fast prototyping, development, and deployment. You’ll get your feet wet using industry-standard tools as you learn and practice the practical skills you’ll use for every microservices application. Following a true bootstrapping approach, you’ll begin with a simple, familiar application and build up your knowledge and skills as you create and deploy a real microservices project.
Table of Contents detailed table of contents

1 Why microservices?

1.1 This book is practical

1.2 What is a microservice?

1.3 What is a microservices application?

1.4 What’s wrong with the monolith?

1.6 Benefits of microservices

1.7 Drawbacks of microservices

1.8 Modern tooling for microservices

1.9 Designing a microservices application

1.10 An example application

1.11 Summary

2 Creating your first microservice

2.1 New tools

2.2 Getting the code

2.3 Why Node.js?

2.4 Our philosophy of development

2.5 Establishing our single-service development environment

2.5.1 Installing git

2.5.2 Cloning the code repo

2.5.3 Get Visual Studio Code

2.5.4 Installing Node.js

2.6 Building a HTTP server for video streaming

2.6.1 Creating a Node.js project

2.6.2 Installing Express

2.6.3 The Express boilerplate

2.6.4 Running our simple web server

2.6.5 Adding streaming video

2.6.6 Microservice configuration

2.6.7 Set up for production

2.6.8 Live reload for fast iteration

2.6.9 Running the finished code from this chapter

2.7 Node.js review

2.8 Where to go for more information

2.9 Summary

3 Publishing your first microservice

3.1 New tools

3.2 Getting the code

3.3 What is a container?

3.4 What is an image?

3.5 Why Docker?

3.6 What are we doing with Docker?

3.7 Extending our development environment with Docker

3.7.1 Installing Docker

3.8 Packaging our microservice

3.8.1 Creating a Dockerfile for our microservice

3.8.2 Packaging our microservice as a Docker image Checking the image

3.8.3 Booting our microservice in a Docker container Checking the container Checking your microservice

3.9 Publishing our microservice

3.9.1 Creating a private Docker registry

3.9.2 Pushing our microservice to the registry Authenticating with the registry Tagging our image Pushing our image to the registry Checking that our image made it to the registry

3.9.3 Booting our microservice from the registry Cleaning up our mess Running a container directly from the registry

3.10 Docker review

3.11 Where to go for more information

3.12 Summary

4 Data management for microservices

4.1 New tools

4.2 Getting the code

4.3 Developing microservices with Docker-Compose

4.3.1 Why Docker-Compose?

4.3.2 Installing Docker-compose

4.3.3 Creating our Docker-Compose file

4.3.4 Booting our microservices application

4.3.5 Working with the application

4.3.6 Shutting down the application

4.3.7 Can we use Docker-Compose for production?

4.4 Adding file storage to our application

4.4.1 Using Azure Storage Why Azure storage? Creating an Azure storage account Uploading your video to Azure storage Creating a microservice to read Azure storage Testing our new microservice independently

4.4.2 Updating the video streaming microservice

4.4.3 Adding our new microservice to the Docker-Compose file

4.4.4 Testing the updated application

4.4.5 Cloud storage vs cluster storage

4.4.6 What did we achieve?

4.5 Adding a database to our application

4.5.1 Why MongoDB?

4.5.2 Adding a database server in development Adding the database server to the Docker-Compose file Updating the video streaming microservice to use a database Loading some test data into our database Testing our updated application

4.5.3 Adding a database server in production

4.5.4 Database-per-microservice or database-per-application?

4.5.5 What did we achieve?

4.6 Docker-Compose review

4.7 Where to go for more information

4.8 Summary

5 Communication between microservices

5.1 New and familiar tools

5.2 Getting the code

5.3 Getting our microservices talking

5.4 Introducing the history microservice

5.5 Live reload for fast iteration

5.5.1 Creating a stub for the history microservice

5.5.2 Augmenting our microservice for live reload

5.5.3 Splitting our Dockerfile for development and production

5.5.4 Updating the Docker-Compose file for live reload

5.5.5 Trying out live reload

5.5.6 Testing production mode in development

5.5.7 What have we achieved?

5.6 Methods of communication for microservices

5.6.1 Direct messaging

5.6.2 Indirect messaging

5.7 Direct messaging with HTTP

5.7.1 Why HTTP?

5.7.2 Targeting microservices with HTTP messages

5.7.3 Sending a message with HTTP POST

5.7.4 Receiving a message with HTTP POST

5.7.5 Testing the updated application

5.7.6 Sequencing direct messages

5.7.7 What have we achieved?

5.8 Indirect messaging with RabbitMQ

5.8.1 Why RabbitMQ?

5.8.2 Targeting microservices with RabbitMQ messages

5.8.3 Creating a RabbitMQ server

5.8.4 Investigating the RabbitMQ dashboard

5.8.5 Connecting our microservice to the message queue

5.8.6 Single-recipient indirect messaging Receiving single-recipient messages Sending single-recipient messages Testing single-recipient messages

5.8.7 Multiple-recipient messages Receiving multiple-recipient messages Sending messages Testing multiple-recipient messages

5.8.8 Sequencing indirect messages

5.8.9 What have we achieved?

5.9 Microservices communication review

5.10 Where to go for more information

5.11 Summary

6 Creating your production environment

7 Continuous delivery with Terraform

8 Keeping your microservices working

9 Exploring FlixTube

10 Our future is scalable

About the Technology

Microservices have become a standard architecture for established enterprises and startups alike. Although microservice designs can be complex, Docker, Kubernetes, and Terraform are the tools that make microservices applications accessible and cost-effective, providing the means to package, manage, and deploy microservices applications of any size. Bootstrapping Microservices with Docker, Kubernetes, and Terraform gradually builds up your skills with these powerful tools, allowing you to increase your knowledge and capability in stages as you build a real application from the ground up.

About the book

In Bootstrapping Microservices with Docker, Kubernetes, and Terraform, 20-year software veteran Ashley Davis lays out his practical approach to microservices. There’s no unnecessary theory—just working examples, and hands-on learning that you can use to build a useful application! Chapter by chapter, you’ll follow the construction of a video streaming application, unlocking how specific technologies are used in the microservices development process. You’ll learn how to create cloud infrastructure with Terraform, how to configure and package microservices using Docker, and how to deploy a microservice application on a Kubernetes cluster. When you’re finished with this engaging project, you’ll have all the skills you need to start building and deploying microservices to your own infrastructure.

What's inside

  • Creating, configuring and packaging a microservice using Docker
  • Developing and testing a microservices application using Docker-Compose
  • Applying automated testing to microservices
  • Using Terraform to implement infrastructure-as-code and setup a continuous delivery pipeline
  • Building a Kubernetes cluster to host your microservices
  • Monitoring, managing and troubleshooting a microservices application

About the reader

For developers with experience building web applications.

About the author

Ashley Davis is a software developer, entrepreneur, author, and stock trader. Ashley is CTO of Sortal, a startup that helps businesses manage their digital assets with artificial intelligence. Ashley is the creator of Data-Forge and Data-Forge Notebook, software for data transformation, analysis, and visualization in JavaScript. Ashley is the author of Manning’s Data Wrangling with JavaScript.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks