3 Defining Jenkins architecture

 

This chapter covers

  • Understanding how Jenkins distributed builds work
  • Understanding the roles of Jenkins master and worker nodes
  • Architecting Jenkins in the cloud for scale
  • Configuring multiple Jenkins masters
  • Preparing an AWS environment and CLI configuration

In a distributed microservices architecture, you may have multiple services to build, test, and deploy regularly. Hence, having multiple build machines makes sense. While you can always run Jenkins in a standalone mode, running all builds on a central machine may not be the best option and will result in having a single point of failure (a single Jenkins server cannot handle the entire load for larger and heavier projects). Fortunately, Jenkins can also be configured to run distributed builds across a fleet of machines/nodes by setting up a master/worker cluster, as shown in figure 3.1.

Figure 3.1 Distributed master-worker architecture

Jenkins uses a master-worker architecture to manage distributed builds. Each component has a specific role:

3.1 Understanding master-worker architecture

3.2 Managing Jenkins workers

3.2.1 SSH

3.2.2 Command line

3.2.3 JNLP

3.2.4 Windows service

3.3 Architecting Jenkins for scale in AWS

3.3.1 Preparing the AWS environment

3.3.2 Configuring the AWS CLI

3.3.3 Creating and managing the IAM user

Summary

sitemap