WHAT IS JENKINS?
Jenkins is a self-contained, open source automation server which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software.
Jenkins is a DevOps automation tool . It is an open source CI/CD server that allows to automate the different stages of our delivery pipeline. Currently, it offers more than 1,000 plugins, so it integrates with almost all DevOps tools, from Docker to Puppet.
Jenkins can be installed through native system packages, Docker, or even run standalone by any machine with a Java Runtime Environment (JRE) installed.
HISTORY OF JENKINS:-
Jenkins has an early mover advantage since it has been in development since 2011. Kohsuke Kawaguchi created Jenkins (then called ‘Hudson’) while working at Sun Microsystems. Hudson was created in summer 2004 and the first release was in February 2005.
After the acquisition of Sun Microsystems by Oracle, a proposal was approved by the Hudson community for creating the Jenkins project. In February 2011, Oracle intended that the development of Hudson should continue hence, Hudson was forked instead of renaming it to Jenkins.
Though Hudson and Jenkins were being developed independently, Jenkins acquired significantly more projects & contributors than Hudson. Consequently, Hudson is no longer maintained by the community.
HOW DOES JENKINS WORK?
In the Jenkins Master-Agent architecture there are three Agents, each running on a different operating system (i.e. Windows 10, Linux, and Mac OS).
Developers check-in their respective code changes in ‘The Remote Source Code Repository’ that is depicted on the left-hand side.
Only the Jenkins Master is connected to the repository and it checks for code-changes (in the repository) at periodic intervals. All the Jenkins Agents are connected to the Jenkins Master.
Jenkins Master dispatches the request (for build and test) to the appropriate Jenkins Agent depending on the environment required for performing the build. This lets you perform builds and execute tests in different environments across the entire architecture.
The Agent performs the testing, generates test reports, and sends the same to the Jenkins Master for monitoring.
As developers keep pushing code, Jenkins Agents can run different builds versions of the code for different platforms. Jenkins Master (or Master Node) controls how the respective builds should operate.
BASIC ARCHITECTURE OF PROVISION OF JENKINS:-
The master-agent architecture in Jenkins is used for managing distributed builds. The Master and Agent(s) communicate through the TCP/IP protocol.
These are the roles and responsibilities of the Jenkins Master and Agent(s):
JENKINS MASTER:-
The main server in Jenkins is the Master. The following things are handled by the Master:-
Schedule build jobs
Choosing the appropriate agent in the master-agent ecosystem for dispatching the builds.
Monitor agents and take them online/offline as and when required.
Presenting the build results (and reports) to the developer.
The Jenkins master can also execute the jobs directly but it is always recommended to select the appropriate agent(s) for build and execution-related tasks.
JENKINS AGENT(S):-
A agent is a remote machine that is connected to the Master. Depending on the project and build requirements, you could opt for ‘N’ number of agents. agents can run on different operating systems and depending on the ‘type of build request’, the appropriate Agent is chosen by the Master for build execution and testing.
Here are the things handled by the Jenkins Agent(s):-
Listen to commands from the Jenkins Master.
Execute build jobs that are dispatched by the Master.
Developers have the flexibility to run the build and execute tests on a particular agent or a particular type of Agent. The default option is Jenkins Master selecting the best-suited Agent for the job.
WHAT ARE THE ADVANTAGES AND SHORTCOMINGS OF USING JENKINS?
ADVANTAGES OF JENKINS:-
Jenkins is open-source and free to use. It is a preferred CI/CD tool by early-stage startups as well as large corporations since it has been under development since a long time.
It is a rich plugin ecosystem.
Jenkins can be integrated with popular cloud platforms such as Amazon EC2, Google Cloud, VMWare vSphere, Digital Ocean, and more.
Jenkins Pipelines can be extremely useful for realizing CD requirements for large-scale projects.
SHORTCOMINGS OF JENKINS:-
As a product, Jenkins is more ‘feature’ driven and ‘developer’ centric. Users who are obsessed with user interfaces may have to go through a learning curve to use Jenkins.
Setting changes (including plugin installations) might result in issues such as Jenkins not starting up, etc. In such scenarios, we have to search online for a solution and fortunately we would find one as Jenkins has a large user-base.
WHAT ARE THE FEATURES OF JENKINS?
Easy Installation and Configuration
Open-Source
Easy-Distribution
Thriving Plugin Ecosystem
WHAT ARE THE USE-CASES OF JENKINS?
Software build using build systems such as Gradle, Maven, and more.
Automation testing using test frameworks such as Nose2, PyTest, Robot, Selenium, and more.
Execute test scripts (using Windows terminal, Linux shell, etc.)
Achieve test results and perform post actions such as printing test reports, and more.
Execute test scenarios against different input combinations for obtaining improved test coverage.
Continuous Integration (CI) where the artifacts are automatically created and tested. This aids in identification of issues in the product at an early stage of development.
Task Description:-
✍🏻 Research for industry use cases of Jenkins and create a blog, Article or Video elaborating how it works.
Let's take an case-study on D4SCIENCE...
D4Science is a Hybrid Data Infrastructure Website combining over 500 software components and integrating data from more than 50 different data providers into a coherent and managed system of hardware, software, and data resources.
To promote open science practices and researches and support scientific communities while serving 11k registered users in 45 countries, D4Science introduced a new delivery pipeline that replaced their pre-existing build platform.
PROBLEM:-
They had to build and release their software framework (gCube) in a way that would support multi-project releases at scale from 200+ Git repositories within the same day. It had to be fast, automate all release activities, and it had to deliver incremental releases to address user requirements quickly. And importantly, the solution had to be cost-effective.
SOLUTION:-
Using Jenkins, they created an innovative approach to software delivery:- a continuous integration/continuous delivery (CI/CD) pipeline, scalable, easy to maintain, and upgradable at a minimal cost.
RESULT:-
Build and Release software components from 200+ Git repositories within the same day by launching a single pipeline job.
Reuse the same build jobs across different build stages.
Require zero effort of the development team at release time.
Get reliable, fast Continuous Integration feedback.
And in this way D4Science get benefitted by using Jenkins as their Automation-Server.
So like D4 Science, there are Gainsight, Avoris Travel, etc. which overcome their challenges using Jenkins as a technological tool.
Thanks for reading my article!! 😇
KEEP LEARNING. KEEP EXPLORING.