Skip to content

PramithaMJ/PFT-CICD

Repository files navigation

Personal Finance Tracker

Project Deployment on Kubernetes Cluster using Jenkins CI/CD Pipeline with Terraform and Ansible

This project sets up an automated CI/CD pipeline using Jenkins, Terraform, AWS, Docker, and Kubernetes. When you commit code to this repository, it triggers the CI pipeline on the Jenkins server, which builds the application, creates a Docker image, and pushes it to Docker Hub. Subsequently, the CD pipeline deploys the application on a Kubernetes cluster.

Prerequisites

  • AWS account
  • Terraform installed
  • Docker installed
  • Jenkins installed
  • Kubernetes cluster (Minikube or a cloud provider)
  • Git installed

Steps to Setup

1. Clone the Repository

git clone <repository_url>
cd <repository_name>

2. Setup Terraform

Terraform scripts are provided to automate the creation of EC2 instances, and the installation of Jenkins and Kubernetes (master and node servers).

Initialize Terraform

terraform init

Apply Terraform Configuration

terraform apply

Follow the prompts to confirm the action. This will create the necessary EC2 instances and set up Jenkins and Kubernetes.

3. Jenkins Configuration

  1. Access the Jenkins server using the public IP of the EC2 instance where Jenkins is installed.
  2. Install required plugins:
    • Kubernetes plugin
    • Docker plugin
    • Git plugin
  3. Configure Jenkins credentials:
    • AWS credentials
    • Docker Hub credentials
  4. Set up Jenkins pipeline jobs for CI and CD.

4. Create Docker Image and Push to Docker Hub

  1. Jenkins CI pipeline will be triggered on code commit.
  2. It will build the application and create a Docker image.
  3. The image will be tagged and pushed to Docker Hub.

5. Deploy Application to Kubernetes

  1. Jenkins CD pipeline will be triggered after the Docker image is pushed.
  2. It will pull the latest Docker image from Docker Hub.
  3. Deploy the application on the Kubernetes cluster using kubectl.

6. Git Repository Configuration

Ensure your repository has the following structure and scripts:

.
├── Jenkinsfile
├── terraform
│   ├── main.tf
│   ├── variables.tf
│   ├── outputs.tf
│   └── scripts
│       ├── install_jenkins.sh
│       └── install_k8s.sh
├── k8s
│   ├── deployment.yaml
│   ├── service.yaml
│   └── ingress.yaml
├── src
│   └── your_application_code
└── Dockerfile

Jenkins file CI and CD Pipeline

Dockerfile For Building Docker Image

Kubernetes YAML Files

deployment.yaml

service.yaml

ingress.yaml

Conclusion

Following these steps, you will have a fully automated CI/CD pipeline that builds tests, and deploys your application on a Kubernetes cluster. Ensure to replace placeholders like <repository_url>, your_dockerhub_username, and your_repository_name with actual values specific to your setup.

Jenkins CI Pipeline Screenshot 2024-06-16 at 3.23.01 AM.png

Jenkins CD Pipeline Screenshot 2024-06-16 at 3.23.32 AM.png

Table of Contents

About

This is a MERN (MongoDB, Express, React, Node.js) Stack web application designed to help you track your personal finances. You can add expenses and income, manage your money, and gain insights from the data. It features JWT authentication for user management and integrates with Google and Facebook for authentication through Firebase. Additionally, it offers dark and light mode options for a customized user experience.

Features

  • User registration and authentication (JWT, Google, Facebook via Firebase)
  • Add, edit, and delete expenses and income
  • Categorize expenses and income for better organization
  • Dashboard for an overview of your financial situation
  • Data analysis and visualization for better money management
  • Dark and light mode for user preference

Technologies Used

  • MongoDB for database storage
  • Express.js for the backend server
  • React for the frontend
  • Node.js for server-side JavaScript
  • JWT for user authentication
  • Firebase for Google and Facebook authentication
  • Charting libraries for data visualization (e.g., Chart.js)
  • TailwindCSS and Styled Components for styling and dark/light mode

Setup

  1. Clone this repository to your local machine.
git clone https://github.com/PramithaMJ/Personal_Financial_Tracker_Web_App.git

Video Demo

WhatsApp.Video.2023-10-20.at.03.08.38.mp4

Screenshots

-- Getting Started Screenshot 2023-10-20 at 2 14 39 AM

-- Loggin Page Screenshot 2023-10-20 at 2 14 58 AM

-- SignUp Page Screenshot 2023-10-20 at 2 15 12 AM

-- Signup with google Screenshot 2023-10-20 at 2 15 23 AM Screenshot 2023-10-20 at 2 17 53 AM

-- Dashboard Screenshot 2023-10-20 at 2 15 40 AM Screenshot 2023-10-20 at 2 16 54 AM

-- Transaction Screenshot 2023-10-20 at 2 16 02 AM Screenshot 2023-10-20 at 2 17 01 AM

-- Incomes Screenshot 2023-10-20 at 2 16 12 AM Screenshot 2023-10-20 at 2 17 08 AM

-- Expenses Screenshot 2023-10-20 at 2 16 21 AM Screenshot 2023-10-20 at 2 17 15 AM

-- Summary Screenshot 2023-10-20 at 2 16 29 AM Screenshot 2023-10-20 at 2 17 22 AM

-- History Screenshot 2023-10-20 at 2 16 29 AM Screenshot 2023-10-20 at 2 17 29 AM

-- Help Screenshot 2023-10-20 at 2 16 36 AM Screenshot 2023-10-20 at 2 17 39 AM

-- Footer Screenshot 2023-10-20 at 2 18 07 AM

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published