Skip to content

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)

  1. collectors/gitlab.py (82 lines)
  2. GitLab CI/CD pipeline and job log collection
  3. Supports self-hosted GitLab instances

  4. collectors/jenkins.py (132 lines)

  5. Jenkins build and console log collection
  6. Extracts failed stages and commit info

  7. collectors/bamboo.py (104 lines)

  8. Bamboo build result and log collection
  9. Parses failed jobs and stages

  10. collectors/azure_devops.py (112 lines)

  11. Azure DevOps pipeline run collection
  12. Fetches failed task logs and timeline

Cloud Provider Collectors (3 files)

  1. collectors/aws.py (319 lines)
  2. AWS resource diagnostics (EC2, ECS, Lambda, RDS)
  3. CloudWatch log integration
  4. Console output capture for debugging

  5. collectors/gcp.py (270 lines)

  6. GCP resource diagnostics (GCE, Cloud Run, Cloud Functions, Cloud SQL)
  7. Cloud Logging integration
  8. Serial port output for GCE instances

  9. collectors/azure.py (293 lines)

  10. Azure resource diagnostics (VMs, App Services, Functions, SQL)
  11. Activity log integration
  12. Monitor API for metrics

ArgoCD Integration (1 file)

  1. collectors/argocd.py (209 lines)
  2. ArgoCD application status and health
  3. Sync operations with dry-run support
  4. Rollback capabilities
  5. Deployment history

Tools (3 files)

  1. tools/cicd_tools.py (341 lines)
  2. Unified CI/CD tools for all platforms
  3. Pipeline retry functionality
  4. PR/MR creation for GitLab and Azure DevOps
  5. Platform-agnostic interface

  6. tools/cloud_tools.py (373 lines)

    • Unified cloud tools (AWS, GCP, Azure)
    • Safe restart operations
    • Service scaling with safety checks
    • Read-only diagnostic operations
  7. tools/argocd_tools.py (88 lines)

    • ArgoCD application management
    • Sync with approval gates
    • Safe rollback operations
    • Deployment history queries

Documentation (2 files)

  1. MULTI_PLATFORM_GUIDE.md (500+ lines)

    • Comprehensive guide for all platforms
    • Configuration examples
    • Manual trigger examples
    • Troubleshooting section
    • Safety features documentation
  2. scripts/install_dependencies.sh (60 lines)

    • Interactive dependency installer
    • Selective cloud provider installation
    • Setup guidance
  3. EXTENSION_SUMMARY.md (This file)


✏️ Files Modified

Core Agent Files

  1. agent/core.py
  2. Changes: Major update to support all new platforms
  3. 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
  4. Lines Changed: ~200 additions

  5. agent/classifier.py

  6. Changes: Extended issue classification
  7. Added:
    • Support for ArgoCD, AWS, GCP, Azure issue types
    • get_cicd_platform() helper function
    • Keyword lists for all platforms
  8. Lines Changed: ~50 additions

  9. agent/prompts.py

  10. Changes: Added system prompts for new platforms
  11. Added:
    • ArgoCD-specific prompt
    • AWS, GCP, Azure cloud prompts
    • Updated CI/CD prompt for multi-platform support
  12. Lines Changed: ~80 additions

  13. .env.example

  14. Changes: Added configuration for all platforms
  15. Added:
    • GitLab, Jenkins, Bamboo, Azure DevOps config
    • ArgoCD server and auth
    • AWS, GCP, Azure credentials
  16. Lines Changed: ~40 additions

  17. requirements.txt

  18. Changes: Documented all dependencies
  19. Added:
    • Optional cloud provider SDKs (boto3, google-cloud-, azure-mgmt-)
    • Organized by category
    • Installation notes
  20. 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:

  1. Read-Only by Default - Most operations are diagnostic
  2. Approval Gates - Respects AUTO_APPLY setting
  3. Dry-Run First - Apply operations default to dry-run
  4. No Destructive Commands - Delete/terminate operations blocked
  5. 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 platforms
  • README.md - Main project documentation (original)
  • .env.example - Configuration template with all options

🎯 What the Agent Can Now Do

Scenario Examples

1. GitLab Pipeline Fails

Alert → Fetch logs → Analyze → Create MR with fix → Notify team

2. AWS ECS Task Crashes

CloudWatch alert → Fetch task logs → Diagnose OOM → Scale service → Verify

3. ArgoCD App OutOfSync

Prometheus alert → Get app status → Dry-run sync → Apply sync → Monitor health

4. Azure App Service Down

Monitor alert → Check status → Restart service → Verify recovery → Escalate if needed

5. Jenkins Build Fails

Manual trigger → Fetch console logs → Identify error → Retry build → Notify result

🔍 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=false approval 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):

  1. More CI/CD Platforms: CircleCI, TeamCity, Drone CI
  2. More Cloud Services: Heroku, DigitalOcean, Linode
  3. Container Registries: ECR, GCR, ACR health checks
  4. Databases: Direct DB connection for query analysis
  5. Observability: Datadog, New Relic, Grafana integration
  6. Cost Optimization: Identify oversized resources
  7. Security Scanning: Vulnerability detection

📞 Support

For issues or questions:

  1. Check MULTI_PLATFORM_GUIDE.md for configuration help
  2. Review logs at /audit endpoint
  3. Test with AUTO_APPLY=false first
  4. 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.