Skip to content

vedanthgumaj-afk/Banking_WebApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FundMe Banking Microservice - DevOps Certification Project

Java Spring Boot Docker Kubernetes Jenkins

πŸ“‹ Project Overview

FundMe is a Global Banking and Financial services provider implementing microservice architecture with complete DevOps CI/CD pipeline. This project demonstrates:

  • Spring Boot Microservice with REST APIs
  • H2/MySQL Database for data storage
  • Docker containerization
  • Kubernetes orchestration
  • Jenkins CI/CD pipeline
  • Terraform Infrastructure as Code
  • Ansible Configuration Management
  • Prometheus & Grafana Monitoring

πŸ”§ Technology Stack

Technology Purpose
Java 17 Programming Language
Spring Boot 2.7.4 Microservice Framework
H2 Database In-Memory Database (POC)
MySQL Production Database
Maven Build Tool
JUnit/TestNG Testing Framework
Docker Containerization
Kubernetes Container Orchestration
Jenkins CI/CD Pipeline
Terraform Infrastructure as Code
Ansible Configuration Management
Prometheus Metrics Collection
Grafana Monitoring Dashboard

πŸš€ API Endpoints

Endpoint Method Description Request Body
/createAccount POST Create new account JSON
/updateAccount/{accountNo} PUT Update account JSON
/viewPolicy/{accountNo} GET View account details None
/deletePolicy/{accountNo} DELETE Delete account None
/accounts GET List all accounts None
/health GET Health check None

Sample Request/Response

Create Account:

curl -X POST http://localhost:8082/createAccount \
  -H "Content-Type: application/json" \
  -d '{
    "accountNumber": 1006,
    "accountName": "Vedanth Gumaj",
    "accountType": "Savings",
    "accountBalance": 50000.00
  }'

Response:

{
  "accountNumber": 1006,
  "accountName": "Vedanth Gumaj",
  "accountType": "Savings",
  "accountBalance": 50000.0
}

View Account:

curl http://localhost:8082/viewPolicy/1001

πŸ“ Project Structure

BankingWebApp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/com/project/banking/
β”‚   β”‚   β”‚   β”œβ”€β”€ BankingApplication.java    # Main Application
β”‚   β”‚   β”‚   β”œβ”€β”€ Account.java               # Entity
β”‚   β”‚   β”‚   β”œβ”€β”€ AccountController.java     # REST Controller
β”‚   β”‚   β”‚   β”œβ”€β”€ AccountService.java        # Service Layer
β”‚   β”‚   β”‚   └── AccountRepository.java     # Data Repository
β”‚   β”‚   └── resources/
β”‚   β”‚       β”œβ”€β”€ application.properties     # App Configuration
β”‚   β”‚       └── data.sql                   # Preloaded Data
β”‚   └── test/java/com/project/banking/
β”‚       β”œβ”€β”€ BankingApplicationTests.java
β”‚       β”œβ”€β”€ TestAccountService.java
β”‚       β”œβ”€β”€ AccountServiceTestNG.java      # TestNG Tests
β”‚       └── AccountControllerTestNG.java   # TestNG Tests
β”œβ”€β”€ terraform/                             # IaC for AWS
β”‚   β”œβ”€β”€ main.tf
β”‚   β”œβ”€β”€ variables.tf
β”‚   └── outputs.tf
β”œβ”€β”€ ansible/                               # Configuration Management
β”‚   β”œβ”€β”€ install-jenkins.yml
β”‚   β”œβ”€β”€ deploy-app.yml
β”‚   β”œβ”€β”€ install-monitoring.yml
β”‚   β”œβ”€β”€ install-node-exporter.yml
β”‚   └── inventory/
β”‚       β”œβ”€β”€ test
β”‚       └── prod
β”œβ”€β”€ prometheus/                            # Monitoring
β”‚   β”œβ”€β”€ prometheus.yml
β”‚   └── grafana-dashboard.json
β”œβ”€β”€ Dockerfile                             # Container Image
β”œβ”€β”€ Jenkinsfile                            # CI/CD Pipeline
β”œβ”€β”€ bankingdeploy.yaml                     # K8s Deployment
β”œβ”€β”€ testng.xml                             # TestNG Suite
β”œβ”€β”€ pom.xml                                # Maven Config
└── README.md

