Book description
The best way to learn microservices development is to build something! Bootstrapping Microservices with Docker, Kubernetes, and Terraform guides you from zero through 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.About the Technology
Taking microservices from proof of concept to production is a complex, multi-step operation relying on tools like Docker, Terraform, and Kubernetes for packaging and deployment. The best way to learn the process is to build a project from the ground up, and that’s exactly what you’ll do with this book!
About the Book
In Bootstrapping Microservices with Docker, Kubernetes, and Terraform, author Ashley Davis lays out a comprehensive approach to building microservices. You’ll start with a simple design and work layer-by-layer until you’ve created your own video streaming application. As you go, you’ll learn to configure cloud infrastructure with Terraform, package microservices using Docker, and deploy your finished project to a Kubernetes cluster.
What's Inside
- Developing and testing microservices applications
- Working with cloud providers
- Applying automated testing
- Implementing infrastructure as code and setting up a continuous delivery pipeline
- Monitoring, managing, and troubleshooting
About the Reader
Examples are in JavaScript. No experience with microservices, Kubernetes, Terraform, or Docker required.
About the Author
Ashley Davis is a software developer, entrepreneur, stock trader, and the author of Manning’s Data Wrangling with JavaScript.
Quotes
The single best introduction I’ve read to the tools needed to understand and implement microservices.
- Chris Viner, Forged Development
The definitive infrastructure reference for any microservice builder.
- Julien Pohie, Thoughtworks
A wonderful, practical book promising a jump start for readers for developing microservices and cloud-native applications using Docker, Kubernetes, and Terraform.
- Dhruvesh Patel, Cognizant Worldwide Limited
An extensive and practical exposure to modern cloud resources for implementing microservices.
- Alain Couniot, Sopra Steria Benelux
Publisher resources
Table of contents
- Bootstrapping Microservices with Docker, Kubernetes, and Terraform
- Copyright
- brief contents
- contents
- front matter
-
1 Why microservices?
- 1.1 This book is practical
- 1.2 What will I learn?
- 1.3 What do I need to know?
- 1.4 Managing complexity
- 1.5 What is a microservice?
- 1.6 What is a microservices application?
- 1.7 What’s wrong with the monolith?
- 1.8 Why are microservices popular now?
- 1.9 Benefits of microservices
- 1.10 Drawbacks of microservices
- 1.11 Modern tooling for microservices
- 1.12 Designing a microservices application
- 1.13 An example application
- 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.6 Building an HTTP server for video streaming
- 2.6.1 Creating a Node.js project
- 2.6.2 Installing Express
- 2.6.3 Creating the Express boilerplate
- 2.6.4 Running our simple web server
- 2.6.5 Adding streaming video
- 2.6.6 Configuring our microservice
- 2.6.7 Setting up for production
- 2.6.8 Live reloading for fast iteration
- 2.6.9 Running the finished code from this chapter
- 2.7 Node.js review
- 2.8 Continue your learning
- 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.8 Packaging our microservice
- 3.9 Publishing our microservice
- 3.10 Docker review
- 3.11 Continue your learning
- Summary
- 4 Data management for microservices
-
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 iterations
- 5.5.1 Creating a stub for the history microservice
- 5.5.2 Augmenting the 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.7 Direct messaging with HTTP
-
5.8 Indirect messaging with RabbitMQ
- 5.8.1 Why RabbitMQ?
- 5.8.2 Indirectly targeting messages to microservices
- 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
- 5.8.7 Multiple-recipient messages
- 5.8.8 Sequencing indirect messages
- 5.8.9 What have we achieved?
- 5.9 Microservices communication review
- 5.10 Continue your learning
- Summary
-
6 Creating your production environment
- 6.1 New tools
- 6.2 Getting the code
- 6.3 Getting to production
- 6.4 Infrastructure as code
- 6.5 Hosting microservices on Kubernetes
- 6.6 Working with the Azure CLI
- 6.7 Creating infrastructure with Terraform
-
6.8 Creating an Azure resource group for your application
- 6.8.1 Evolutionary architecture with Terraform
- 6.8.2 Scripting infrastructure creation
- 6.8.3 Initializing Terraform
- 6.8.4 By-products of Terraform initialization
- 6.8.5 Fixing provider version numbers
- 6.8.6 Building your infrastructure
- 6.8.7 Understanding Terraform state
- 6.8.8 Destroying and recreating your infrastructure
- 6.8.9 What have we achieved?
- 6.9 Creating your container registry
- 6.10 Refactoring to share configuration data
- 6.11 Creating our Kubernetes cluster
- 6.12 Interacting with Kubernetes
- 6.13 Terraform review
- 6.14 Continue your learning
- Summary
-
7 Getting to continuous delivery
- 7.1 New and familiar tools
- 7.2 Getting the code
- 7.3 Continuing to evolve our infrastructure
- 7.4 Continuous delivery (CD)
- 7.5 Deploying containers with Terraform
- 7.6 Deploying our first microservice with Terraform
-
7.7 Continuous delivery with Bitbucket Pipelines
- 7.7.1 Why Bitbucket Pipelines?
- 7.7.2 Importing the example code to Bitbucket
- 7.7.3 Creating a deployment shell script
- 7.7.4 Managing Terraform state
- 7.7.5 The Bitbucket Pipelines script
- 7.7.6 Configuring environment variables
- 7.7.7 Testing your deployment pipeline
- 7.7.8 Debugging your deployment pipeline
- 7.7.9 What have we achieved?
- 7.8 Continue your learning
- Summary
-
8 Automated testing for microservices
- 8.1 New tools
- 8.2 Getting the code
- 8.3 Testing for microservices
- 8.4 Automated testing
-
8.5 Testing with Jest
- 8.5.1 Why Jest?
- 8.5.2 Setting up Jest
- 8.5.3 The math library to test
- 8.5.4 Your first Jest test
- 8.5.5 Running your first test
- 8.5.6 Live reload with Jest
- 8.5.7 Interpreting test failures
- 8.5.8 Invoking Jest with npm
- 8.5.9 Populating your test suite
- 8.5.10 Mocking with Jest
- 8.5.11 What have we achieved?
- 8.6 Unit testing
- 8.7 Integration testing
- 8.8 End-to-end testing
- 8.9 Automated testing in the CD pipeline
- 8.10 Review of testing
- 8.11 Continue your learning
- Summary
-
9 Exploring FlixTube
- 9.1 No new tools!
- 9.2 Getting the code
- 9.3 Revisiting essential skills
- 9.4 Overview of FlixTube
- 9.5 Running FlixTube in development
- 9.6 Testing FlixTube in development
- 9.7 FlixTube deep dive
- 9.8 Manually deploying FlixTube to production with Terraform
- 9.9 Continuous delivery to production
- 9.10 Review
- 9.11 FlixTube in the future
- 9.12 Continue your learning
- Summary
-
10 Healthy microservices
- 10.1 Maintaining healthy microservices
-
10.2 Monitoring your microservices
- 10.2.1 Logging in development
- 10.2.2 Error handling
- 10.2.3 Logging with Docker Compose
- 10.2.4 Basic logging with Kubernetes
- 10.2.5 Roll your own log aggregation for Kubernetes
- 10.2.6 Enterprise logging, monitoring and alerts
- 10.2.7 Automatic restarts with Kubernetes health checks
- 10.2.8 Tracing across microservices
- 10.3 Debugging microservices
- 10.4 Reliability and recovery
- 10.5 Continue your learning
- Summary
- 11 Pathways to scalability
- appendix A. Creating a development environment with Vagrant
- appendix B. Bootstrapping Microservices cheat sheet
- index
Product information
- Title: Bootstrapping Microservices with Docker, Kubernetes, and Terraform
- Author(s):
- Release date: February 2021
- Publisher(s): Manning Publications
- ISBN: 9781617297212
You might also like
audiobook
Bootstrapping Microservices with Docker, Kubernetes, and Terraform
The single best introduction I’ve read to the tools needed to understand and implement microservices. Chris …
video
Bootstrapping Microservices with Docker, Kubernetes, and Terraform, video edition
In Video Editions the narrator reads the book while the content, figures, code listings, diagrams, and …
video
Infrastructure as Code: Using Terraform to Deploy Kubernetes and Microservices
How to upgrade your infrastructure through code using Terraform.
video
Kubernetes Microservices
See it. Learn it. Do it! Microservices designs require you to change how you build and …