Skip to content
Erasy09Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

End Term Project: SRE Implementation for a Distributed Microservices System

GitHub Repo

Project Overview

This repo demonstrates a full SRE lifecycle for a distributed microservices system. It includes:

  • 6 Python microservices
  • Docker Compose, Docker Swarm, and Kubernetes orchestration
  • Terraform infrastructure provisioning
  • Ansible automation and deployment
  • Prometheus and Grafana observability
  • Incident simulation and postmortem documentation

Architecture

  • Frontend: Nginx web interface
  • Microservices: Auth, Product, Order, Payment, Notification, User Profile
  • Database: PostgreSQL
  • Cache / broker: Redis
  • Monitoring: Prometheus + Grafana
  • Infrastructure: Terraform VM provisioning
  • Configuration management: Ansible automation

Project Structure

  • services/ — source code and Dockerfiles for microservices
  • frontend/nginx/ — Nginx frontend and static UI
  • docker-compose.yml — local multi-service stack
  • docker-stack.yml — Docker Swarm deployment
  • k8s/ — Kubernetes manifests
  • infra/terraform/ — Terraform provisioning files
  • infra/ansible/ — Ansible playbooks and inventory
  • prometheus/ — Prometheus scrape configuration
  • grafana/ — Grafana dashboard definition
  • docs/ — incident report, postmortem, capacity planning

Getting Started

Docker Compose

cd "c:\Users\erasy\OneDrive\เอกสาร\end_sre"
./deploy-all.ps1

Access:

  • Frontend: http://localhost:8080
  • Prometheus: http://localhost:9090
  • Grafana: http://localhost:3000

Docker Swarm

docker swarm init
docker stack deploy -c docker-stack.yml sre-stack

Kubernetes

Before applying Kubernetes manifests, build the local service images:

cd "c:\Users\erasy\OneDrive\เอกสาร\end_sre"
.\build-images.ps1

Then deploy the Kubernetes resources:

kubectl apply -f k8s/

If using an ingress controller, deploy the ingress manifest:

kubectl apply -f k8s/ingress.yaml

To access the frontend through ingress, add a host entry in /etc/hosts:

127.0.0.1 sre-demo.local

Terraform

cd infra/terraform
terraform init
terraform apply

Ansible

cd infra/ansible
ansible-playbook -i inventory.ini site.yml

Notes

This repository is built as a demonstrative end-term SRE project. It includes infrastructure, orchestration, observability, incident handling, and automation examples.

Submission

See docs/submission_instructions.md for final deliverable guidance and PDF export notes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages