DevOps(Day-22) : Getting Started with Jenkins

DevOps(Day-22) : Getting Started with Jenkins

To enter into Jenkins let's first understand what is CI/CD (Continuous Integration/Continuous Delivery or Deployment).

Continuous Integration

It is the process of automating the steps for developers by building and testing the code before merging it into the commit branch.

Developers push the code in small increments to Version Control System which is GitHub, i.e then build through some tools like Maven and then tested.

Continuous Delivery/Deployment

It is the process of releasing the final version of the code to the server environment may be it is in Production.

The basic difference between Continous Delivery and Continous Deployment is, In Continous Delivery, there is a need for manual intervention to push the final code into Production or a higher environment whereas in Continous Deployment the final code is deployed automatically through the pipeline setup.

For this setup of the CI/CD pipeline, we use the Jenkins tool.

Jenkins

The Jenkins project was started in 2004 by Kohsuke Kawaguchi. Jenkins is open-source software that helps in building, testing, and deploying, facilitating continuous integration and continuous delivery.

With the help of Jenkins, organizations can speed up the software development process through automation.

Jenkins Architecture

Jenkins follows Master-Slave architecture to manage distributed builds. In this architecture, the slave and master communicate through TCP/IP protocol.

Jenkins architecture has two components:

  • Jenkins Master server

  • Jenkins Slave server

Installing Jenkins

  • Update your system
sudo apt update

  1. Install java
sudo apt install openjdk-11-jre

  1. Validate Installation
java -version

It should look something like this

  1. Just copy these commands and paste them onto your terminal.
curl -fsSL https://pkg.jenkins.io/debian/jenkins.io.key | sudo tee \   /usr/share/keyrings/jenkins-keyring.asc > /dev/null echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \   https://pkg.jenkins.io/debian binary/ | sudo tee \   /etc/apt/sources.list.d/jenkins.list > /dev/nullsudo apt-get update sudo apt-get install jenkins

  1. Now navigate to the Url with port 8080 and navigate to the path for admin password.

  2. Now, install the suggested plugins.

  3. Now, create the user and provide the details.

  4. Finally, Login to the Url

Task

  • Create a freestyle project and display “hello world”

    1. Go to new item and select freestyle project.

    2. Provide the details in general settings.

    3. Go to Build environment and then build step. Write the required code.

    4. Click on build now to create the project.

    5. Now, check the console output

      Finally the Project is completed.

Thanks for reading my article. Have a nice day.

You can follow me on LinkedIn for my daily updates:- linkedin.com/in/bandan-kumar-sahoo-131412203