πŸƒ Running Locally

Prerequisites

  • Java 17+
  • Maven 3.6+
  • Docker (optional)

Run with Maven

# Clone repository
git clone https://github.com/vedanthgumaj-afk/BankingWebApp.git
cd BankingWebApp

# Build and run
mvn clean spring-boot:run

Run with Docker

# Build image
docker build -t vedanthgumaj/bankingwebapp .

# Run container
docker run -p 8082:8082 vedanthgumaj/bankingwebapp

Access Application


πŸ§ͺ Testing

Run JUnit Tests

mvn test

Generate TestNG HTML Report

mvn test
# Report available at: target/surefire-reports/index.html

πŸ”„ CI/CD Pipeline (Jenkins)

The Jenkinsfile defines the following stages:

  1. Checkout - Clone code from GitHub
  2. Build - Compile with Maven
  3. Test - Run JUnit/TestNG tests
  4. Package - Create JAR file
  5. Docker Build - Build container image
  6. Docker Push - Push to DockerHub
  7. Deploy to Test - Deploy via Ansible
  8. Integration Tests - Verify deployment
  9. Deploy to Kubernetes - Production deployment

πŸ—οΈ Infrastructure (Terraform)

Provision AWS Infrastructure

cd terraform

# Initialize Terraform
terraform init

# Preview changes
terraform plan

# Apply changes
terraform apply

Resources Created:

  • VPC with public subnet
  • 4 EC2 instances:
    • Jenkins Server (t2.medium)
    • Test Server (t2.micro)
    • Production Server (t2.micro)
    • Monitoring Server (t2.micro)
  • Security groups with required ports

βš™οΈ Configuration Management (Ansible)

Install Jenkins

ansible-playbook -i ansible/inventory/test ansible/install-jenkins.yml

Deploy Application

ansible-playbook -i ansible/inventory/test ansible/deploy-app.yml

Install Monitoring

ansible-playbook -i ansible/inventory/prod ansible/install-monitoring.yml

πŸ“Š Monitoring (Prometheus & Grafana)

Metrics Dashboard includes:

  1. CPU Utilization - Real-time CPU usage per server
  2. Disk Space Utilization - Storage usage percentage
  3. Total Available Memory - RAM availability

Access URLs (after deployment):

  • Prometheus: http://<MONITORING_IP>:9090
  • Grafana: http://<MONITORING_IP>:3000 (admin/admin)

🐳 Docker Commands

# Build image
docker build -t vedanthgumaj/bankingwebapp:latest .

# Push to DockerHub
docker login
docker push vedanthgumaj/bankingwebapp:latest

# Run container
docker run -d -p 8082:8082 --name bankingapp vedanthgumaj/bankingwebapp:latest

# View logs
docker logs bankingapp

☸️ Kubernetes Deployment

# Apply deployment
kubectl apply -f bankingdeploy.yaml

# Check status
kubectl get pods
kubectl get services
kubectl get hpa

# Access via NodePort
# http://<NODE_IP>:31022

πŸ“ Preloaded Data

The application comes with sample accounts:

Account No Name Type Balance
1001 John Doe Savings β‚Ή50,000
1002 Jane Smith Current β‚Ή75,000
1003 Bob Wilson Savings β‚Ή25,000
1004 Alice Johnson Current β‚Ή1,00,000
1005 Charlie Brown Savings β‚Ή35,000

πŸ‘€ Author

Vedanth Gumaj


πŸ“„ License

This project is for educational purposes - DevOps Certification Project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors