Multi-Platform Extension - Summary of Changes¶
Project note: This page records an earlier implementation summary. Check the platform support matrix and current source before relying on a feature or deployment claim.
This document summarizes all the changes made to extend the DevOps AI Agent to support multiple CI/CD platforms, cloud providers, and ArgoCD.
📊 Summary Statistics¶
- New Files Created: 14
- Files Modified: 4
- Total Platforms Supported: 13 (5 CI/CD + 3 Cloud + ArgoCD + K8s + Server + Docker + GitHub)
- New Agent Tools: 10
- Lines of Code Added: ~3,500+
📁 New Files Created¶
CI/CD Collectors (4 files)¶
collectors/gitlab.py(82 lines)- GitLab CI/CD pipeline and job log collection
-
Supports self-hosted GitLab instances
-
collectors/jenkins.py(132 lines) - Jenkins build and console log collection
-
Extracts failed stages and commit info
-
collectors/bamboo.py(104 lines) - Bamboo build result and log collection
-
Parses failed jobs and stages
-
collectors/azure_devops.py(112 lines) - Azure DevOps pipeline run collection
- Fetches failed task logs and timeline
Cloud Provider Collectors (3 files)¶
collectors/aws.py(319 lines)- AWS resource diagnostics (EC2, ECS, Lambda, RDS)
- CloudWatch log integration
-
Console output capture for debugging
-
collectors/gcp.py(270 lines) - GCP resource diagnostics (GCE, Cloud Run, Cloud Functions, Cloud SQL)
- Cloud Logging integration
-
Serial port output for GCE instances
-
collectors/azure.py(293 lines) - Azure resource diagnostics (VMs, App Services, Functions, SQL)
- Activity log integration
- Monitor API for metrics
ArgoCD Integration (1 file)¶
collectors/argocd.py(209 lines)- ArgoCD application status and health
- Sync operations with dry-run support
- Rollback capabilities
- Deployment history
Tools (3 files)¶
tools/cicd_tools.py(341 lines)- Unified CI/CD tools for all platforms
- Pipeline retry functionality
- PR/MR creation for GitLab and Azure DevOps
-
Platform-agnostic interface
-
tools/cloud_tools.py(373 lines)- Unified cloud tools (AWS, GCP, Azure)
- Safe restart operations
- Service scaling with safety checks
- Read-only diagnostic operations
-
tools/argocd_tools.py(88 lines)- ArgoCD application management
- Sync with approval gates
- Safe rollback operations
- Deployment history queries
Documentation (2 files)¶
-
MULTI_PLATFORM_GUIDE.md(500+ lines)- Comprehensive guide for all platforms
- Configuration examples
- Manual trigger examples
- Troubleshooting section
- Safety features documentation
-
scripts/install_dependencies.sh(60 lines)- Interactive dependency installer
- Selective cloud provider installation
- Setup guidance
-
EXTENSION_SUMMARY.md(This file)
✏️ Files Modified¶
Core Agent Files¶
agent/core.py- Changes: Major update to support all new platforms
- Added:
- 10 new agent tool definitions
- Initialization of 10+ new collectors and tools
- Updated
_collect_context()for all platform types - Extended
_execute_tool()with routing for new tools
-
Lines Changed: ~200 additions
-
agent/classifier.py - Changes: Extended issue classification
- Added:
- Support for ArgoCD, AWS, GCP, Azure issue types
get_cicd_platform()helper function- Keyword lists for all platforms
-
Lines Changed: ~50 additions
-
agent/prompts.py - Changes: Added system prompts for new platforms
- Added:
- ArgoCD-specific prompt
- AWS, GCP, Azure cloud prompts
- Updated CI/CD prompt for multi-platform support
-
Lines Changed: ~80 additions
-
.env.example - Changes: Added configuration for all platforms
- Added:
- GitLab, Jenkins, Bamboo, Azure DevOps config
- ArgoCD server and auth
- AWS, GCP, Azure credentials
-
Lines Changed: ~40 additions
-
requirements.txt - Changes: Documented all dependencies
- Added:
- Optional cloud provider SDKs (boto3, google-cloud-, azure-mgmt-)
- Organized by category
- Installation notes
- Lines Changed: ~30 additions
🔧 New Capabilities¶
CI/CD Platforms (5)¶
| Platform | Status | Features |
|---|---|---|
| GitHub Actions | ✅ Already existed | Webhook, logs, PR creation |
| GitLab CI | ✅ NEW | Webhook ready, logs, MR creation, retry |
| Jenkins | ✅ NEW | Manual trigger, logs, retry |
| Bamboo | ✅ NEW | Manual trigger, logs, retry |
| Azure DevOps | ✅ NEW | Webhook ready, logs, retry |
Cloud Providers (3)¶
| Cloud | Resources Supported | Operations |
|---|---|---|
| AWS | EC2, ECS, Lambda, RDS, CloudWatch | Reboot, restart, scale, diagnostics |
| GCP | GCE, GKE, Cloud Run, Functions, Cloud SQL | Reset, restart, diagnostics |
| Azure | VMs, AKS, App Service, Functions, SQL | Restart, scale, diagnostics |
GitOps¶
| Tool | Features |
|---|---|
| ArgoCD | Status check, sync (dry-run + real), rollback, history |
🛡️ Safety Features¶
All new tools include:
- Read-Only by Default - Most operations are diagnostic
- Approval Gates - Respects
AUTO_APPLYsetting - Dry-Run First - Apply operations default to dry-run
- No Destructive Commands - Delete/terminate operations blocked
- Audit Trail - All actions logged
Safe Operations¶
✅ Always Allowed:
- Fetch logs and status
- Describe resources
- Get diagnostics
- Dry-run syncs/applies
⚠️ Require Approval:
- Restart services
- Scale services
- Apply changes
- Rollback deployments
🚫 Always Blocked:
- Delete resources
- Terminate instances
- Drop databases
- Force operations
🚀 Quick Start¶
1. Install Dependencies¶
# Option 1: Interactive installer
./scripts/install_dependencies.sh
# Option 2: Manual installation
pip install -r requirements.txt
# Install cloud providers (optional)
pip install boto3 # AWS
pip install google-cloud-compute google-cloud-run # GCP
pip install azure-identity azure-mgmt-compute # Azure
2. Configure Environment¶
# Copy example config
cp .env.example .env
# Edit .env and add credentials for platforms you're using
nano .env
3. Test with Manual Trigger¶
# Start the server
uvicorn api.server:app --reload --port 8000
# Test GitLab CI incident (in another terminal)
curl -X POST http://localhost:8000/webhook/manual \
-H "Content-Type: application/json" \
-d '{
"type": "cicd",
"source": "gitlab_ci",
"project_id": "12345",
"pipeline_id": 987654,
"labels": {"cicd_platform": "gitlab"}
}'
# Test AWS EC2 incident
curl -X POST http://localhost:8000/webhook/manual \
-H "Content-Type: application/json" \
-d '{
"type": "cloud_aws",
"resource_type": "ec2",
"resource_id": "i-0123456789abcdef0"
}'
# Test ArgoCD incident
curl -X POST http://localhost:8000/webhook/manual \
-H "Content-Type: application/json" \
-d '{
"type": "argocd",
"app_name": "my-app"
}'
4. Check Results¶
# View audit log
curl -H "Authorization: Bearer $API_TOKEN" http://localhost:8000/audit
# Check health
curl http://localhost:8000/health
📚 Documentation¶
MULTI_PLATFORM_GUIDE.md- Comprehensive guide for all platformsREADME.md- Main project documentation (original).env.example- Configuration template with all options
🎯 What the Agent Can Now Do¶
Scenario Examples¶
1. GitLab Pipeline Fails¶
2. AWS ECS Task Crashes¶
3. ArgoCD App OutOfSync¶
4. Azure App Service Down¶
5. Jenkins Build Fails¶
🔍 Testing Checklist¶
Before deploying to production:
- [ ] Test each CI/CD platform with a real failure
- [ ] Test each cloud provider with safe operations
- [ ] Test ArgoCD sync and rollback (in staging)
- [ ] Verify
AUTO_APPLY=falseapproval gates work - [ ] Check Slack notifications for all platforms
- [ ] Review audit logs for completeness
- [ ] Test with invalid credentials (should fail gracefully)
- [ ] Verify dry-run operations don't make changes
🔮 Future Enhancements¶
Potential additions (not implemented):
- More CI/CD Platforms: CircleCI, TeamCity, Drone CI
- More Cloud Services: Heroku, DigitalOcean, Linode
- Container Registries: ECR, GCR, ACR health checks
- Databases: Direct DB connection for query analysis
- Observability: Datadog, New Relic, Grafana integration
- Cost Optimization: Identify oversized resources
- Security Scanning: Vulnerability detection
📞 Support¶
For issues or questions:
- Check
MULTI_PLATFORM_GUIDE.mdfor configuration help - Review logs at
/auditendpoint - Test with
AUTO_APPLY=falsefirst - Verify credentials with platform-specific CLI tools
✨ Summary¶
The DevOps AI Agent now supports:
- ✅ 5 CI/CD platforms (GitHub, GitLab, Jenkins, Bamboo, Azure DevOps)
- ✅ 3 cloud providers (AWS, GCP, Azure) with 15+ resource types
- ✅ ArgoCD for GitOps deployments
- ✅ 10+ new agent tools for Claude to use
- ✅ Safe operations with approval gates and dry-run
- ✅ Comprehensive docs and examples
- ✅ Backward compatible with existing functionality
Review the current support matrix and deployment requirements before using the agent in your environment.