Skip to content

ibrahimelothmani/Blog-Platform-CloudOps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Overview

This repository contains a full-stack service: a Java Spring Boot backend and a React frontend.
It is packaged and deployed as Docker containers to Kubernetes (AWS EKS). Infrastructure is provisioned with Terraform and configured with Ansible. CI/CD runs via Jenkins and monitoring is provided by Prometheus.

Tech stack

  • Backend: Java, Spring Boot, Maven
  • Frontend: TypeScript, React, npm
  • CI/CD: Jenkins (Jenkinsfile)
  • Containerization: Docker
  • Orchestration: Kubernetes (EKS)
  • Infrastructure: Terraform
  • Configuration: Ansible
  • Monitoring: Prometheus
  • Cloud: AWS

Architecture (high level)

Developer -> Git (CI: Jenkins) -> Build & Test -> Docker images -> Container Registry -> Kubernetes (EKS) -> AWS
Infra (provision/configure): Terraform + Ansible
Monitoring: Prometheus scrapes application /metrics endpoints

Repository layout

  • backend/ — Spring Boot service, Maven project
  • frontend/ — React app, npm/TypeScript
  • Dockerfile (or backend/Dockerfile, frontend/Dockerfile) — container build files
  • k8s/ — Kubernetes manifests (deployments, services, ingress)
  • infra/ — Terraform code for AWS resources
  • ansible/ — Ansible playbooks for configuration
  • Jenkinsfile — CI/CD pipeline
  • monitoring/ — Prometheus config, alerting rules

Prerequisites (local)

  • Java 17+ and Maven
  • Node 18+ and npm/yarn
  • Docker
  • kubectl and access to a Kubernetes cluster
  • AWS CLI (if deploying to EKS)
  • Terraform and Ansible (for infra changes)

Local development

Start backend: mvn spring-boot:run

Start frontend: cd frontend npm install npm start

By default, the frontend expects the backend API at the configured base URL. Adjust frontend env file if needed.

Build and test

Backend: cd backend mvn -DskipTests=false clean test package

Frontend: cd frontend npm install npm test npm run build

Docker & image workflow

Build images locally: docker build -t my-backend:latest -f backend/Dockerfile . docker build -t my-frontend:latest -f frontend/Dockerfile . frontend/Dockerfile frontend

Tag and push to your registry (example for ECR):

Deploy to Kubernetes

Apply manifests: kubectl apply -f k8s/

If using Terraform for cluster and infra: cd terraform terraform init terraform plan terraform apply

After infra is provisioned, update image references and apply k8s/ manifests.

CI/CD

Jenkinsfile defines the pipeline:

  • Checkout
  • Build & test backend/frontend
  • Build Docker images
  • Push images to registry
  • Deploy to Kubernetes

Adjust credentials and environment variables in your Jenkins configuration.

Infrastructure & Configuration

  • terraform/ holds Terraform modules for EKS, networking, and registry.
  • ansible/ contains playbooks used post-provisioning (node configuration, secrets distribution).

Make infrastructure changes in infra/ and use terraform plan / terraform apply. Use Ansible for runtime configuration tasks.

Monitoring

Prometheus scrapes application /actuator/prometheus or /metrics endpoints. Check monitoring/ for scrape rules and alerting configuration.

Troubleshooting

  • Backend logs: kubectl logs deploy/<backend-deployment>
  • Frontend logs: browser devtools or kubectl logs
  • Kubernetes status: kubectl get pods -A
  • Terraform state: terraform state list in terraform/

Contributing

  • Follow existing project structure.
  • Run unit tests before opening PRs.
  • Update k8s/ manifests when changing service ports or environment variables.

Files to check first

  • backend/README.md — backend dev notes
  • frontend/README.md — frontend dev notes
  • Jenkinsfile — CI/CD pipeline
  • terraform/ — Terraform configuration
  • k8s/ — deployment manifests

CHECK THE SCRIPTS FILES IN THE FOLDER scripts/ FOR AUTOMATION TASKS LIKE DEPLOYMENT, BUILDING, ETC.

cd scripts ls -la chmod +x *.sh ./deploy.sh

About

A full-stack blog platform (Spring Boot + React) with complete DevOps integration: Docker, Jenkins, Kubernetes, Terraform, Ansible, Prometheus, and Grafana.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors