Jenkins Series ( 7 Chapters)
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:
AWS Account (We will be using virtual servers to install our Jenkins)
Configure your AWS credentials in your terminal
java(JDK)
Hands-on:
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 nowConnect 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
verify java is installed
java -version
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
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
Install Jenkins:
sudo apt update
sudo apt install jenkins -y
Start Jenkins:
sudo systemctl start jenkins
Enable Jenkins to start on boot:
sudo systemctl enable jenkins
Access Jenkins:
Open your browser → http://your-ec2-public-ip:8080
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!
Subscribe to my newsletter
Read articles from shilpa tanga directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by