# Provisioning Platform Installer (v3.5.0)\n\n## 🚀 Flexible Installation and Configuration System\n\nA comprehensive installer system supporting interactive, headless, and unattended deployment modes with automatic configuration management via TOML\nand MCP integration.\n\n## Installation Modes\n\n### 1. **Interactive TUI Mode**\n\nBeautiful terminal user interface with step-by-step guidance.\n\n```\nprovisioning-installer\n```\n\n**Features**:\n\n- 7 interactive screens with progress tracking\n- Real-time validation and error feedback\n- Visual feedback for each configuration step\n- Beautiful formatting with color and styling\n- Nushell fallback for unsupported terminals\n\n**Screens**:\n\n1. Welcome and prerequisites check\n2. Deployment mode selection\n3. Infrastructure provider selection\n4. Configuration details\n5. Resource allocation (CPU, memory)\n6. Security settings\n7. Review and confirm\n\n### 2. **Headless Mode**\n\nCLI-only installation without interactive prompts, suitable for scripting.\n\n```\nprovisioning-installer --headless --mode solo --yes\n```\n\n**Features**:\n\n- Fully automated CLI options\n- All settings via command-line flags\n- No user interaction required\n- Perfect for CI/CD pipelines\n- Verbose output with progress tracking\n\n**Common Usage**:\n\n```\n# Solo deployment\nprovisioning-installer --headless --mode solo --provider upcloud --yes\n\n# Multi-user deployment\nprovisioning-installer --headless --mode multiuser --cpu 4 --memory 8192 --yes\n\n# CI/CD mode\nprovisioning-installer --headless --mode cicd --config ci-config.toml --yes\n```\n\n### 3. **Unattended Mode**\n\nZero-interaction mode using pre-defined configuration files, ideal for infrastructure automation.\n\n```\nprovisioning-installer --unattended --config config.toml\n```\n\n**Features**:\n\n- Load all settings from TOML file\n- Complete automation for GitOps workflows\n- No user interaction or prompts\n- Suitable for production deployments\n- Comprehensive logging and audit trails\n\n## Deployment Modes\n\nEach mode configures resource allocation and features appropriately:\n\n| Mode | CPUs | Memory | Use Case |\n| ------ | ------ | -------- | ---------- |\n| **Solo** | 2 | 4 GB | Single user development |\n| **MultiUser** | 4 | 8 GB | Team development, testing |\n| **CICD** | 8 | 16 GB | CI/CD pipelines, testing |\n| **Enterprise** | 16 | 32 GB | Production deployment |\n\n## Configuration System\n\n### TOML Configuration\n\nDefine installation parameters in TOML format for unattended mode:\n\n```\n[installation]\nmode = "solo"  # solo, multiuser, cicd, enterprise\nprovider = "upcloud"  # upcloud, aws, etc.\n\n[resources]\ncpu = 2000  # millicores\nmemory = 4096  # MB\ndisk = 50  # GB\n\n[security]\nenable_mfa = true\nenable_audit = true\ntls_enabled = true\n\n[mcp]\nenabled = true\nendpoint = "http://localhost:9090"\n```\n\n### Configuration Loading Priority\n\nSettings are loaded in this order (highest priority wins):\n\n1. **CLI Arguments** - Direct command-line flags\n2. **Environment Variables** - `PROVISIONING_*` variables\n3. **Configuration File** - TOML file specified via `--config`\n4. **MCP Integration** - AI-powered intelligent defaults\n5. **Built-in Defaults** - System defaults\n\n### MCP Integration\n\nModel Context Protocol integration provides intelligent configuration:\n\n**7 AI-Powered Settings Tools**:\n\n- Resource recommendation engine\n- Provider selection helper\n- Security policy suggester\n- Performance optimizer\n- Compliance checker\n- Network configuration advisor\n- Monitoring setup assistant\n\n```\n# Use MCP for intelligent config suggestion\nprovisioning-installer --unattended --mcp-suggest > config.toml\n```\n\n## Deployment Automation\n\n### Nushell Scripts\n\nComplete deployment automation scripts for popular container runtimes:\n\n```\n# Docker deployment\n./provisioning/platform/installer/deploy/docker.nu --config config.toml\n\n# Podman deployment\n./provisioning/platform/installer/deploy/podman.nu --config config.toml\n\n# Kubernetes deployment\n./provisioning/platform/installer/deploy/kubernetes.nu --config config.toml\n\n# OrbStack deployment\n./provisioning/platform/installer/deploy/orbstack.nu --config config.toml\n```\n\n### Self-Installation\n\nInfrastructure components can query MCP and install themselves:\n\n```\n# Taskservs auto-install with dependencies\ntaskserv install-self kubernetes\ntaskserv install-self prometheus\ntaskserv install-self cilium\n```\n\n## Command Reference\n\n```\n# Show interactive installer\nprovisioning-installer\n\n# Show help\nprovisioning-installer --help\n\n# Show available modes\nprovisioning-installer --list-modes\n\n# Show available providers\nprovisioning-installer --list-providers\n\n# List available templates\nprovisioning-installer --list-templates\n\n# Validate configuration file\nprovisioning-installer --validate --config config.toml\n\n# Dry-run (check without installing)\nprovisioning-installer --config config.toml --check\n\n# Full unattended installation\nprovisioning-installer --unattended --config config.toml\n\n# Headless with specific settings\nprovisioning-installer --headless --mode solo --provider upcloud --cpu 2 --memory 4096 --yes\n```\n\n## Integration Examples\n\n### GitOps Workflow\n\n```\n# Define in Git\ncat > infrastructure/installer.toml << EOF\n[installation]\nmode = "multiuser"\nprovider = "upcloud"\n\n[resources]\ncpu = 4\nmemory = 8192\nEOF\n\n# Deploy via CI/CD\nprovisioning-installer --unattended --config infrastructure/installer.toml\n```\n\n### Terraform Integration\n\n```\n# Call installer as part of Terraform provisioning\nresource "null_resource" "provisioning_installer" {\n  provisioner "local-exec" {\n    command = "provisioning-installer --unattended --config ${var.config_file}"\n  }\n}\n```\n\n### Ansible Integration\n\n```\n- name: Run provisioning installer\n  shell: provisioning-installer --unattended --config /tmp/config.toml\n  vars:\n    ansible_python_interpreter: /usr/bin/python3\n```\n\n## Configuration Templates\n\nPre-built templates available in `provisioning/config/installer-templates/`:\n\n- `solo-dev.toml` - Single developer setup\n- `team-test.toml` - Team testing environment\n- `cicd-pipeline.toml` - CI/CD integration\n- `enterprise-prod.toml` - Production deployment\n- `kubernetes-ha.toml` - High-availability Kubernetes\n- `multicloud.toml` - Multi-provider setup\n\n## Documentation\n\n- **User Guide**: `user/provisioning-installer-guide.md`\n- **Deployment Guide**: `operations/installer-deployment-guide.md`\n- **Configuration Guide**: `infrastructure/installer-configuration-guide.md`\n\n## Help and Support\n\n```\n# Show installer help\nprovisioning-installer --help\n\n# Show detailed documentation\nprovisioning help installer\n\n# Validate your configuration\nprovisioning-installer --validate --config your-config.toml\n\n# Get configuration suggestions from MCP\nprovisioning-installer --config-suggest\n```\n\n## Nushell Fallback\n\nIf Ratatui TUI is not available, the installer automatically falls back to:\n\n- Interactive Nushell prompt system\n- Same functionality, text-based interface\n- Full feature parity with TUI version
