Some checks failed
CI/CD Pipeline / Run Tests (push) Has been skipped
CI/CD Pipeline / Security Scanning (push) Has been skipped
CI/CD Pipeline / Lint Code (push) Failing after 7m32s
CI/CD Pipeline / Build and Push Docker Images (api) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (chat) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (frontend) (push) Has been skipped
CI/CD Pipeline / Generate Documentation (push) Failing after 7m37s
CI/CD Pipeline / Build and Push Docker Images (worker) (push) Has been skipped
CI/CD Pipeline / Deploy to Staging (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
Implement complete Proxmox API integration with support for both password and API token authentication, replacing mock data with real infrastructure data. **Authentication Features:** 1. **Dual Authentication Support** - API Token authentication (recommended, more secure) - Username + Password authentication (fallback) - Automatic fallback to mock data if not configured 2. **Configuration** (`src/datacenter_docs/utils/config.py`) - PROXMOX_HOST: Server hostname/IP - PROXMOX_PORT: API port (default 8006) - PROXMOX_USER: Username with realm (e.g., root@pam) - PROXMOX_PASSWORD: Password authentication - PROXMOX_TOKEN_NAME: API token name - PROXMOX_TOKEN_VALUE: API token secret - PROXMOX_VERIFY_SSL: SSL certificate verification - PROXMOX_TIMEOUT: API request timeout 3. **Real Data Collection** (`src/datacenter_docs/collectors/proxmox_collector.py`) - VMs: Iterate all nodes, collect QEMU VMs with full details - Containers: Collect LXC containers from all nodes - Nodes: Cluster node information and status - Cluster: Cluster configuration and quorum status - Storage: Storage pools with usage statistics - Networks: Network interfaces from all nodes - Automatic fallback to mock data on errors 4. **Comprehensive Documentation** (`docs/PROXMOX_SETUP.md`) - Step-by-step API token creation guide - Permission setup (PVEAuditor role) - Security best practices - Troubleshooting guide - Example configurations 5. **Environment Template** (`.env.example`) - Detailed Proxmox configuration section - Inline documentation for both auth methods - Security recommendations **Security Features:** - Supports read-only PVEAuditor role - API tokens preferred over passwords - SSL verification configurable - Graceful degradation (uses mock data if API unavailable) - No credentials in code (environment variables only) **How to Configure:** ```bash # Method 1: API Token (Recommended) PROXMOX_HOST=proxmox.company.com PROXMOX_USER=automation@pam PROXMOX_TOKEN_NAME=docs-collector PROXMOX_TOKEN_VALUE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # Method 2: Password PROXMOX_HOST=proxmox.company.com PROXMOX_USER=root@pam PROXMOX_PASSWORD=your-secure-password ``` See `docs/PROXMOX_SETUP.md` for complete setup instructions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
123 lines
4.6 KiB
Plaintext
123 lines
4.6 KiB
Plaintext
# =============================================================================
|
|
# 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 Configuration
|
|
# =============================================================================
|
|
REDIS_PASSWORD=changeme_redis_password
|
|
REDIS_URL=redis://redis:6379/0
|
|
|
|
# =============================================================================
|
|
# MCP Server Configuration
|
|
# =============================================================================
|
|
MCP_SERVER_URL=https://mcp.company.local
|
|
MCP_API_KEY=your_mcp_api_key_here
|
|
|
|
# =============================================================================
|
|
# PROXMOX VE CONFIGURATION
|
|
# =============================================================================
|
|
# Proxmox server hostname or IP
|
|
PROXMOX_HOST=proxmox.example.com
|
|
PROXMOX_PORT=8006
|
|
|
|
# Authentication Method 1: Username + Password (less secure)
|
|
PROXMOX_USER=root@pam
|
|
PROXMOX_PASSWORD=your-password-here
|
|
|
|
# Authentication Method 2: API Token (RECOMMENDED, more secure)
|
|
# To create an API token in Proxmox:
|
|
# 1. Login to Proxmox web UI
|
|
# 2. Go to Datacenter → Permissions → API Tokens
|
|
# 3. Click "Add" and create a new token (e.g., "automation@pam!docs-collector")
|
|
# 4. Copy the token secret (shown only once!)
|
|
# 5. Set privileges: Datacenter → Permissions → add "/", "PVEAuditor" role
|
|
#
|
|
# Format: user@realm!tokenname
|
|
# PROXMOX_USER=automation@pam
|
|
# PROXMOX_TOKEN_NAME=docs-collector
|
|
# PROXMOX_TOKEN_VALUE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
|
|
# SSL Verification (set to true in production with valid certificates)
|
|
PROXMOX_VERIFY_SSL=false
|
|
|
|
# API Timeout (seconds)
|
|
PROXMOX_TIMEOUT=30
|
|
|
|
# =============================================================================
|
|
# LLM Configuration (OpenAI-compatible API)
|
|
# Choose one of the configurations below and uncomment it
|
|
# =============================================================================
|
|
|
|
# --- 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
|
|
|
|
# =============================================================================
|
|
# 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
|