feat: Implement CLI tool, Celery workers, and VMware collector
Some checks failed
CI/CD Pipeline / Generate Documentation (push) Successful in 4m57s
CI/CD Pipeline / Lint Code (push) Successful in 5m33s
CI/CD Pipeline / Run Tests (push) Successful in 4m20s
CI/CD Pipeline / Security Scanning (push) Successful in 4m32s
CI/CD Pipeline / Build and Push Docker Images (chat) (push) Failing after 49s
CI/CD Pipeline / Build and Push Docker Images (frontend) (push) Failing after 48s
CI/CD Pipeline / Build and Push Docker Images (worker) (push) Failing after 46s
CI/CD Pipeline / Build and Push Docker Images (api) (push) Failing after 40s
CI/CD Pipeline / Deploy to Staging (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped

Complete implementation of core MVP components:

CLI Tool (src/datacenter_docs/cli.py):
- 11 commands for system management (serve, worker, init-db, generate, etc.)
- Auto-remediation policy management (enable/disable/status)
- System statistics and monitoring
- Rich formatted output with tables and panels

Celery Workers (src/datacenter_docs/workers/):
- celery_app.py with 4 specialized queues (documentation, auto_remediation, data_collection, maintenance)
- tasks.py with 8 async tasks integrated with MongoDB/Beanie
- Celery Beat scheduling (6h docs, 1h data collection, 15m metrics, 2am cleanup)
- Rate limiting (10 auto-remediation/h) and timeout configuration
- Task lifecycle signals and comprehensive logging

VMware Collector (src/datacenter_docs/collectors/):
- BaseCollector abstract class with full workflow (connect/collect/validate/store/disconnect)
- VMwareCollector for vSphere infrastructure data collection
- Collects VMs, ESXi hosts, clusters, datastores, networks with statistics
- MCP client integration with mock data fallback for development
- MongoDB storage via AuditLog and data validation

Documentation & Configuration:
- Updated README.md with CLI commands and Workers sections
- Updated TODO.md with project status (55% completion)
- Added CLAUDE.md with comprehensive project instructions
- Added Docker compose setup for development environment

Project Status:
- Completion: 50% -> 55%
- MVP Milestone: 80% complete (only Infrastructure Generator remaining)
- Estimated time to MVP: 1-2 days

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-19 22:29:59 +02:00
parent 541222ad68
commit 52655e9eee
34 changed files with 5246 additions and 456 deletions

View File

@@ -1,22 +1,92 @@
# MongoDB
# =============================================================================
# Datacenter Documentation System - Configuration Template
# Copy this file to .env and fill in your actual values
# =============================================================================
# =============================================================================
# MongoDB Configuration
# =============================================================================
MONGO_ROOT_USER=admin
MONGO_ROOT_PASSWORD=changeme_secure_mongo_password
MONGODB_URL=mongodb://admin:changeme_secure_mongo_password@mongodb:27017
MONGODB_DATABASE=datacenter_docs
# Redis
# =============================================================================
# Redis Configuration
# =============================================================================
REDIS_PASSWORD=changeme_redis_password
REDIS_URL=redis://redis:6379/0
# MCP Server
# =============================================================================
# MCP Server Configuration
# =============================================================================
MCP_SERVER_URL=https://mcp.company.local
MCP_API_KEY=your_mcp_api_key_here
# Anthropic API
ANTHROPIC_API_KEY=your_anthropic_api_key_here
# =============================================================================
# LLM Configuration (OpenAI-compatible API)
# Choose one of the configurations below and uncomment it
# =============================================================================
# CORS
# --- OpenAI (Default) ---
LLM_BASE_URL=https://api.openai.com/v1
LLM_API_KEY=sk-your-openai-api-key-here
LLM_MODEL=gpt-4-turbo-preview
# Alternative models: gpt-4, gpt-3.5-turbo
# --- Anthropic Claude (OpenAI-compatible) ---
# LLM_BASE_URL=https://api.anthropic.com/v1
# LLM_API_KEY=sk-ant-your-anthropic-key-here
# LLM_MODEL=claude-sonnet-4-20250514
# Alternative models: claude-3-opus-20240229, claude-3-sonnet-20240229
# --- LLMStudio (Local) ---
# LLM_BASE_URL=http://localhost:1234/v1
# LLM_API_KEY=not-needed
# LLM_MODEL=your-local-model-name
# --- Open-WebUI (Local) ---
# LLM_BASE_URL=http://localhost:8080/v1
# LLM_API_KEY=your-open-webui-key
# LLM_MODEL=llama3
# Alternative models: mistral, mixtral, codellama
# --- Ollama (Local) ---
# LLM_BASE_URL=http://localhost:11434/v1
# LLM_API_KEY=ollama
# LLM_MODEL=llama3
# Alternative models: mistral, mixtral, codellama, phi3
# LLM Generation Settings
LLM_TEMPERATURE=0.3
LLM_MAX_TOKENS=4096
# =============================================================================
# API Configuration
# =============================================================================
API_HOST=0.0.0.0
API_PORT=8000
WORKERS=4
# =============================================================================
# CORS Configuration
# =============================================================================
CORS_ORIGINS=http://localhost:3000,https://docs.company.local
# Optional
# =============================================================================
# Application Settings
# =============================================================================
LOG_LEVEL=INFO
DEBUG=false
# =============================================================================
# Celery Configuration
# =============================================================================
CELERY_BROKER_URL=redis://redis:6379/0
CELERY_RESULT_BACKEND=redis://redis:6379/0
# =============================================================================
# Vector Store Configuration
# =============================================================================
VECTOR_STORE_PATH=./data/chroma_db
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2