Skip to content

Repository files navigation

DevOps Blog Project

A reference full-stack blog used to demonstrate containerization, Kubernetes manifests, a Jenkins pipeline template, and a Prometheus/Grafana monitoring stack.

The author has run this stack locally. This repository contains cloud-oriented deployment building blocks, but it does not document a live cloud deployment. See Deployment evidence for the verified scope.

Architecture

flowchart LR
    U[Browser] --> F[React frontend]
    F --> B[Express API]
    B --> P[(PostgreSQL)]
    B --> M[Metrics endpoint]
    PR[Prometheus] --> M
    G[Grafana] --> PR
    R[(Redis)] -. optional cache .-> B
Loading

The same application components can be started locally with Docker Compose or represented in Kubernetes with the manifests under kubernetes/.

flowchart TD
    C[Git commit] --> J[Jenkins pipeline template]
    J --> T[Build and test]
    T --> S[Dependency and image scans]
    S --> I[Build and push images]
    I --> K[Apply Kubernetes manifests]
    K --> H[Rollout and HTTP health checks]
Loading

PlantUML source diagrams are also available in plantuml/.

Stack

  • React 18 frontend served by Nginx
  • Node.js and Express API
  • PostgreSQL 15
  • Docker Compose for a local multi-service environment
  • Kubernetes workload, service, ingress, ConfigMap, and Secret templates
  • Jenkins declarative pipeline template
  • Prometheus metrics collection and a Grafana dashboard definition
  • Optional Redis service

Quick start

Docker Compose

Requirements: Docker with Compose v2 and Git.

git clone https://github.com/Shreeniwas1/devops-blog-project.git
cd devops-blog-project
cp .env.example .env
docker compose up --build

PowerShell equivalent:

Copy-Item .env.example .env
docker compose up --build

Services:

Service URL
Frontend http://localhost:3000
Backend API http://localhost:3001
Health check http://localhost:3001/health
Prometheus http://localhost:9090
Grafana http://localhost:3003

The values in .env.example are local-development defaults. Replace all passwords and secrets before using the stack outside a local machine.

Stop and remove the containers with:

docker compose down

Run the application without containers

Start PostgreSQL first, copy the relevant values from .env.example into backend/.env, then:

cd backend
npm ci
npm start

In a second terminal:

cd frontend
npm ci
npm start

Kubernetes template

The Kubernetes files are examples that require environment-specific changes:

  1. Build and publish the frontend and backend images.
  2. Replace the local image names in kubernetes/deployments/.
  3. Replace the demonstration values in kubernetes/secrets/app-secrets.yaml.
  4. Configure the ingress hostname and, if used, the Cloudflare Tunnel placeholders.
  5. Apply the manifest groups to an existing namespace and inspect each rollout.
kubectl apply -f kubernetes/secrets/
kubectl apply -f kubernetes/configmaps/
kubectl apply -f kubernetes/deployments/
kubectl apply -f kubernetes/
kubectl apply -f kubernetes/ingress/

These manifests are not tied to AWS EKS, Google GKE, or Azure AKS. A local run provides useful portability evidence, but a cloud deployment still needs provider-specific image registry, identity, networking, storage, ingress, DNS, and TLS configuration. No provider-specific infrastructure-as-code is currently included.

Jenkins pipeline template

jenkins/Jenkinsfile describes checkout, application builds and tests, dependency audits, Trivy image scans, image publishing, Kubernetes rollout checks, and a manual production approval.

Before it can run, replace the example repository, registry, domains, and notification channel. Jenkins also needs Docker, Node.js, kubectl, Trivy, a reachable cluster, and the credentials/plugins referenced by the pipeline. No successful Jenkins run is recorded in this repository.

Monitoring

The files confirm the monitoring configuration exists. They do not demonstrate a currently running Prometheus or Grafana instance.

Deployment evidence

Claim Repository evidence Verification result
Local multi-service stack docker-compose.yml Compose definition present; author reports a successful local run, while this documentation audit could not re-run Docker
Kubernetes packaging kubernetes/ Workload and networking templates present; no live-cluster evidence committed
Jenkins automation jenkins/Jenkinsfile Pipeline template present; placeholders and external credentials remain
Prometheus and Grafana monitoring/ Scrape and dashboard configuration present; no runtime screenshot or public endpoint
Cloudflare Tunnel kubernetes/cloudflare-tunnel/ Example manifest present with placeholder tunnel, domain, and token
AWS, GCP, or Azure deployment None Not claimed: local execution does not establish a provider deployment, and provider-specific configuration is not included

For the detailed audit and commands needed to turn configuration into reproducible runtime evidence, see docs/DEPLOYMENT_EVIDENCE.md.

Project structure

.
├── backend/             Express API and metrics
├── database/            PostgreSQL initialization
├── docs/                Architecture and troubleshooting notes
├── frontend/            React application and Nginx config
├── jenkins/             Jenkins pipeline template
├── kubernetes/          Kubernetes manifests
├── monitoring/          Prometheus and Grafana configuration
├── plantuml/            Diagram sources
├── scripts/             Local setup helpers
├── .env.example         Safe local configuration template
└── docker-compose.yml   Local multi-service stack

License

MIT. See LICENSE.

About

Cloud-ready blog reference stack with Docker Compose, Kubernetes manifests, Jenkins CI/CD templates, Prometheus, and Grafana.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages