{"id":39390596,"url":"https://github.com/sylvester-francis/ota-deploy-tracker","last_synced_at":"2026-01-18T03:11:02.732Z","repository":{"id":299429342,"uuid":"989786438","full_name":"sylvester-francis/ota-deploy-tracker","owner":"sylvester-francis","description":"Progressive K8s deployment manager with FastAPI, Streamlit UI, and Prometheus monitoring.","archived":false,"fork":false,"pushed_at":"2025-07-05T00:41:10.000Z","size":176,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-05T01:34:37.806Z","etag":null,"topics":["ci-cd","container-orchestration","deployment","fastapi","kubernetes","microservices","ota-updates","prometheus","python3","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sylvester-francis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-24T20:29:22.000Z","updated_at":"2025-07-05T00:40:05.000Z","dependencies_parsed_at":"2025-06-16T14:52:07.874Z","dependency_job_id":"9f4eb2fe-8195-4160-839f-0a518fff3ecd","html_url":"https://github.com/sylvester-francis/ota-deploy-tracker","commit_stats":null,"previous_names":["sylvester-francis/ota-deploy-tracker"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sylvester-francis/ota-deploy-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvester-francis%2Fota-deploy-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvester-francis%2Fota-deploy-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvester-francis%2Fota-deploy-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvester-francis%2Fota-deploy-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sylvester-francis","download_url":"https://codeload.github.com/sylvester-francis/ota-deploy-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylvester-francis%2Fota-deploy-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","container-orchestration","deployment","fastapi","kubernetes","microservices","ota-updates","prometheus","python3","streamlit"],"created_at":"2026-01-18T03:11:01.918Z","updated_at":"2026-01-18T03:11:02.727Z","avatar_url":"https://github.com/sylvester-francis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes Deployment Manager\n\n\u003e **Professional-grade progressive deployment management for Kubernetes environments**\n\nA comprehensive, enterprise-ready platform for managing safe, controlled software deployments across Kubernetes clusters with real-time monitoring, multiple rollout strategies, and instant rollback capabilities.\n\n![Version](https://img.shields.io/badge/version-2.0.0-blue.svg)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n![Kubernetes](https://img.shields.io/badge/kubernetes-1.20+-brightgreen.svg)\n![Python](https://img.shields.io/badge/python-3.9+-blue.svg)\n![Prometheus](https://img.shields.io/badge/prometheus-monitoring-orange.svg)\n![Grafana](https://img.shields.io/badge/grafana-dashboards-yellow.svg)\n![FastAPI](https://img.shields.io/badge/fastapi-0.104+-green.svg)\n\n## 🏗️ Architecture Overview\n\n```mermaid\ngraph TB\n    subgraph \"External Clients\"\n        CLI[CLI Tool\u003cbr/\u003ecli/client.py]\n        WebUI[Web Dashboard\u003cbr/\u003edashboard/ota_dashboard.py]\n        API_Client[External API Client\u003cbr/\u003eCI/CD Systems]\n    end\n    \n    subgraph \"Core Platform\"\n        API[FastAPI Backend\u003cbr/\u003ebackend/main.py\u003cbr/\u003ePort: 8000]\n        JobRunner[Job Runner\u003cbr/\u003ecli/job_runner.py\u003cbr/\u003eBackground Processing]\n        DB[(SQLite Database\u003cbr/\u003edeployment.db)]\n    end\n    \n    subgraph \"Kubernetes Cluster\"\n        K8S_API[Kubernetes API Server]\n        Pods[Application Pods\u003cbr/\u003ek8s/application.yaml]\n        Services[Services \u0026 Deployments\u003cbr/\u003ek8s/deployment.yaml]\n    end\n    \n    subgraph \"Monitoring \u0026 Metrics\"\n        Prometheus[Prometheus Server\u003cbr/\u003ePort: 9090]\n        Grafana[Grafana Dashboard\u003cbr/\u003ePort: 3000]\n        Metrics[Metrics Endpoint\u003cbr/\u003e/metrics]\n        Logs[Application Logs\u003cbr/\u003eStructured Logging]\n    end\n    \n    %% Client connections\n    CLI --\u003e|HTTP Requests| API\n    WebUI --\u003e|Streamlit Server| API\n    API_Client --\u003e|REST API| API\n    \n    %% Core platform flow\n    API --\u003e|Job Queue| DB\n    DB --\u003e|Pending Jobs| JobRunner\n    JobRunner --\u003e|kubectl Operations| K8S_API\n    \n    %% Kubernetes operations\n    K8S_API --\u003e|Manage| Pods\n    K8S_API --\u003e|Deploy| Services\n    \n    %% Monitoring flow\n    API --\u003e|Expose| Metrics\n    Metrics --\u003e|Scrape| Prometheus\n    Prometheus --\u003e|Data Source| Grafana\n    JobRunner --\u003e|Generate| Logs\n    K8S_API --\u003e|Status Updates| JobRunner\n    \n    %% Deployment strategies\n    JobRunner -.-\u003e|Canary\u003cbr/\u003e1 Pod| Pods\n    JobRunner -.-\u003e|Blue\u003cbr/\u003eSubset| Pods\n    JobRunner -.-\u003e|Green\u003cbr/\u003eAll Pods| Pods\n    \n    %% Rollback flow\n    JobRunner -.-\u003e|Rollback\u003cbr/\u003ePrevious Version| Pods\n    \n    style CLI fill:#e1f5fe\n    style WebUI fill:#e8f5e8\n    style API fill:#fff3e0\n    style JobRunner fill:#fce4ec\n    style K8S_API fill:#f3e5f5\n    style Prometheus fill:#e0f2f1\n```\n\n---\n\n## 🎯 Why Choose Kubernetes Deployment Manager?\n\n**For DevOps Teams:**\n- Reduce deployment risks with progressive rollout strategies\n- Gain instant visibility into deployment status across all environments\n- Automate complex deployment workflows with simple CLI commands\n- Integrate seamlessly with existing CI/CD pipelines\n\n**For Platform Engineers:**\n- Enterprise-grade observability with Prometheus metrics\n- Kubernetes-native integration with no external dependencies\n- Scalable architecture supporting clusters of any size\n- Production-tested rollback mechanisms for instant recovery\n\n**For Development Teams:**\n- Simple, intuitive interface for deployment management\n- Real-time dashboard for monitoring application health\n- Consistent deployment processes across all environments\n- Reduced time-to-production with automated workflows\n\n---\n\n## ✨ Key Features\n\n### 🚀 Progressive Deployment Strategies\n- **Canary**: Test with minimal risk (1 pod)\n- **Blue**: Controlled subset rollout (configurable)\n- **Green**: Full cluster deployment\n- **Custom**: Define your own deployment patterns\n\n### 🔄 Instant Rollback\n- One-command rollback to any previous version\n- Granular rollback control (canary, blue, green scopes)\n- Automated failure detection and recovery\n- Zero-downtime rollback operations\n\n### 📊 Enterprise Observability\n- Prometheus-compatible metrics out of the box\n- Real-time deployment status tracking\n- Comprehensive logging and audit trails\n- Grafana dashboard templates included\n\n### 🎛️ Multiple Interfaces\n- **CLI**: Perfect for CI/CD integration and automation\n- **Web Dashboard**: Visual monitoring and management\n- **REST API**: Programmatic access for custom integrations\n- **Kubernetes Native**: Direct kubectl compatibility\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n- **Kubernetes cluster** (v1.20+)\n- **Python 3.8+**\n- **kubectl** configured and connected\n- **Docker** (for containerized deployment)\n\n### 1. Installation\n\n#### Option A: Quick Setup (Recommended)\n```bash\n# Clone the repository\ngit clone https://github.com/sylvester-francis/ota-deploy-tracker.git\ncd ota-deploy-tracker\n\n# Install dependencies\npip install -r requirements.txt\n\n# Deploy sample applications with logging\nkubectl apply -f k8s/application.yaml\n\n# Start the system\ndocker-compose up -d\n```\n\n#### Option B: Local Development\n```bash\n# Clone and setup virtual environment\ngit clone https://github.com/sylvester-francis/ota-deploy-tracker.git\ncd ota-deploy-tracker\npython -m venv venv\nsource venv/bin/activate  # Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Start components separately\nuvicorn backend.main:app --reload \u0026\nstreamlit run dashboard/ota_dashboard.py \u0026\npython -m cli.job_runner \u0026\n```\n\n### 2. Access Your Dashboard\n\n- **Web Dashboard**: http://localhost:8501\n- **API Documentation**: http://localhost:8000/docs\n- **Metrics Endpoint**: http://localhost:8000/metrics\n\n### 3. Start Monitoring (Optional)\n\n```bash\n# Launch Prometheus + Grafana monitoring stack\n./start-monitoring.sh\n\n# Access monitoring:\n# - Prometheus: http://localhost:9090\n# - Grafana: http://localhost:3000 (admin/admin)\n```\n\n### 4. Your First Deployment\n\n```bash\n# Deploy version 2.0.0 using canary strategy\npython -m cli.client deploy 2.0.0 --wave canary\n\n# Monitor deployment status\npython -m cli.client list\n\n# Scale to blue wave (partial rollout)\npython -m cli.client deploy 2.0.0 --wave blue\n\n# Full deployment\npython -m cli.client deploy 2.0.0 --wave green\n\n# Rollback if needed\npython -m cli.client rollback 1.0.0 --wave green\n```\n\n---\n\n## 💻 Usage Examples\n\n### CLI Operations\n\n```bash\n# Deployment Management\npython -m cli.client deploy 3.1.4 --wave canary    # Canary deployment\npython -m cli.client deploy 3.1.4 --wave blue      # Partial rollout\npython -m cli.client deploy 3.1.4 --wave green     # Full deployment\n\n# Monitoring\npython -m cli.client list                           # List all jobs\n\n# Rollback Operations\npython -m cli.client rollback 3.1.3 --wave canary  # Canary rollback\npython -m cli.client rollback 3.1.3 --wave green   # Full rollback\n\n# Direct Pod Updates (Advanced)\npython -m cli.client update 3.1.4 --wave blue      # Direct update\n```\n\n### Docker Operations\n\n```bash\n# Production deployment\ndocker-compose up -d\n\n# View logs\ndocker-compose logs -f api\ndocker-compose logs -f dashboard\ndocker-compose logs -f job-runner\n\n# Execute CLI commands\ndocker-compose exec api python -m cli.client deploy 1.5.0 --wave canary\ndocker-compose exec api python -m cli.client list\ndocker-compose exec api python -m cli.client rollback 1.4.0\n\n# Scale services\ndocker-compose up -d --scale job-runner=3\n```\n\n---\n\n## 🧪 Development \u0026 Testing\n\n### Running Tests\n\n```bash\n# Install test dependencies\npip install pytest pytest-cov\n\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=backend --cov=cli --cov=dashboard --cov-report=html\n\n# Run specific test categories\npytest tests/test_api.py          # API tests\npytest tests/test_cli.py          # CLI tests\npytest tests/test_job_runner.py   # Job runner tests\n```\n\n### Code Quality\n\n```bash\n# Linting and formatting\nruff check --fix backend/ cli/ dashboard/ tests/\nruff format backend/ cli/ dashboard/ tests/\n```\n\n---\n\n## 🧪 Sample Applications\n\nThe platform includes sample applications (`app-1` and `app-2`) that demonstrate deployment management capabilities:\n\n### Application Features\n- **Realistic Logging**: Continuous application logs with startup sequences and health checks\n- **Simulated Metrics**: Random memory usage and connection statistics\n- **Version Tracking**: Applications tagged with `sw_version` labels for deployment tracking\n- **Health Monitoring**: Periodic health check logs every 30 seconds\n\n### Sample Log Output\n```bash\nMon Jun 16 06:23:20 UTC 2025 [INFO] Application app-1 starting up...\nMon Jun 16 06:23:20 UTC 2025 [INFO] Loading configuration for version 1.0.0\nMon Jun 16 06:23:20 UTC 2025 [INFO] Database connection established\nMon Jun 16 06:23:20 UTC 2025 [INFO] Server listening on port 8080\nMon Jun 16 06:23:20 UTC 2025 [INFO] Application ready to serve requests\nMon Jun 16 06:23:20 UTC 2025 [INFO] Health check passed - app-1 running normally\nMon Jun 16 06:23:20 UTC 2025 [DEBUG] Memory usage: 73MB\nMon Jun 16 06:23:20 UTC 2025 [DEBUG] Active connections: 5\n```\n\n### Dashboard Features\n- **Real-time Pod Status**: View current application versions and status\n- **Log Streaming**: Access live application logs through the web interface\n- **Auto-refresh**: Optional 30-second auto-refresh for real-time monitoring\n- **Manual Refresh**: Instant updates with the refresh button\n\n---\n\n## 📊 Monitoring \u0026 Observability\n\n### Quick Start Monitoring Stack\n\nLaunch the complete monitoring solution with one command:\n\n```bash\n# Start Prometheus + Grafana\n./start-monitoring.sh\n\n# Access URLs:\n# - Prometheus UI: http://localhost:9090\n# - Grafana Dashboard: http://localhost:3000 (admin/admin)\n# - Raw Metrics: http://localhost:8000/metrics\n```\n\n### Prometheus Metrics\n\nThe platform exports comprehensive metrics for monitoring:\n\n```bash\n# Deployment Metrics\nota_updated_pods_total                    # Total pods updated\nota_last_run_timestamp_seconds           # Last deployment timestamp\nota_jobs_pending                         # Pending deployment jobs\nota_jobs_successful                      # Successful deployments\nota_jobs_total                          # Total deployment jobs\n\n# Rollback Metrics\nota_rollback_pods_total                  # Total pods rolled back\nota_last_rollback_timestamp_seconds     # Last rollback timestamp\n```\n\n### Grafana Dashboard\n\nPre-configured dashboard includes:\n\n- **📈 Real-time Metrics**: Live deployment statistics and trends\n- **📊 Visual Charts**: Deployment timeline and rollback activity\n- **🎯 Key Performance Indicators**: Success rates and system health\n- **⏰ Historical Data**: Track deployment patterns over time\n\n### Manual Monitoring Setup\n\n```bash\n# Start monitoring stack manually\ncd monitoring\ndocker-compose -f docker-compose.monitoring.yml up -d\n\n# Stop monitoring stack\ndocker-compose -f docker-compose.monitoring.yml down\n\n# View raw metrics\ncurl http://localhost:8000/metrics\n```\n\n### Custom Queries\n\nExample Prometheus queries for advanced monitoring:\n\n```promql\n# Deployment success rate\n(ota_jobs_successful / ota_jobs_total) * 100\n\n# Average deployment frequency (per hour)\nrate(ota_jobs_total[1h]) * 3600\n\n# Time since last deployment\ntime() - ota_last_run_timestamp_seconds\n\n# Rollback frequency\nrate(ota_rollback_pods_total[24h])\n```\n\n---\n\n## 📄 API Reference\n\n### Deployment Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `POST` | `/ota/deploy` | Create new deployment |\n| `GET` | `/ota/jobs` | List all jobs |\n| `POST` | `/ota/update_status` | Update job status |\n| `POST` | `/ota/rollback` | Trigger rollback |\n| `GET` | `/metrics` | Prometheus metrics |\n\n### CLI Commands\n\n```bash\n# Deployment commands\ncli.client deploy \u003cversion\u003e [--wave \u003cwave\u003e]\ncli.client update \u003cversion\u003e [--wave \u003cwave\u003e]\ncli.client rollback \u003cversion\u003e [--wave \u003cwave\u003e]\ncli.client list\n\n# Management commands\ncli.job_runner                    # Start job runner\n```\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Development Workflow\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Make your changes and add tests\n4. Run the test suite: `pytest`\n5. Commit your changes: `git commit -m 'Add amazing feature'`\n6. Push to the branch: `git push origin feature/amazing-feature`\n7. Open a Pull Request\n\n---\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🙏 Acknowledgments\n\n- Kubernetes community for the robust container orchestration platform\n- FastAPI team for the excellent Python web framework\n- Streamlit team for the intuitive dashboard framework\n- Contributors and users who make this project better\n\n---\n\n## 🤝 Connect \u0026 Follow\n\nReady to collaborate or learn more about cutting-edge tech solutions?\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge\u0026logo=linkedin)](https://www.linkedin.com/in/sylvesterranjith/)\n[![Medium](https://img.shields.io/badge/Medium-Follow-black?style=for-the-badge\u0026logo=medium)](https://medium.com/@sylvesterranjithfrancis)\n[![Instagram](https://img.shields.io/badge/Instagram-@techwithsyl-purple?style=for-the-badge\u0026logo=instagram)](https://instagram.com/techwithsyl)\n\n**Let's build the future of deployment management together!**\n\n---\n\n**Ready to transform your deployment process?** [Get started now](#-quick-start) and experience professional-grade Kubernetes deployment management!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylvester-francis%2Fota-deploy-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsylvester-francis%2Fota-deploy-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylvester-francis%2Fota-deploy-tracker/lists"}