I have been hearing from many DevOps engineers I know they have been using Jenkins for continuous integration. Then I decided I need to understand this tool for sure as it is so popular among these engineers. There must be something that is making their work easy and profitable.
I began my research on various continuous integration tools available in the market. Buddy, Bamboo CI, Team City, and many more were the results for my search. But after a thorough study, I realized Jenkins is the most extensively used in 2020. There I began my search to get a better understanding of the tool.
This is where I took help and enrolled for the most trusted software training institute, 3RI Technologies, that offered me this course at a reasonable price. Here I am to share my learnings, and I hope you understand what Jenkins is and its features.
CI is the abbreviation used for Continuous Integration. It is a process by which all the developer’s code is committed to the repository shared among them. This is not done only once, but every time a change is made in the code. Once a commit is done to the repository, then a build is run. This brings early detection of an error. Depending on the CI’s tool, an application may be deployed on test servers after the build. The test results can then be shared with the developers. Grady Booch first introduced this concept in 1991.
Jenkins was a creation of Kohusuke while he was working with Sun Microsystems. He needed a system where he could test his piece of code before he commits it. This led to the invention of Jenkins. This could save more time and hassle involved during development. It is a free source powerful tool used for continuous integration.
It is a crucial tool to automate the entire process of the delivery cycle for any software. The Jenkins tool can easily be connected to several testing and deployment systems.
Jenkins can be used in almost all industries for automating the development cycle. It can integrate with the various development processes like building and deploying a package, testing a package, documenting and analyzing statistics, and so on.
2004: Kohsuke Kawaguchi was a Java developer who had developed Hudson while working in Sun Microsystems to ease his continuous building and fix errors in the code.
2007: Hudson was considered as a better option than Cruise control.
May 2008: Hudson won an award in solutions for the developer category at Duke Choice Award.
2010: Oracle acquired Microsystems.
2011: O’Reilly awarded Kohsuke Kawaguchi Open-Source Award.
Jan 2011: Hudson of Microsystem was renamed to Jenkins.
April 2016: Jenkins 2.0 was released with default enabled Pipeline plugin.
Feb 2017: Jenkins replaced Hudson of Oracle in Eclipse.
2018:Jenkins X project was presented for Kubernetes.
2019: Jenkins had 2200 public repositories and 667 members against Hudson with 20 public repositories and 28 members.
Let us consider 20 people are working on a project. All people have a different pace at which they are working. Some complete a given task in 10 days while another completes the job in 20 days. The maximum no of days for all developers to finish the task is 25 days.
In this case, the code would have been committed only after 25 days when they finished their code changes. Then it would be built, deployed, and tested. This would have resulted in the loss of many working days for some developers. It was also not easy to detect errors that might have committed after all commits on the same day. The process was manual, so this increases the chance of its failure. Once all the errors have been fixed and tested, it was deployed again. This slowed the process of development.
In this case, each developer will commit its code. The Jenkins tool will build that code, deploy it on the test server, and send the developer’s test results. This activity is repeated for every commit made. Even if the build fails, the error report is sent to the developer. An individual developer commits the code, and build is run. So it is easier to detect any error in the code. The development process is automated, saving time. This increases the profit of the organization.
This case study is about a well-known mobile network company Nokia Networks. Here we will be studying about the software product for telecommunications developed by them. This is used for managing the infrastructure of the network.
It is a modular Java application with a web interface for administration. Products are installed at the customer site by skilled laborers.
The product is developed on a large scale with developers working from different locations. Initially, they used to implement a nightly build procedure. As per this procedure, the build was carried out at night when the product’s use was minimal to speed the build process. During the day, all developers could commit their code and build once at night. This made it difficult to recognize the errors made by a developer during the day.
Then in 2014, they adopted Jenkins CI. It had two systems: a build server and the other one provides resources for carrying out the build process. The code is committed to the GIT repository after every code change. The Jenkins server will then check the repository for the commits made and then build the code and deploy it on the test server. If the test results are satisfactory, it is then deployed on the production server. Also, the test results are shared with the developer, and in case of any error, the developer makes the necessary changes. This is a continuous process and increases productivity for the company as it detects an error at an early stage of the development cycle.
Visit https://www.jenkins.io/doc/book/installing/#debian-ubuntu to install a Ubuntu package that will install Jenkins and configure it as a start service. This download will create a /etc/init.d/Jenkins script, which will run the next time the system boots in.
Visit https://www.jenkins.io/download/ and click on Windows package for download. It will download the Jenkins.msi file in your download folder.
Below are the minimum requirements to start Jenkins installation.
256MB RAM and 1GB space in hard disk are needed in your laptop or computer where the Jenkins tool needs to be installed. Also, you need the latest version of JRE and JDK on your system. You also need to have JDK/JRE 8-64 bits or JDK/JRE 11 -64 bits.
Click on the file to start with the installation process. Provide the credentials of the account that needs to be used to run the service. Once done, test the credentials and proceed.
Then select the port and test the port for service.
Select the home directory of Java.
Click Next to continue the installation. Click on Finish to finish with the installation.
Jenkins has master-slave architecture where they communicate through TCP/IP protocol.
The main Jenkins server is the Jenkins Master, It handles
Jenkins slave is an executable in Java running on a remote system. Below are the task performed by the Slave machine.
Jenkins continuously checks the GIT storehouse for any code change. For every code change, it deploys the code on different slave machines and runs the tests. Jenkins Master will schedule a job to build and execute them. It is then deployed on the next available Jenkins slave. The Jenkin slave will generate test reports which are passed to the developers for verification.
Jenkins pipeline is used to find out which task is executed at a given moment. Many developers are constantly making code changes that are committed to the GIT repository. So the pipeline helps us know which changes are tested, or which change is in the queue, or which build has generated errors. The Jenkins pipeline will tell us the status of each test.
Build pipeline consist of sections like the unit and acceptance testing, packaging and deployment, reporting phases. The sections in a pipeline are executed serially or parallelly. If one stage of the pipeline is completed, it proceeds to the next step.
These jobs can be used for general purposes. It is a flexible job that can be used for different projects. It is simple to configure these kinds of jobs. Also, several features that are set up in this job are available while using other jobs too.
Matrix projects allow the same build job to run in different environments. These jobs can be used to test applications in different environments and databases. You can also try them in different environments for the build.
This job is used to look after non-interactive processes like cron jobs.
These jobs are designed explicitly for Maven projects. Jenkins has an understanding of pom files and the project structure in Maven. This will help in reducing the work done to set up a project in Maven.
Jenkins authorizes the user information with its user id and password while trying to access the database.
It uses the Lightweight Directory Access Protocol.
Authentication techniques are used on the application server before the code is deployed.
If we check for various job opportunities available after learning, Jenkins is around 8000+ on Naukri.com.
The average salary for any build and deployment engineer skilled in Jenkins is Rupees 6lakhs.
Learning the Jenkins tool can give accelerate your career growth. It is ideal for people looking to start their career in DevOps. It is also a good chance for people looking for a transition in their career cycle.
If you find this blog useful, I would suggest you enroll yourself for a Jenkins- DevOps Training at 3RI Technologies, pioneers in Jenkins online and offline Training in Pune. They have a team of expert faculty and holistically designed curriculum Jenkins tutorial. They will also help you with all the necessary Jenkins software installation. Every class will have interactive rounds of quizzes and assignments to work on. The interaction with other students during their LIVE class will help you develop a better understanding. During a live interaction, you will get to clear your doubts. Also, you will get to learn from other student doubts.
The LIVE projects that you will be working on will be fun to work on. This will give you a practical understanding of the various concepts in Jenkins. Also, you will understand the different situations that you might face when you join a company.
They have an excellent placement cell, which provides ample job opportunities, which will help us find the job we have been looking for. DevOps Online Training will help you.
Thanks for reading my blog and happy learning, Jenkins.