A production-grade DevOps project demonstrating automated infrastructure, CI/CD pipelines, monitoring, and self-healing systems for hospital applications.
- Problem Statement
- Solution Overview
- Screenshots
- Tech Stack
- Features
- Project Structure
- Quick Start
- Deployment
- Monitoring
- Testing
- Author
- License
Hospitals rely on critical systems like patient management, lab processing, and appointment scheduling. However:
- β±οΈ Average downtime: 45+ minutes
- π¨ Manual failure detection
- π₯ Delays in patient care
- π No automated recovery
MediWatch provides:
- β Real-time failure detection
- β Auto rollback when error rate > 5%
- β Recovery time reduced to < 2 minutes
- β Zero-downtime deployments
| Category | Technologies |
|---|---|
| Backend | Python 3.11, Flask |
| Database | PostgreSQL 15 |
| Containerization | Docker, Docker Compose |
| Orchestration | Kubernetes (K3s) |
| CI/CD | Jenkins |
| IaC | Ansible |
| Monitoring | Prometheus, Grafana |
| Cloud | AWS (EC2, ECR, S3) |
| Version Control | Git, GitHub |
| Testing | pytest |
- Linting with
flake8 - Testing with
pytest - Docker image build & push to AWS ECR
- Kubernetes rolling deployment
- GitHub webhook integration
- Patient Service
- Lab Service
- Appointment Service
Each includes:
/health/metrics
- Prometheus (15s scrape interval)
- Grafana dashboards:
- Uptime
- Requests/sec
- P95 latency
- Pod restarts
- Real-time alerting
- Auto-remediation script
- Rollback triggers:
- Error rate > 5%
- Health check failure
- High pod restarts
- Kubernetes HPA enabled
- CPU-based auto-scaling (70%)
- 1β4 replicas per service
- Zero-downtime rolling updates
mediwatch/
βββ services/
β βββ patient-service/
β β βββ app.py
β β βββ requirements.txt
β β βββ Dockerfile
β β βββ tests/
β β βββ test_patient.py
β βββ lab-service/
β β βββ app.py
β β βββ requirements.txt
β β βββ Dockerfile
β β βββ tests/
β β βββ test_lab.py
β βββ appointment-service/
β βββ app.py
β βββ requirements.txt
β βββ Dockerfile
β βββ tests/
β βββ test_appointment.py
βββ jenkins/
β βββ Jenkinsfile
βββ ansible/
β βββ provision.yml
β βββ inventory.ini
βββ kubernetes/
β βββ patient-deployment.yaml
β βββ lab-deployment.yaml
β βββ appointment-deployment.yaml
β βββ postgres-deployment.yaml
β βββ configmap.yaml
β βββ monitoring/
β βββ prometheus-config.yaml
β βββ prometheus-deployment.yaml
β βββ grafana-deployment.yaml
β βββ alertmanager-config.yaml
βββ remediation/
β βββ auto-remediation.py
β βββ requirements.txt
βββ monitoring/
β βββ docker-compose.yml
β βββ prometheus.yml
βββ scripts/
β βββ setup.sh
β βββ health-check.sh
β βββ rollback.sh
β βββ cleanup.sh
β βββ init-db.sql
βββ docker-compose.yml
βββ README.md
This structure follows a microservices-based architecture with clear separation of services, infrastructure, CI/CD, and monitoring.
git clone https://github.com/tanikush/MediWatch
cd MediWatch
docker-compose up -d
cat scripts/init-db.sql | docker exec -i mediwatch-postgres-1 psql -U postgres
docker ps
π Health Check
curl http://localhost:5001/health
curl http://localhost:5002/health
curl http://localhost:5003/health
π Deployment (AWS + Kubernetes)
ansible-playbook ansible/provision.yml -i ansible/inventory.ini
ssh -i ~/.ssh/mediwatch-key.pem ubuntu@YOUR_EC2_IP
git clone https://github.com/tanikush/MediWatch.git
cd MediWatch
docker-compose build
kubectl apply -f kubernetes/
kubectl apply -f kubernetes/monitoring/
π Monitoring
Prometheus
http://localhost:9090
http://localhost:30090
Grafana
http://localhost:3000
http://localhost:30300
Login: admin / admin
π§ͺ Testing
pytest services/*/tests/ -v
docker exec -it mediwatch-patient-service-1 pytest tests/ -v
π©βπ» Author
Tanisha Kushwah
DevOps Engineer | Cloud Enthusiast
GitHub: https://github.com/tanikush
LinkedIn: https://www.linkedin.com/in/tanisha-kushwah-280944284/
π License
This project is licensed under the MIT License.
---
## β
Project Complete - April 2026
- 3 Hospital Microservices β
- Docker & Docker Compose β
- Jenkins CI/CD Pipeline β
- Prometheus + Grafana Monitoring β
- GitHub Integration β
Built by Tanisha Kushwah
---


