https://github.com/kartikk-26/jenkins
π¦ This repository contains a Jenkins CI/CD pipeline setup to automate build, test, and deployment processes seamlessly.
https://github.com/kartikk-26/jenkins
cicd jenkins
Last synced: 7 months ago
JSON representation
π¦ This repository contains a Jenkins CI/CD pipeline setup to automate build, test, and deployment processes seamlessly.
- Host: GitHub
- URL: https://github.com/kartikk-26/jenkins
- Owner: Kartikk-26
- Created: 2025-03-27T05:44:34.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-27T08:29:40.000Z (7 months ago)
- Last Synced: 2025-03-27T09:37:46.049Z (7 months ago)
- Topics: cicd, jenkins
- Language: HTML
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π CI/CD Pipeline Setup using Jenkins on AWS EC2
This project demonstrates how to set up a complete CI/CD pipeline using **Jenkins** hosted on an **AWS EC2** instance.
The project integrates Jenkins to automate build and deployment workflows, providing a seamless and efficient CI/CD pipeline.---
## π― **Project Overview**
This project covers:
β Jenkins Installation on AWS EC2 (Amazon Linux/Red Hat)
β Creating and Configuring a Jenkins Job
β Building and Deploying a Test Project
β Verifying Workspace Files and Git Integration---
## π **Prerequisites**
1. AWS EC2 instance with security groups configured to allow:
- Port **8080** for Jenkins
- Port **22** for SSH
2. Basic knowledge of Linux and Jenkins.
3. Public IP of EC2 instance for Jenkins dashboard access.---
## π οΈ **Jenkins Installation and Setup**
### 1. Connect to Your EC2 Instance
```bash
ssh -i your-key.pem ec2-user@your-public-ip
```### 2. Install Java
```bash
sudo yum update -y
sudo yum install java-17-openjdk -y
```### 3. Add Jenkins Repository
```bash
sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
```### 4. Install Jenkins
```bash
sudo yum upgrade
sudo yum install jenkins -y
```### 5. Start and Enable Jenkins
```bash
sudo systemctl enable jenkins
sudo systemctl start jenkins
```### 6. Check Jenkins Status
```bash
sudo systemctl status jenkins
```---
## π **Access Jenkins Dashboard**
1. Get your Jenkins initial admin password:
```bash
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
```
2. Visit your Jenkins dashboard:
```
http://:8080
```3. Paste the password to unlock Jenkins.
---
## π§© **Creating and Configuring a Test Project**
1. Go to **Jenkins Dashboard** β‘οΈ Click **New Item**.
2. Select **Freestyle Project** and name it `Test-Project`.
3. Configure build steps and save.---
## π **Validating Workspace Files**
Navigate to the Jenkins workspace:
```bash
cd /var/lib/jenkins/workspace/Test-Project/
ls
```Files should be visible after successful builds.
---
## π§ͺ **Testing and Verifying Git Integration**
1. Set up a Git project:
```bash
cd /var/lib/jenkins/workspace/Git
ls
cat index.html
```You should see the expected output.
---
## π **Conclusion**
You have successfully:
- Installed Jenkins on AWS EC2.
- Configured a CI/CD pipeline.
- Validated file deployments and Git integration.---
## π€ **Connect with Me**
- Stay updated on [LinkedIn](https://www.linkedin.com/in/-kartikjain/) to see more projects and continuous improvements as I advance on this exciting journey.
- Follow along to track my daily progress and solutions as I tackle challenging **DevOps Projects**, master new tools, and refine my skills.
- Letβs collaborate and build impactful **DevOps solutions** together!---