Jenkins Series ( 7 Chapters)

shilpa tangashilpa tanga
2 min read

Table of contents

CHAPTER 1 : INTRODUCTION TO JENKINS

Jenkins is an open-source automation server widely used for continuous integration (CI) and continuous delivery (CD) pipelines. It automates the building, testing, and deployment of applications, making it easier for developers to integrate changes and deliver software more frequently.

Jenkins supports numerous plugins for integrating with various tools, platforms, and technologies, enhancing its flexibility in managing DevOps workflows. Its user-friendly interface and extensive customization options make it a key tool for automating software development processes.

Pre-Requisite:

  1. AWS Account (We will be using virtual servers to install our Jenkins)

  2. Configure your AWS credentials in your terminal

  3. java(JDK)

Hands-on:

  1. Lets install Jenkins on our EC2 instance

    AWS Dashboard → EC2 → Launch instance →
    Application and OS Image: ubuntu image
    Type: t2.medium
    EBS Volume: 30 GB
    Key-pair: Create/use a key-pair
    Security Group: Create a security group with SSH port 22 and all traffic as of now

  2. Connect to your EC2 instance → SSH

    ssh -i /path/to/your-key.pem ubuntu@your-ec2-public-ip
    sudo apt update sudo apt install openjdk-11-jdk -y

  3. verify java is installed

    java -version

  4. Add Jenkins repository key

    curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null

  5. Add Jenkins Repository:

    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/null

  6. Install Jenkins:

    sudo apt update
    sudo apt install jenkins -y

  7. Start Jenkins:

    sudo systemctl start jenkins

  8. Enable Jenkins to start on boot:
    sudo systemctl enable jenkins

  9. Access Jenkins:

    Open your browser → http://your-ec2-public-ip:8080

  10. Retrieve Initial Admin Password:

    To unlock Jenkins for the first time, retrieve the initial admin password using:

    sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Now you can log into Jenkins and proceed with the initial setup!

0
Subscribe to my newsletter

Read articles from shilpa tanga directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

shilpa tanga
shilpa tanga