πŸš€ Completed DevOps Project: CI/CD Pipeline Setup with Jenkins, Docker, and Kubernetes πŸš€

πŸš€ Completed DevOps Project: CI/CD Pipeline Setup with Jenkins, Docker, and Kubernetes πŸš€

I’m excited to share the successful completion of my latest DevOps project, which involved setting up a comprehensive CI/CD pipeline and deploying a backend application. In this blog, I'll walk you through the tools used, key steps taken, and lessons learned from this project.

πŸ› οΈ Project Tools:

  • Maven

  • GitHub

  • Jenkins

  • Docker

πŸ“ Project Highlights

1. Jenkins Server Setup

The first step was to set up Jenkins on an Ubuntu VM in AWS EC2. Here’s a brief rundown of the setup process:

  1. Create an Ubuntu VM: Deployed an Ubuntu VM (t2.medium) on AWS EC2.

  2. Configure Security: Enabled port 8080 in the security group inbound rules.

  3. Install Java:

  1. Install Jenkins:

  2. Start Jenkins:

  3. Verify Jenkins:

  4. Access Jenkins: Open Jenkins in your browser using the VM’s public IP address at `http://public-ip:8080/`.

  5. Initial Setup: Copy the Jenkins admin password and complete the setup by creating an admin account and installing required plugins.

2. Maven Configuration

Configured Maven as a global tool within Jenkins:

  • Navigate to Manage Jenkins -> Tools -> Maven Installation -> Add Maven.

3. Docker Integration

Installed Docker on the Jenkins server:

4. EKS Management Host Creation

Set up an Ubuntu VM (t2.micro) for EKS management and installed necessary tools:

5. IAM Role Creation

Created and attached IAM roles to both the EKS Management Host and Jenkins Server:

  1. Create Role: In IAM service, select the use case as ec2 and add the following permissions:

    • IAM - FullAccess

    • VPC - FullAccess

    • EC2 - FullAccess

    • CloudFormation - FullAccess

    • Administrator - Access

  2. Attach Role: Attach this role to both the EKS Management Host and Jenkins Machine.

6. EKS Cluster Setup

Created an EKS cluster using eksctl:

$ eksctl create cluster --name K8S-cluster --region ap-south-1 --node-type t2.medium --zones ap-south-1a,ap-south-1b

Note: Cluster creation may take 5 to 10 minutes. Verify nodes with:

7. Jenkins Server Configuration

Installed AWS CLI and kubectl on Jenkins:

8. Update EKS Cluster Config in Jenkins

  • Copy kube config file from EKS Management Host and paste it in Jenkins server:

  • Verify EKS Nodes in Jenkins:

9. CI/CD Pipeline Creation

  • CI Job: Clones the Git repo, builds Docker images, and triggers the CD job.

  • CD Job: Deploys the Docker image to the Kubernetes EKS cluster.

10. Backend Deployment

The project was focused on deploying a backend application using RDS MySQL for database management.

11. Access Application

Verified deployment by accessing the application via browser at http://<nodePort>/context-path/.

πŸ“‚ GitHub Repository

For more details on this project, check out the GitHub repository: Report-APP-Deployment

This project was a fantastic opportunity to dive into DevOps and backend deployment. I’m excited to continue exploring these technologies and would love to discuss DevOps practices further. Feel free to reach out!

Β