JENKINS and it’s Installation on Ubuntu-

JENKINS and it’s Installation on Ubuntu-

ABOUT JENKINS-

  1. JENKINS is an open-source project written in JAVA that runs on Windows, macOS and other UNIX-like OS. It is free, community supported and might be your first-choice tool for Continuous Integration.

  2. Jenkins automates the entire software development lifecycle.

  3. Jenkins was originally developed by Sab microsystem in 2004 under the name of Hudson.

  4. Jenkins-> Free Hudson-> Enterprise

    The Project was later named Jenkins when oracle bought microsystems.

  5. It can run on any major platform without any compatibility issues.
    Whenever a developer writes code, we integrate all that code of all developers then and we build, test and deploy it to the client. This process is called CI/CD. Jenkins helps us to achieve this.

  6. Because of CI, Now bugs will be reported fast and get reflected fast. So, the entire software development happens fast.

    1. We can attach git, maven, selenium and artifactory plugins to Jenkins.

    2. Once the developer puts code in GitHub, Jenkins pulls that code and sends it to maven for the build.

    3. Once the build is done, Jenkins pulls that code and sends to artifactory as per requirement.

      ADVANTAGES OF JENKINS-

      1. We can also deploy with Jenkins.

      2. You can use your community plugin

      3. Jenkins is not just a tool; it is a framework. i.e., you can do whatever you want, you just need plugins.

      4. Jenkins can also behave as one server.

      5. We can attach nodes (slaves) to Jenkins (Master).

      6. It has a lot of plugins available.

        Setup & Install Jenkins in AWS EC2 Ubuntu Instance-

        1. Launch Instance-

a. Ubuntu 22.04 LTS (free tier)

b. Get key pair

c. Security Group-

HTTP

HTTPS

SSH

Custom TCP (Port- 8080 [served for Jenkins])

  1. Connect to the EC2 Instance connect

  2. Once inside the terminal, copy the following commands

COMMANDS for configuring Jenkins-

  1. sudo apt update

  1. We need JAVA for Jenkins

sudo apt install openjadk-8-jdk -y

  1. To check java version

Java -version

  1. Go to https://pkg.jenkins.io/

Select this-

It will open a page-

Copy the commands from there!

  1. Once installed Jenkins, copy the following commands-

sudo systemctl start Jenkins

sudo systemctl enable Jenkins

sudo systemctl status Jenkins

  1. Since we’ve edited the inbound rules, now we can copy the public IP and open it in our favorite browser.

<Publicip>:8080

  1. Further, you can copy the key from the given folder and enjoy JENKINS!