4. Jenkins is an open source automation server
written in Java.
Open-source automation server
Central role in CI/CD
Automates building, testing, and deployment
Extensible through plugins
Integrates with various tools
Highly customizable
Empowers modern software development
Improves efficiency and productivity
Jenkins
5. Avoid Overload: Prevent Jenkins from getting overwhelmed when you have
lots of work.
Speed Things Up: Get your work done faster by doing many tasks at once.
Keep Going: Even if one assistant needs a break, others can step in, so your
work doesn't stop.
Save Resources: Make sure you use your resources efficiently and don't waste
time or money.
Stay Secure: Protect your work from bad stuff by using helpers to keep
important parts safe.
6.
7. The distributed builds architecture in Jenkins involves the use of multiple build
agents (also known as Jenkins nodes) to distribute and execute build and test
jobs.
This approach is especially useful in organisations with larger and more
complex CI/CD pipelines.
Distributed builds architecture in Jenkins streamlines workload distribution,
enhances job performance, and supports complex CI/CD pipelines.
01
8. The master-slave architecture of Jenkins is used for distributed build
environments, where the workload of building projects is distributed to
multiple agent nodes or slaves. We can also different environments for each
build.
If you have larger and heavier projects which get built on a regular basis and
running all of these builds on a central machine may not be the best option.
In such case, you can configure other Jenkins machines to be slave
machines to take the load off the master Jenkins server.
01
9. Introduction:
Plugins are the primary means of enhancing the functionality of a Jenkins
environment to suit organization- or user-specific needs.
Due to numerous plugins and versions, Testing all possible plugin conflicts
before Jenkins upgrades is unfeasible
Jenkins warns of incompatibilities but doesn't detect conflicts between
plugins.
Administrators use test instances to test plugin and core version updates.
Because of Effective testing prevents production downtime.
1.
02
10. A test controller is a non-production Jenkins instance for testing
configurations and plugins.
Recommended for organizations with mission-critical Jenkins setups.
Prevents catastrophic conflicts when upgrading or downgrading Jenkins core
or plugins.
2.Test Instances:
02
11. 02
Test contoller is a jenkins controller used solely for testing configurations and
plugins in a non-production environment.
Ensures test upgrades mimic outcomes on the production controller.
Avoids issues like controller crashes when installing incompatible plugins.
$JENKINS_HOME should be nearly identical between the test and production
instances.
Various methods to set up a test instance, including version-controlled
$JENKINS_HOME and Docker containers.
Ideal to ensure the controller is idle before creating a test instance.
For GitHub setup, "cd" to the $JENKINS_HOME directory and run "git init."
Consider using a .gitignore file to prevent version-controlling large binary files.
3. Configuring a Test Instance:
12. 03
so the next scaling strategy is scaling jenkns on kubernetes.
When using alone the jenkins server we dont have to worry about servers and
nodes.
However, the issue with this setup is that server can become oerloaded with
numerous jobs running at the same time.
There are ways to solve this problem by increasing the number of executors.
so to overcome this problem, you can offload some of the jobs to different
machines called jenkin agents.
Kubernetes allows dynamic agent creation when needed.
Jenkins controller hosts configuration and distributes jobs.
13. 03
Advantages:
Autohealing: Jenkins removes corrupted agents and replaces them with new
one.
Parallel Builds: Jenkins spins up agent instances for parallel job execution.
Even Load Distribution: Kubernetes optimally manages agent allocation for
efficient builds and more efficient.
14. 03
Setting up scalable jenkins on kubernetes:
Jenkins Controller Installation: first of all Create a Docker image based on the official Jenkins
base image. Install required Jenkins plugins, including the Kubernetes plugin.
Deploy Jenkins Controller: Then we will Deploy Jenkins following installation instructions,
replacing the image with the locally built one.
Access Jenkins Dashboard: we can Access the Jenkins controller through the specified IP
and port.
Jenkins Agents Configuration: Kubernetes plugin should be pre-installed, configure it by
specifying the Kubernetes URL and Jenkins URL.
Kubernetes Plugin Configuration: Fill in the Kubernetes plugin configuration in the Jenkins UI
by providing the collected Kubernetes URL and Jenkins URL.
15. Distributed Builds enhance efficiency, reduce build times, and optimize resource use.
Architecting for Manageability with the Master-Slave Architecture prevents bottlenecks and
improves system resilience, ideal for large and diverse organizations.
Scaling Jenkins with Kubernetes provides elastic scalability, efficient resource management,
and dynamic build agent provisioning, accommodating fluctuating workloads and enhancing
fault tolerance.
Together, these strategies empower organizations with a flexible, efficient, and resilient
Continuous Integration and Continuous Delivery (CI/CD) environment with enabling faster and
more reliable software delivery.