chapter ten

10 Cloud-Native Applications on Docker Swarm

 

This chapter covers

  • Deployment of self-healing Swarm cluster on AWS and usage of S3 bucket for nodes discovery
  • Running SSH-based commands within Jenkins pipelines and configuration of SSH agents
  • Automating deployment of Dockerized applications to Swarm with Jenkins and Docker Compose
  • Integration of Slack to manage releases & build notifications of CI/CD pipelines
  • Walking through continuous deployment workflow with Jenkins pipelines
  • Continuous delivery to production and user manual approvals within Jenkins pipelines

In the previous chapter, we covered how to set up a continuous integration pipeline for a containerized microservices application with Jenkins. In this part, we will cover how to automate the deployment part and manage multiple application environments. By the end of this chapter, you will be familiar with continuous deployment and delivery for Dockerized microservices running in a Docker Swarm cluster

Figure 10.1. CI/CD pipeline workflow

One of the basic solutions to run multiple containers across a set of machines is Swarm. As it comes bundled with the Docker engine. By the end of this chapter, you should be able to build a CI/CD pipeline from scratch for services running inside a Docker Swarm cluster like in the following workflow diagram:

Figure 10.2. Target CI/CD pipeline

10.1  Running a Distributed Docker Swarm Cluster

10.2  Defining Continuous Deployment Process

10.3  Integrating Jenkins with Slack Notifications

10.4  Handling Code Promotion with Jenkins

10.5  Implementing Jenkins Delivery pipeline

10.6  Summary