Building Blocks of Jenkins: Understanding its Architecture

Take a sneak peek into the complex architecture of Jenkins, as we unravel all its levels, here!

BuildPiper
BuildPiper
4 min readMar 22, 2024

--

By Ruchita Varma

Jenkins, the CI/CD pioneer of open-source systems, streamlines your multi-step pipeline accompanied by the ease and efficiency of code. However, the sophisticated architecture lying under it is a bit more complex than it seems. It is a combination of a smart interconnection of components that help teams leverage Jenkins advantages.

In this blog, we’ll take a sneak peek into the complex architecture of Jenkins, by systematically unraveling all its levels, one by one. We’re taking a look at the basic components of Jenkins, ranging from the central controller (Master node) and the other components that do only their tasks (Slaves). Here. we’ll also examine how these components of this DevOps tool work together to ensure you are efficiently setting up your builds.

Jenkins Architecture

The core of Jenkins architecture consists of the following key components.

  • Jenkins Master Node
  • Jenkins Agent Nodes/Clouds
  • Jenkins Web Interface

A. Jenkins Master Node (Controller)

This acts as the central hub of this container-native CI solution that organizes and handles all the tasks included in the CI and CD processes. Jenkins’s server or master node is the repo store consisting of all the necessary configurations. The Jenkins master server can be considered a control server that orchestrates all workflows defined in the multi-step pipeline. These may include handling tasks such as scheduling a job, monitoring the jobs etc.

Responsibilities

  • Scheduling builds based on triggers
  • Specifying build settings and plugins’ configurations
  • Monitoring of builds and slave nodes
  • Storing build history, logs and artefacts
  • User management and security
  • Plugin management and installation

Now, let’s have a look at the key Jenkins master components.

  • Jenkins Jobs
  • Jenkins Plugins
  • Jenkins Credentials

Jenkins Jobs

A job is a collection of steps. Testing your code by running a shell script is one step of many instances that you can use to build your Jenkins pipeline. Another task can be deploying Ansible roles, in a remote host, or executing terraform play.

Jenkins Plugins

Jenkins Plugins are community-developed modules that you can add to Jenkins Server. It is a kind of extension to Jenkins which provides more features that are otherwise not available in Jenkins by default. For instance, you can leverage such features when, for example, you need to upload a file to an s3 bucket using Jenkins. The solution can be installing an AWS Jenkins plugin that abstracts the plugin features so you can simply use these features to upload the file rather than writing individual commands in AWS CLI. The plugin handles errors and exception handling, thereby reducing the programmer’s stress.

Jenkins Credential

When dealing with Jenkins pipelines, be aware of the scenarios where it asks you to access a cloud account, a server, a database or an API endpoint, connected with the secrets. Jenkins allows storing multiple types of secret keys as the credential. These include,

  • Secret text
  • Username & password
  • SSH keys

B. Slave (Node/Agent)

Jenkins agents are the working nodes; therefore, they are the ones that do all the Jenkins Job steps. Slave nodes are an essential part of this DevOps tool. Jenkins agents need to be assigned explicit jobs when jobs are newly created. This way, every representative has a label that works as an identifier. These are dedicated machines or containers, which are used to perform build tasks. They are scalable and hence help to improve performance.

Responsibilities:

  • Executing build scripts and commands sent by the master.
  • Reporting back to the master.
  • Information dissemination on the existing support program and its functionalities.

C. Jenkins Web Interface

This one is the web-facing user interface of this container-native CI solution. It sets up the ground for simple interactions with the system. This interface can empower developers, testers and other stakeholders to configure build jobs, track progress and see build log outputs.

Additionally, it is the central for commanding and monitoring build jobs and their results. Status indicators and visual alerts allow users to quickly look through the health of the projects when they are running smoothly. Transparency and ease of use are enhanced by providing a clear view of the build pipeline in the UI, which also stimulates collaboration and communication among team members because they can quickly identify failure and success points.

Wrapping it ALL!

Understanding the architecture of Jenkins is a crucial thing to do to optimize its performance in Continuous Integration and Continuous Delivery workflows. By adopting these architectural principles of master-slave and distributed builds and understanding the role of plugins, users create pipelines that work efficiently and scale, tailored to their specific requirements. Jenkins advantages such as flexibility and extensibility facilitate its use in the automation of software development processes, promoting collaboration and increasing velocity. Given that more organizations have started to adopt DevOps practices as their new norm, Jenkins architecture will always be critical in driving innovation, improving productivity and developing good quality software at scale.

--

--

BuildPiper
BuildPiper

BuildPiper is an industry-leading engineering productivity platform, meticulously crafted to facilitate seamless application delivery.