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
- 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
services/— source code and Dockerfiles for microservicesfrontend/nginx/— Nginx frontend and static UIdocker-compose.yml— local multi-service stackdocker-stack.yml— Docker Swarm deploymentk8s/— Kubernetes manifestsinfra/terraform/— Terraform provisioning filesinfra/ansible/— Ansible playbooks and inventoryprometheus/— Prometheus scrape configurationgrafana/— Grafana dashboard definitiondocs/— incident report, postmortem, capacity planning
cd "c:\Users\erasy\OneDrive\เอกสาร\end_sre"
./deploy-all.ps1Access:
- Frontend:
http://localhost:8080 - Prometheus:
http://localhost:9090 - Grafana:
http://localhost:3000
docker swarm init
docker stack deploy -c docker-stack.yml sre-stackBefore applying Kubernetes manifests, build the local service images:
cd "c:\Users\erasy\OneDrive\เอกสาร\end_sre"
.\build-images.ps1Then deploy the Kubernetes resources:
kubectl apply -f k8s/If using an ingress controller, deploy the ingress manifest:
kubectl apply -f k8s/ingress.yamlTo access the frontend through ingress, add a host entry in /etc/hosts:
127.0.0.1 sre-demo.localcd infra/terraform
terraform init
terraform applycd infra/ansible
ansible-playbook -i inventory.ini site.ymlThis repository is built as a demonstrative end-term SRE project. It includes infrastructure, orchestration, observability, incident handling, and automation examples.
See docs/submission_instructions.md for final deliverable guidance and PDF export notes.