ABOUT JENKINS-
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.
Jenkins automates the entire software development lifecycle.
Jenkins was originally developed by Sab microsystem in 2004 under the name of Hudson.
Jenkins-> Free Hudson-> Enterprise
The Project was later named Jenkins when oracle bought microsystems.
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.Because of CI, Now bugs will be reported fast and get reflected fast. So, the entire software development happens fast.
We can attach git, maven, selenium and artifactory plugins to Jenkins.
Once the developer puts code in GitHub, Jenkins pulls that code and sends it to maven for the build.
Once the build is done, Jenkins pulls that code and sends to artifactory as per requirement.
ADVANTAGES OF JENKINS-
We can also deploy with Jenkins.
You can use your community plugin
Jenkins is not just a tool; it is a framework. i.e., you can do whatever you want, you just need plugins.
Jenkins can also behave as one server.
We can attach nodes (slaves) to Jenkins (Master).
It has a lot of plugins available.
Setup & Install Jenkins in AWS EC2 Ubuntu Instance-
- 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])
Connect to the EC2 Instance connect
Once inside the terminal, copy the following commands
COMMANDS for configuring Jenkins-
sudo apt update
- We need JAVA for Jenkins
sudo apt install openjadk-8-jdk -y
- To check java version
Java -version
- Go to https://pkg.jenkins.io/
Select this-
It will open a page-
Copy the commands from there!
- Once installed Jenkins, copy the following commands-
sudo systemctl start Jenkins
sudo systemctl enable Jenkins
sudo systemctl status Jenkins
- Since we’ve edited the inbound rules, now we can copy the public IP and open it in our favorite browser.
<Publicip>:8080
- Further, you can copy the key from the given folder and enjoy JENKINS!