2 lines
28 KiB
Markdown
Raw Normal View History

# Provisioning Platform Configuration Examples\n\nProduction-ready reference configurations demonstrating different deployment scenarios and best practices.\n\n## Purpose\n\nExamples provide:\n- **Real-world configurations** - Complete, tested working setups ready for production use\n- **Best practices** - Recommended patterns, values, and architectural approaches\n- **Learning resource** - How to use the configuration system effectively\n- **Starting point** - Copy, customize, and deploy for your environment\n- **Documentation** - Detailed inline comments explaining every configuration option\n\n## Quick Start\n\nChoose your deployment mode and get started immediately:\n\n```\n# Solo development (local, single developer)\nnickel export --format toml orchestrator-solo.ncl > orchestrator.toml\n\n# Team collaboration (PostgreSQL, RBAC, audit logging)\nnickel export --format toml control-center-multiuser.ncl > control-center.toml\n\n# Production enterprise (HA, SurrealDB cluster, full monitoring)\nnickel export --format toml full-platform-enterprise.ncl > platform.toml\n```\n\n## Example Configurations by Mode\n\n### 1. orchestrator-solo.ncl\n\n**Deployment Mode**: Solo (Single Developer)\n\n**Resource Requirements**:\n- CPU: 2 cores\n- RAM: 4 GB\n- Disk: 50 GB (local data)\n\n**Configuration Highlights**:\n- **Workspace**: Local `dev-workspace` at `/home/developer/provisioning/data/orchestrator`\n- **Server**: Localhost binding (127.0.0.1:9090), 2 workers, 128 connections max\n- **Storage**: Filesystem backend (no external database required)\n- **Queue**: 3 max concurrent tasks (minimal for development)\n- **Batch**: 2 parallel limit with frequent checkpointing (every 50 operations)\n- **Logging**: Debug level, human-readable text format, concurrent stdout + file output\n- **Security**: Auth disabled, CORS allows all origins, no TLS\n- **Monitoring**: Health checks only (metrics disabled), resource tracking disabled\n- **Features**: Experimental features enabled for testing and iteration\n\n**Ideal For**:\n- ✅ Single developer local development\n- ✅ Quick prototyping and experimentation\n- ✅ Learning the provisioning platform\n- ✅ CI/CD local testing without external services\n\n**Key Advantages**:\n- No external dependencies (database-free)\n- Fast startup (<10 seconds)\n- Minimal resource footprint\n- Verbose debug logging for troubleshooting\n- Zero security overhead\n\n**Key Limitations**:\n- Localhost-only (not accessible remotely)\n- Single-threaded processing (3 concurrent tasks max)\n- No persistence across restarts (if using `:memory:` storage)\n- No audit logging\n\n**Usage**:\n\n```\n# Export to TOML and run\nnickel export --format toml orchestrator-solo.ncl > orchestrator.solo.toml\nORCHESTRATOR_CONFIG=orchestrator.solo.toml cargo run --bin orchestrator\n\n# With TypeDialog interactive configuration\nnu ../../scripts/configure.nu orchestrator solo --backend cli\n```\n\n**Customization Examples**:\n\n```\n# Increase concurrency for testing (still development-friendly)\nqueue.max_concurrent_tasks = 5\n\n# Reduce debug noise for cleaner logs\nlogging.level = "info"\n\n# Change workspace location\nworkspace.path = "/path/to/my/workspace"\n```\n\n---\n\n### 2. orchestrator-enterprise.ncl\n\n**Deployment Mode**: Enterprise (Production High-Availability)\n\n**Resource Requirements**:\n- CPU: 8+ cores (recommended 16)\n- RAM: 16+ GB (recommended 32+ GB)\n- Disk: 500+ GB (SurrealDB cluster)\n\n**Configuration Highlights**:\n- **Workspace**: Production `production` workspace at `/var/lib/provisioning/orchestrator` with multi-workspace support enabled\n- **Server**: All interfaces binding (0.0.0.0:9090), 16 workers, 4096 connections max\n- **Storage**: SurrealDB cluster (3 nodes) for distributed storage and high availability\n- **Queue**: 100 max concurrent tasks, 5 retry attempts, 2-hour timeout for long-running operations\n- **Batch**: 50 parallel limit with frequent checkpointing (every 1000 operations) and automatic cleanup\n- **Logging**: Info level, JSON structured format for log aggregation\n - Standard l