Chapter 10. Deploying your microservices

 

This chapter covers

  • Understanding why the DevOps movement is critical to microservices
  • Configuring the core Amazon infrastructure used by EagleEye services
  • Manually deploying EagleEye services to Amazon
  • Designing a build and deployment pipeline for your services
  • Moving from continuous integration to continuous deployment
  • Treating your infrastructure as code
  • Building the immutable server
  • Testing in deployment
  • Deploying your application to the cloud

We’re at the end of the book, but not the end of our microservices journey. While most of this book has focused on designing, building, and operationalizing Spring-based microservices using the Spring Cloud technology, we haven’t yet touched on how to build and deploy microservices. Creating a build and deployment pipeline might seem like a mundane task, but in reality it’s one of the most important pieces of your microservices architecture.

Why? Remember, one of the key advantages of a microservices architecture is that microservices are small units of code that can be quickly built, modified, and deployed to production independently of one another. The small size of the service means that new features (and critical bug fixes) can be delivered with a high degree of velocity. Velocity is the key word here because velocity implies that little to no friction exists between making a new feature or fixing a bug and getting your service deployed. Lead times for deployment should be minutes, not days.

10.1. EagleEye: setting up your core infrastructure in the cloud

10.1.1. Creating the PostgreSQL database using Amazon RDS

10.1.2. Creating the Redis cluster in Amazon

10.1.3. Creating an ECS cluster

10.2. Beyond the infrastructure: deploying EagleEye

10.2.1. Deploying the EagleEye services to ECS manually

10.3. The architecture of a build/deployment pipeline

10.4. Your build and deployment pipeline in action

10.5. Beginning your build deploy/pipeline: GitHub and Travis CI

10.6. Enabling your service to build in Travis CI

10.6.1. Core build run-time configuration

10.6.2. Pre-build tool installations

10.6.3. Executing the build

10.6.4. Tagging the source control code

10.6.5. Building the microservices and creating the Docker images

10.6.6. Pushing the images to Docker Hub

10.6.7. Starting the services in Amazon ECS

10.6.8. Kicking off the platform tests

10.7. Closing thoughts on the build/deployment pipeline

10.8. Summary