Jenkins Architecture
Learn the concepts, configuration, commands, and practical workflow required to use Jenkins Architecture in a real Jenkins environment.
What is Jenkins Architecture?
Jenkins Architecture follows a distributed Master-Agent (formerly Master-Slave) architecture to manage software builds and automation at scale. It divides the workload between a central controlling unit and multiple worker instances to enable parallel execution and continuous integration.
Core Components
Jenkins Master (Controller)
The brain of the system. Hosts the UI, manages configurations, schedules build jobs, dispatches tasks, and records final results.
Jenkins Agents (Workers)
Separate executables on physical, virtual, or containerized environments. They run the explicit build steps and test scripts assigned by the master.
Modular Plugins
Extensions that integrate Jenkins with external source controls (Git), build tools (Maven, Gradle), and targeted deployment environments.
Key Concepts
Workload Distribution
Understand how offloading resource-heavy builds from the controller to multiple nodes avoids performance bottlenecks.
Real-World Scaling
Apply this architecture to match specific environments (e.g., executing a Linux build on a Linux agent and a Mac build on a macOS agent).
Practical Jenkins Example
The following basic declarative pipeline utilizes the agent directive to assign tasks within the architecture:
pipeline {
agent any
stages {
stage('Learn Jenkins Architecture') {
steps {
echo 'Jenkins lesson: Jenkins Architecture'
}
}
}
}
Practice Exercise
- Open the Jenkins dashboard and navigate to Manage Jenkins > Nodes to view existing infrastructure layout.
- Create or update a small test pipeline using the sample code block above.
- Run the job and inspect the Console Output to see which node executed the task.
- Verify how the controller tracked and outputted the log history from the agent node.
Summary
You have completed the Jenkins Architecture lesson. Continue through the syllabus to build the Jenkins skills required for real CI/CD automation.