chore: fix docs after fences fix
This commit is contained in:
parent
ef8889959a
commit
a4b3c02371
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
139
docs/README.md
139
docs/README.md
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,64 @@
|
||||
# Configuration Generation (typdialog-prov-gen)\n\n**Status**: 🔴 Planned for Q2 2025\n\n## Overview\n\nThe Configuration Generator (typdialog-prov-gen) will provide template-based Nickel configuration generation with AI-powered customization.\n\n## Planned Features\n\n### Template Selection\n- Library of production-ready infrastructure templates\n- AI recommends templates based on requirements\n- Preview before generation\n\n### Customization via Natural Language\n```\nprovisioning ai config-gen \\n --template "kubernetes-cluster" \\n --customize "Add Prometheus monitoring, increase replicas to 5, use us-east-1"\n```\n\n### Multi-Provider Support\n- AWS, Hetzner, UpCloud, local infrastructure\n- Automatic provider-specific optimizations\n- Cost estimation across providers\n\n### Validation and Testing\n- Type-checking via Nickel before deployment\n- Dry-run execution for safety\n- Test data fixtures for verification\n\n## Architecture\n\n```\nTemplate Library\n ↓\nTemplate Selection (AI + User)\n ↓\nCustomization Layer (NL → Nickel)\n ↓\nValidation (Type + Runtime)\n ↓\nGenerated Configuration\n```\n\n## Integration Points\n\n- typdialog web UI for template browsing\n- CLI for batch generation\n- AI service for customization suggestions\n- Nickel for type-safe validation\n\n## Related Documentation\n\n- [Natural Language Configuration](natural-language-config.md) - NL to config generation\n- [Architecture](architecture.md) - AI system overview\n- [Configuration Guide](configuration.md) - Setup instructions\n\n---\n\n**Status**: 🔴 Planned\n**Expected Release**: Q2 2025\n**Priority**: High (enables non-technical users to generate configs)
|
||||
# Configuration Generation (typdialog-prov-gen)
|
||||
|
||||
**Status**: 🔴 Planned for Q2 2025
|
||||
|
||||
## Overview
|
||||
|
||||
The Configuration Generator (typdialog-prov-gen) will provide template-based Nickel configuration generation with AI-powered customization.
|
||||
|
||||
## Planned Features
|
||||
|
||||
### Template Selection
|
||||
- Library of production-ready infrastructure templates
|
||||
- AI recommends templates based on requirements
|
||||
- Preview before generation
|
||||
|
||||
### Customization via Natural Language
|
||||
```text
|
||||
provisioning ai config-gen
|
||||
--template "kubernetes-cluster"
|
||||
--customize "Add Prometheus monitoring, increase replicas to 5, use us-east-1"
|
||||
```
|
||||
|
||||
### Multi-Provider Support
|
||||
- AWS, Hetzner, UpCloud, local infrastructure
|
||||
- Automatic provider-specific optimizations
|
||||
- Cost estimation across providers
|
||||
|
||||
### Validation and Testing
|
||||
- Type-checking via Nickel before deployment
|
||||
- Dry-run execution for safety
|
||||
- Test data fixtures for verification
|
||||
|
||||
## Architecture
|
||||
|
||||
```text
|
||||
Template Library
|
||||
↓
|
||||
Template Selection (AI + User)
|
||||
↓
|
||||
Customization Layer (NL → Nickel)
|
||||
↓
|
||||
Validation (Type + Runtime)
|
||||
↓
|
||||
Generated Configuration
|
||||
```
|
||||
|
||||
## Integration Points
|
||||
|
||||
- typdialog web UI for template browsing
|
||||
- CLI for batch generation
|
||||
- AI service for customization suggestions
|
||||
- Nickel for type-safe validation
|
||||
|
||||
## Related Documentation
|
||||
|
||||
- [Natural Language Configuration](natural-language-config.md) - NL to config generation
|
||||
- [Architecture](architecture.md) - AI system overview
|
||||
- [Configuration Guide](configuration.md) - Setup instructions
|
||||
|
||||
---
|
||||
|
||||
**Status**: 🔴 Planned
|
||||
**Expected Release**: Q2 2025
|
||||
**Priority**: High (enables non-technical users to generate configs)
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,28 @@
|
||||
# API Documentation\n\nAPI reference for programmatic access to the Provisioning Platform.\n\n## Available APIs\n\n- [REST API](rest-api.md) - HTTP endpoints for all operations\n- [WebSocket API](websocket.md) - Real-time event streams\n- [Extensions API](extensions.md) - Extension integration interfaces\n- [SDKs](sdks.md) - Client libraries for multiple languages\n- [Integration Examples](integration-examples.md) - Code examples and patterns\n\n## Quick Start\n\n```\n# Check API health\ncurl http://localhost:9090/health\n\n# List tasks via API\ncurl http://localhost:9090/tasks\n\n# Submit workflow\ncurl -X POST http://localhost:9090/workflows/servers/create \\n -H "Content-Type: application/json" \\n -d '{"infra": "my-project", "servers": ["web-01"]}'\n```\n\nSee [REST API](rest-api.md) for complete endpoint documentation.
|
||||
# API Documentation
|
||||
|
||||
API reference for programmatic access to the Provisioning Platform.
|
||||
|
||||
## Available APIs
|
||||
|
||||
- [REST API](rest-api.md) - HTTP endpoints for all operations
|
||||
- [WebSocket API](websocket.md) - Real-time event streams
|
||||
- [Extensions API](extensions.md) - Extension integration interfaces
|
||||
- [SDKs](sdks.md) - Client libraries for multiple languages
|
||||
- [Integration Examples](integration-examples.md) - Code examples and patterns
|
||||
|
||||
## Quick Start
|
||||
|
||||
```text
|
||||
# Check API health
|
||||
curl http://localhost:9090/health
|
||||
|
||||
# List tasks via API
|
||||
curl http://localhost:9090/tasks
|
||||
|
||||
# Submit workflow
|
||||
curl -X POST http://localhost:9090/workflows/servers/create
|
||||
-H "Content-Type: application/json"
|
||||
-d '{"infra": "my-project", "servers": ["web-01"]}'
|
||||
```
|
||||
|
||||
See [REST API](rest-api.md) for complete endpoint documentation.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,111 @@
|
||||
# Nushell API Reference\n\nAPI documentation for Nushell library functions in the provisioning platform.\n\n## Overview\n\nThe provisioning platform provides a comprehensive Nushell library with reusable functions for infrastructure automation.\n\n## Core Modules\n\n### Configuration Module\n\n**Location**: `provisioning/core/nulib/lib_provisioning/config/`\n\n- `get-config <key>` - Retrieve configuration values\n- `validate-config` - Validate configuration files\n- `load-config <path>` - Load configuration from file\n\n### Server Module\n\n**Location**: `provisioning/core/nulib/lib_provisioning/servers/`\n\n- `create-servers <plan>` - Create server infrastructure\n- `list-servers` - List all provisioned servers\n- `delete-servers <ids>` - Remove servers\n\n### Task Service Module\n\n**Location**: `provisioning/core/nulib/lib_provisioning/taskservs/`\n\n- `install-taskserv <name>` - Install infrastructure service\n- `list-taskservs` - List installed services\n- `generate-taskserv-config <name>` - Generate service configuration\n\n### Workspace Module\n\n**Location**: `provisioning/core/nulib/lib_provisioning/workspace/`\n\n- `init-workspace <name>` - Initialize new workspace\n- `get-active-workspace` - Get current workspace\n- `switch-workspace <name>` - Switch to different workspace\n\n### Provider Module\n\n**Location**: `provisioning/core/nulib/lib_provisioning/providers/`\n\n- `discover-providers` - Find available providers\n- `load-provider <name>` - Load provider module\n- `list-providers` - List loaded providers\n\n## Diagnostics & Utilities\n\n### Diagnostics Module\n\n**Location**: `provisioning/core/nulib/lib_provisioning/diagnostics/`\n\n- `system-status` - Check system health (13+ checks)\n- `health-check` - Deep validation (7 areas)\n- `next-steps` - Get progressive guidance\n- `deployment-phase` - Check deployment progress\n\n### Hints Module\n\n**Location**: `provisioning/core/nulib/lib_provisioning/utils/hints.nu`\n\n- `show-next-step <context>` - Display next step suggestion\n- `show-doc-link <topic>` - Show documentation link\n- `show-example <command>` - Display command example\n\n## Usage Example\n\n```\n# Load provisioning library\nuse provisioning/core/nulib/lib_provisioning *\n\n# Check system status\nsystem-status | table\n\n# Create servers\ncreate-servers --plan "3-node-cluster" --check\n\n# Install kubernetes\ninstall-taskserv kubernetes --check\n\n# Get next steps\nnext-steps\n```\n\n## API Conventions\n\nAll API functions follow these conventions:\n\n- **Explicit types**: All parameters have type annotations\n- **Early returns**: Validate first, fail fast\n- **Pure functions**: No side effects (mutations marked with `!`)\n- **Pipeline-friendly**: Output designed for Nu pipelines\n\n## Best Practices\n\nSee [Nushell Best Practices](../development/NUSHELL_BEST_PRACTICES.md) for coding guidelines.\n\n## Source Code\n\nBrowse the complete source code:\n\n- **Core library**: `provisioning/core/nulib/lib_provisioning/`\n- **Module index**: `provisioning/core/nulib/lib_provisioning/mod.nu`\n\n---\n\nFor integration examples, see [Integration Examples](integration-examples.md).
|
||||
# Nushell API Reference
|
||||
|
||||
API documentation for Nushell library functions in the provisioning platform.
|
||||
|
||||
## Overview
|
||||
|
||||
The provisioning platform provides a comprehensive Nushell library with reusable functions for infrastructure automation.
|
||||
|
||||
## Core Modules
|
||||
|
||||
### Configuration Module
|
||||
|
||||
**Location**: `provisioning/core/nulib/lib_provisioning/config/`
|
||||
|
||||
- `get-config <key>` - Retrieve configuration values
|
||||
- `validate-config` - Validate configuration files
|
||||
- `load-config <path>` - Load configuration from file
|
||||
|
||||
### Server Module
|
||||
|
||||
**Location**: `provisioning/core/nulib/lib_provisioning/servers/`
|
||||
|
||||
- `create-servers <plan>` - Create server infrastructure
|
||||
- `list-servers` - List all provisioned servers
|
||||
- `delete-servers <ids>` - Remove servers
|
||||
|
||||
### Task Service Module
|
||||
|
||||
**Location**: `provisioning/core/nulib/lib_provisioning/taskservs/`
|
||||
|
||||
- `install-taskserv <name>` - Install infrastructure service
|
||||
- `list-taskservs` - List installed services
|
||||
- `generate-taskserv-config <name>` - Generate service configuration
|
||||
|
||||
### Workspace Module
|
||||
|
||||
**Location**: `provisioning/core/nulib/lib_provisioning/workspace/`
|
||||
|
||||
- `init-workspace <name>` - Initialize new workspace
|
||||
- `get-active-workspace` - Get current workspace
|
||||
- `switch-workspace <name>` - Switch to different workspace
|
||||
|
||||
### Provider Module
|
||||
|
||||
**Location**: `provisioning/core/nulib/lib_provisioning/providers/`
|
||||
|
||||
- `discover-providers` - Find available providers
|
||||
- `load-provider <name>` - Load provider module
|
||||
- `list-providers` - List loaded providers
|
||||
|
||||
## Diagnostics & Utilities
|
||||
|
||||
### Diagnostics Module
|
||||
|
||||
**Location**: `provisioning/core/nulib/lib_provisioning/diagnostics/`
|
||||
|
||||
- `system-status` - Check system health (13+ checks)
|
||||
- `health-check` - Deep validation (7 areas)
|
||||
- `next-steps` - Get progressive guidance
|
||||
- `deployment-phase` - Check deployment progress
|
||||
|
||||
### Hints Module
|
||||
|
||||
**Location**: `provisioning/core/nulib/lib_provisioning/utils/hints.nu`
|
||||
|
||||
- `show-next-step <context>` - Display next step suggestion
|
||||
- `show-doc-link <topic>` - Show documentation link
|
||||
- `show-example <command>` - Display command example
|
||||
|
||||
## Usage Example
|
||||
|
||||
```text
|
||||
# Load provisioning library
|
||||
use provisioning/core/nulib/lib_provisioning *
|
||||
|
||||
# Check system status
|
||||
system-status | table
|
||||
|
||||
# Create servers
|
||||
create-servers --plan "3-node-cluster" --check
|
||||
|
||||
# Install kubernetes
|
||||
install-taskserv kubernetes --check
|
||||
|
||||
# Get next steps
|
||||
next-steps
|
||||
```
|
||||
|
||||
## API Conventions
|
||||
|
||||
All API functions follow these conventions:
|
||||
|
||||
- **Explicit types**: All parameters have type annotations
|
||||
- **Early returns**: Validate first, fail fast
|
||||
- **Pure functions**: No side effects (mutations marked with `!`)
|
||||
- **Pipeline-friendly**: Output designed for Nu pipelines
|
||||
|
||||
## Best Practices
|
||||
|
||||
See [Nushell Best Practices](../development/NUSHELL_BEST_PRACTICES.md) for coding guidelines.
|
||||
|
||||
## Source Code
|
||||
|
||||
Browse the complete source code:
|
||||
|
||||
- **Core library**: `provisioning/core/nulib/lib_provisioning/`
|
||||
- **Module index**: `provisioning/core/nulib/lib_provisioning/mod.nu`
|
||||
|
||||
---
|
||||
|
||||
For integration examples, see [Integration Examples](integration-examples.md).
|
||||
File diff suppressed because one or more lines are too long
@ -1 +1,186 @@
|
||||
# Provider API Reference\n\nAPI documentation for creating and using infrastructure providers.\n\n## Overview\n\nProviders handle cloud-specific operations and resource provisioning. The provisioning platform supports multiple cloud providers through a unified API.\n\n## Supported Providers\n\n- **UpCloud** - European cloud provider\n- **AWS** - Amazon Web Services\n- **Local** - Local development environment\n\n## Provider Interface\n\nAll providers must implement the following interface:\n\n### Required Functions\n\n```\n# Provider initialization\nexport def init [] -> record { ... }\n\n# Server operations\nexport def create-servers [plan: record] -> list { ... }\nexport def delete-servers [ids: list] -> bool { ... }\nexport def list-servers [] -> table { ... }\n\n# Resource information\nexport def get-server-plans [] -> table { ... }\nexport def get-regions [] -> list { ... }\nexport def get-pricing [plan: string] -> record { ... }\n```\n\n### Provider Configuration\n\nEach provider requires configuration in Nickel format:\n\n```\n# Example: UpCloud provider configuration\n{\n provider = {\n name = "upcloud",\n type = "cloud",\n enabled = true,\n config = {\n username = "{{env.UPCLOUD_USERNAME}}",\n password = "{{env.UPCLOUD_PASSWORD}}",\n default_zone = "de-fra1",\n },\n }\n}\n```\n\n## Creating a Custom Provider\n\n### 1. Directory Structure\n\n```\nprovisioning/extensions/providers/my-provider/\n├── nulib/\n│ └── my_provider.nu # Provider implementation\n├── schemas/\n│ ├── main.ncl # Nickel schema\n│ └── defaults.ncl # Default configuration\n└── README.md # Provider documentation\n```\n\n### 2. Implementation Template\n\n```\n# my_provider.nu\nexport def init [] {\n {\n name: "my-provider"\n type: "cloud"\n ready: true\n }\n}\n\nexport def create-servers [plan: record] {\n # Implementation here\n []\n}\n\nexport def list-servers [] {\n # Implementation here\n []\n}\n\n# ... other required functions\n```\n\n### 3. Nickel Schema\n\n```\n# main.ncl\n{\n MyProvider = {\n # My custom provider schema\n name | String = "my-provider",\n type | String | "cloud" | "local" = "cloud",\n config | MyProviderConfig,\n },\n\n MyProviderConfig = {\n api_key | String,\n region | String = "us-east-1",\n },\n}\n```\n\n## Provider Discovery\n\nProviders are automatically discovered from:\n\n- `provisioning/extensions/providers/*/nu/*.nu`\n- User workspace: `workspace/extensions/providers/*/nu/*.nu`\n\n```\n# Discover available providers\nprovisioning module discover providers\n\n# Load provider\nprovisioning module load providers workspace my-provider\n```\n\n## Provider API Examples\n\n### Create Servers\n\n```\nuse my_provider.nu *\n\nlet plan = {\n count: 3\n size: "medium"\n zone: "us-east-1"\n}\n\ncreate-servers $plan\n```\n\n### List Servers\n\n```\nlist-servers | where status == "running" | select hostname ip_address\n```\n\n### Get Pricing\n\n```\nget-pricing "small" | to yaml\n```\n\n## Testing Providers\n\nUse the test environment system to test providers:\n\n```\n# Test provider without real resources\nprovisioning test env single my-provider --check\n```\n\n## Provider Development Guide\n\nFor complete provider development guide, see:\n\n- **[Provider Development](../development/QUICK_PROVIDER_GUIDE.md)** - Quick start guide\n- **[Extension Development](../development/extensions.md)** - Complete extension guide\n- **[Integration Examples](integration-examples.md)** - Example implementations\n\n## API Stability\n\nProvider API follows semantic versioning:\n\n- **Major**: Breaking changes\n- **Minor**: New features, backward compatible\n- **Patch**: Bug fixes\n\nCurrent API version: `2.0.0`\n\n---\n\nFor more examples, see [Integration Examples](integration-examples.md).
|
||||
# Provider API Reference
|
||||
|
||||
API documentation for creating and using infrastructure providers.
|
||||
|
||||
## Overview
|
||||
|
||||
Providers handle cloud-specific operations and resource provisioning. The provisioning platform supports multiple cloud providers through a unified API.
|
||||
|
||||
## Supported Providers
|
||||
|
||||
- **UpCloud** - European cloud provider
|
||||
- **AWS** - Amazon Web Services
|
||||
- **Local** - Local development environment
|
||||
|
||||
## Provider Interface
|
||||
|
||||
All providers must implement the following interface:
|
||||
|
||||
### Required Functions
|
||||
|
||||
```text
|
||||
# Provider initialization
|
||||
export def init [] -> record { ... }
|
||||
|
||||
# Server operations
|
||||
export def create-servers [plan: record] -> list { ... }
|
||||
export def delete-servers [ids: list] -> bool { ... }
|
||||
export def list-servers [] -> table { ... }
|
||||
|
||||
# Resource information
|
||||
export def get-server-plans [] -> table { ... }
|
||||
export def get-regions [] -> list { ... }
|
||||
export def get-pricing [plan: string] -> record { ... }
|
||||
```
|
||||
|
||||
### Provider Configuration
|
||||
|
||||
Each provider requires configuration in Nickel format:
|
||||
|
||||
```text
|
||||
# Example: UpCloud provider configuration
|
||||
{
|
||||
provider = {
|
||||
name = "upcloud",
|
||||
type = "cloud",
|
||||
enabled = true,
|
||||
config = {
|
||||
username = "{{env.UPCLOUD_USERNAME}}",
|
||||
password = "{{env.UPCLOUD_PASSWORD}}",
|
||||
default_zone = "de-fra1",
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Creating a Custom Provider
|
||||
|
||||
### 1. Directory Structure
|
||||
|
||||
```text
|
||||
provisioning/extensions/providers/my-provider/
|
||||
├── nulib/
|
||||
│ └── my_provider.nu # Provider implementation
|
||||
├── schemas/
|
||||
│ ├── main.ncl # Nickel schema
|
||||
│ └── defaults.ncl # Default configuration
|
||||
└── README.md # Provider documentation
|
||||
```
|
||||
|
||||
### 2. Implementation Template
|
||||
|
||||
```text
|
||||
# my_provider.nu
|
||||
export def init [] {
|
||||
{
|
||||
name: "my-provider"
|
||||
type: "cloud"
|
||||
ready: true
|
||||
}
|
||||
}
|
||||
|
||||
export def create-servers [plan: record] {
|
||||
# Implementation here
|
||||
[]
|
||||
}
|
||||
|
||||
export def list-servers [] {
|
||||
# Implementation here
|
||||
[]
|
||||
}
|
||||
|
||||
# ... other required functions
|
||||
```
|
||||
|
||||
### 3. Nickel Schema
|
||||
|
||||
```text
|
||||
# main.ncl
|
||||
{
|
||||
MyProvider = {
|
||||
# My custom provider schema
|
||||
name | String = "my-provider",
|
||||
type | String | "cloud" | "local" = "cloud",
|
||||
config | MyProviderConfig,
|
||||
},
|
||||
|
||||
MyProviderConfig = {
|
||||
api_key | String,
|
||||
region | String = "us-east-1",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## Provider Discovery
|
||||
|
||||
Providers are automatically discovered from:
|
||||
|
||||
- `provisioning/extensions/providers/*/nu/*.nu`
|
||||
- User workspace: `workspace/extensions/providers/*/nu/*.nu`
|
||||
|
||||
```text
|
||||
# Discover available providers
|
||||
provisioning module discover providers
|
||||
|
||||
# Load provider
|
||||
provisioning module load providers workspace my-provider
|
||||
```
|
||||
|
||||
## Provider API Examples
|
||||
|
||||
### Create Servers
|
||||
|
||||
```text
|
||||
use my_provider.nu *
|
||||
|
||||
let plan = {
|
||||
count: 3
|
||||
size: "medium"
|
||||
zone: "us-east-1"
|
||||
}
|
||||
|
||||
create-servers $plan
|
||||
```
|
||||
|
||||
### List Servers
|
||||
|
||||
```text
|
||||
list-servers | where status == "running" | select hostname ip_address
|
||||
```
|
||||
|
||||
### Get Pricing
|
||||
|
||||
```text
|
||||
get-pricing "small" | to yaml
|
||||
```
|
||||
|
||||
## Testing Providers
|
||||
|
||||
Use the test environment system to test providers:
|
||||
|
||||
```text
|
||||
# Test provider without real resources
|
||||
provisioning test env single my-provider --check
|
||||
```
|
||||
|
||||
## Provider Development Guide
|
||||
|
||||
For complete provider development guide, see:
|
||||
|
||||
- **[Provider Development](../development/QUICK_PROVIDER_GUIDE.md)** - Quick start guide
|
||||
- **[Extension Development](../development/extensions.md)** - Complete extension guide
|
||||
- **[Integration Examples](integration-examples.md)** - Example implementations
|
||||
|
||||
## API Stability
|
||||
|
||||
Provider API follows semantic versioning:
|
||||
|
||||
- **Major**: Breaking changes
|
||||
- **Minor**: New features, backward compatible
|
||||
- **Patch**: Bug fixes
|
||||
|
||||
Current API version: `2.0.0`
|
||||
|
||||
---
|
||||
|
||||
For more examples, see [Integration Examples](integration-examples.md).
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,60 @@
|
||||
# Architecture Decision Records (ADRs)\n\nThis directory contains all Architecture Decision Records for the provisioning platform. ADRs document significant architectural decisions and their rationale.\n\n## Index of Decisions\n\n### Core Architecture (ADR-001 to ADR-006)\n\n- **ADR-001**: [Project Structure](adr-001-project-structure.md) - Overall project organization and directory layout\n- **ADR-002**: [Distribution Strategy](adr-002-distribution-strategy.md) - How the platform is packaged and distributed\n- **ADR-003**: [Workspace Isolation](adr-003-workspace-isolation.md) - Workspace management and isolation boundaries\n- **ADR-004**: [Hybrid Architecture](adr-004-hybrid-architecture.md) - Rust/Nushell hybrid system design\n- **ADR-005**: [Extension Framework](adr-005-extension-framework.md) - Plugin/extension system architecture\n- **ADR-006**: [Provisioning CLI Refactoring](adr-006-provisioning-cli-refactoring.md) - CLI modularization and command handling\n\n### Infrastructure & Configuration (ADR-007 to ADR-011)\n\n- **ADR-007**: [KMS Simplification](adr-007-kms-simplification.md) - Key Management System design\n- **ADR-008**: [Cedar Authorization](adr-008-cedar-authorization.md) - Fine-grained authorization via Cedar policies\n- **ADR-009**: [Security System Complete](adr-009-security-system-complete.md) - Comprehensive security implementation\n- **ADR-010**: [Configuration Format Strategy](adr-010-configuration-format-strategy.md) - When to use Nickel, TOML, YAML, or KCL\n- **ADR-011**: [Nickel Migration](adr-011-nickel-migration.md) - Migration from KCL to Nickel as primary IaC language\n\n### Platform Services (ADR-012 to ADR-014)\n\n- **ADR-012**: [Nushell Nickel Plugin CLI Wrapper](adr-012-nushell-nickel-plugin-cli-wrapper.md) - Plugin architecture for Nickel integration\n- **ADR-013**: [Typdialog Web UI Backend Integration](adr-013-typdialog-integration.md) - Browser-based configuration forms with multi-user collaboration\n- **ADR-014**: [SecretumVault Integration](adr-014-secretumvault-integration.md) - Centralized secrets management with dynamic credentials\n\n### AI and Intelligence (ADR-015)\n\n- **ADR-015**: [AI Integration Architecture](adr-015-ai-integration-architecture.md) - Comprehensive AI system for intelligent infrastructure provisioning\n\n## How to Use ADRs\n\n1. **For decisions affecting architecture**: Create a new ADR with the next sequential number\n2. **For reading decisions**: Browse this list or check SUMMARY.md\n3. **For understanding context**: Each ADR includes context, rationale, and consequences\n\n## ADR Format\n\nEach ADR follows this standard structure:\n\n- **Context**: What problem we're solving\n- **Decision**: What we decided\n- **Rationale**: Why we chose this approach\n- **Consequences**: Positive and negative impacts\n- **Alternatives Considered**: Other options we evaluated\n\n## Status Markers\n\n- **Proposed**: Under review, not yet final\n- **Accepted**: Approved and adopted\n- **Superseded**: Replaced by a later ADR\n- **Deprecated**: No longer recommended\n\n---\n\n**Last Updated**: 2025-01-08\n**Total ADRs**: 15
|
||||
# Architecture Decision Records (ADRs)
|
||||
|
||||
This directory contains all Architecture Decision Records for the provisioning platform. ADRs document significant architectural decisions and their rationale.
|
||||
|
||||
## Index of Decisions
|
||||
|
||||
### Core Architecture (ADR-001 to ADR-006)
|
||||
|
||||
- **ADR-001**: [Project Structure](adr-001-project-structure.md) - Overall project organization and directory layout
|
||||
- **ADR-002**: [Distribution Strategy](adr-002-distribution-strategy.md) - How the platform is packaged and distributed
|
||||
- **ADR-003**: [Workspace Isolation](adr-003-workspace-isolation.md) - Workspace management and isolation boundaries
|
||||
- **ADR-004**: [Hybrid Architecture](adr-004-hybrid-architecture.md) - Rust/Nushell hybrid system design
|
||||
- **ADR-005**: [Extension Framework](adr-005-extension-framework.md) - Plugin/extension system architecture
|
||||
- **ADR-006**: [Provisioning CLI Refactoring](adr-006-provisioning-cli-refactoring.md) - CLI modularization and command handling
|
||||
|
||||
### Infrastructure & Configuration (ADR-007 to ADR-011)
|
||||
|
||||
- **ADR-007**: [KMS Simplification](adr-007-kms-simplification.md) - Key Management System design
|
||||
- **ADR-008**: [Cedar Authorization](adr-008-cedar-authorization.md) - Fine-grained authorization via Cedar policies
|
||||
- **ADR-009**: [Security System Complete](adr-009-security-system-complete.md) - Comprehensive security implementation
|
||||
- **ADR-010**: [Configuration Format Strategy](adr-010-configuration-format-strategy.md) - When to use Nickel, TOML, YAML, or KCL
|
||||
- **ADR-011**: [Nickel Migration](adr-011-nickel-migration.md) - Migration from KCL to Nickel as primary IaC language
|
||||
|
||||
### Platform Services (ADR-012 to ADR-014)
|
||||
|
||||
- **ADR-012**: [Nushell Nickel Plugin CLI Wrapper](adr-012-nushell-nickel-plugin-cli-wrapper.md) - Plugin architecture for Nickel integration
|
||||
- **ADR-013**: [Typdialog Web UI Backend Integration](adr-013-typdialog-integration.md) - Browser-based configuration forms with multi-user collaboration
|
||||
- **ADR-014**: [SecretumVault Integration](adr-014-secretumvault-integration.md) - Centralized secrets management with dynamic credentials
|
||||
|
||||
### AI and Intelligence (ADR-015)
|
||||
|
||||
- **ADR-015**: [AI Integration Architecture](adr-015-ai-integration-architecture.md) - Comprehensive AI system for intelligent infrastructure provisioning
|
||||
|
||||
## How to Use ADRs
|
||||
|
||||
1. **For decisions affecting architecture**: Create a new ADR with the next sequential number
|
||||
2. **For reading decisions**: Browse this list or check SUMMARY.md
|
||||
3. **For understanding context**: Each ADR includes context, rationale, and consequences
|
||||
|
||||
## ADR Format
|
||||
|
||||
Each ADR follows this standard structure:
|
||||
|
||||
- **Context**: What problem we're solving
|
||||
- **Decision**: What we decided
|
||||
- **Rationale**: Why we chose this approach
|
||||
- **Consequences**: Positive and negative impacts
|
||||
- **Alternatives Considered**: Other options we evaluated
|
||||
|
||||
## Status Markers
|
||||
|
||||
- **Proposed**: Under review, not yet final
|
||||
- **Accepted**: Approved and adopted
|
||||
- **Superseded**: Replaced by a later ADR
|
||||
- **Deprecated**: No longer recommended
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-01-08
|
||||
**Total ADRs**: 15
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,54 @@
|
||||
# Command Reference\n\nComplete command reference for the provisioning CLI.\n\n## 📖 Service Management Guide\n\nThe primary command reference is now part of the Service Management Guide:\n\n**→ [Service Management Guide](SERVICE_MANAGEMENT_GUIDE.md)** - Complete CLI reference\n\nThis guide includes:\n\n- All CLI commands and shortcuts\n- Command syntax and examples\n- Service lifecycle management\n- Troubleshooting commands\n\n## Quick Reference\n\n### Essential Commands\n\n```\n# System status\nprovisioning status\nprovisioning health\n\n# Server management\nprovisioning server create\nprovisioning server list\nprovisioning server ssh <hostname>\n\n# Task services\nprovisioning taskserv create <service>\nprovisioning taskserv list\n\n# Workspace management\nprovisioning workspace list\nprovisioning workspace switch <name>\n\n# Get help\nprovisioning help\nprovisioning <command> help\n```\n\n## Additional References\n\n- **[Service Management Guide](SERVICE_MANAGEMENT_GUIDE.md)** - Complete CLI reference\n- **[Service Management Quick Reference](SERVICE_MANAGEMENT_QUICKREF.md)** - Quick lookup\n- **[Quick Start Cheatsheet](../guides/quickstart-cheatsheet.md)** - All shortcuts\n- **[Authentication Guide](AUTHENTICATION_LAYER_GUIDE.md)** - Auth commands\n\n---\n\nFor complete command documentation, see [Service Management Guide](SERVICE_MANAGEMENT_GUIDE.md).
|
||||
# Command Reference
|
||||
|
||||
Complete command reference for the provisioning CLI.
|
||||
|
||||
## 📖 Service Management Guide
|
||||
|
||||
The primary command reference is now part of the Service Management Guide:
|
||||
|
||||
**→ [Service Management Guide](SERVICE_MANAGEMENT_GUIDE.md)** - Complete CLI reference
|
||||
|
||||
This guide includes:
|
||||
|
||||
- All CLI commands and shortcuts
|
||||
- Command syntax and examples
|
||||
- Service lifecycle management
|
||||
- Troubleshooting commands
|
||||
|
||||
## Quick Reference
|
||||
|
||||
### Essential Commands
|
||||
|
||||
```text
|
||||
# System status
|
||||
provisioning status
|
||||
provisioning health
|
||||
|
||||
# Server management
|
||||
provisioning server create
|
||||
provisioning server list
|
||||
provisioning server ssh <hostname>
|
||||
|
||||
# Task services
|
||||
provisioning taskserv create <service>
|
||||
provisioning taskserv list
|
||||
|
||||
# Workspace management
|
||||
provisioning workspace list
|
||||
provisioning workspace switch <name>
|
||||
|
||||
# Get help
|
||||
provisioning help
|
||||
provisioning <command> help
|
||||
```
|
||||
|
||||
## Additional References
|
||||
|
||||
- **[Service Management Guide](SERVICE_MANAGEMENT_GUIDE.md)** - Complete CLI reference
|
||||
- **[Service Management Quick Reference](SERVICE_MANAGEMENT_QUICKREF.md)** - Quick lookup
|
||||
- **[Quick Start Cheatsheet](../guides/quickstart-cheatsheet.md)** - All shortcuts
|
||||
- **[Authentication Guide](AUTHENTICATION_LAYER_GUIDE.md)** - Auth commands
|
||||
|
||||
---
|
||||
|
||||
For complete command documentation, see [Service Management Guide](SERVICE_MANAGEMENT_GUIDE.md).
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,114 @@
|
||||
# MCP Server - Model Context Protocol\n\nA Rust-native Model Context Protocol (MCP) server for infrastructure automation and AI-assisted DevOps operations.\n\n> **Source**: `provisioning/platform/mcp-server/`\n> **Status**: Proof of Concept Complete\n\n## Overview\n\nReplaces the Python implementation with significant performance improvements while maintaining philosophical consistency with the Rust ecosystem approach.\n\n## Performance Results\n\n```\n🚀 Rust MCP Server Performance Analysis\n==================================================\n\n📋 Server Parsing Performance:\n • Sub-millisecond latency across all operations\n • 0μs average for configuration access\n\n🤖 AI Status Performance:\n • AI Status: 0μs avg (10000 iterations)\n\n💾 Memory Footprint:\n • ServerConfig size: 80 bytes\n • Config size: 272 bytes\n\n✅ Performance Summary:\n • Server parsing: Sub-millisecond latency\n • Configuration access: Microsecond latency\n • Memory efficient: Small struct footprint\n • Zero-copy string operations where possible\n```\n\n## Architecture\n\n```\nsrc/\n├── simple_main.rs # Lightweight MCP server entry point\n├── main.rs # Full MCP server (with SDK integration)\n├── lib.rs # Library interface\n├── config.rs # Configuration management\n├── provisioning.rs # Core provisioning engine\n├── tools.rs # AI-powered parsing tools\n├── errors.rs # Error handling\n└── performance_test.rs # Performance benchmarking\n```\n\n## Key Features\n\n1. **AI-Powered Server Parsing**: Natural language to infrastructure config\n2. **Multi-Provider Support**: AWS, UpCloud, Local\n3. **Configuration Management**: TOML-based with environment overrides\n4. **Error Handling**: Comprehensive error types with recovery hints\n5. **Performance Monitoring**: Built-in benchmarking capabilities\n\n## Rust vs Python Comparison\n\n| Metric | Python MCP Server | Rust MCP Server | Improvement |\n| -------- | ------------------ | ----------------- | ------------- |\n| **Startup Time** | ~500 ms | ~50 ms | **10x faster** |\n| **Memory Usage** | ~50 MB | ~5 MB | **10x less** |\n| **Parsing Latency** | ~1 ms | ~0.001 ms | **1000x faster** |\n| **Binary Size** | Python + deps | ~15 MB static | **Portable** |\n| **Type Safety** | Runtime errors | Compile-time | **Zero runtime errors** |\n\n## Usage\n\n```\n# Build and run\ncargo run --bin provisioning-mcp-server --release\n\n# Run with custom config\nPROVISIONING_PATH=/path/to/provisioning cargo run --bin provisioning-mcp-server -- --debug\n\n# Run tests\ncargo test\n\n# Run benchmarks\ncargo run --bin provisioning-mcp-server --release\n```\n\n## Configuration\n\nSet via environment variables:\n\n```\nexport PROVISIONING_PATH=/path/to/provisioning\nexport PROVISIONING_AI_PROVIDER=openai\nexport OPENAI_API_KEY=your-key\nexport PROVISIONING_DEBUG=true\n```\n\n## Integration Benefits\n\n1. **Philosophical Consistency**: Rust throughout the stack\n2. **Performance**: Sub-millisecond response times\n3. **Memory Safety**: No segfaults, no memory leaks\n4. **Concurrency**: Native async/await support\n5. **Distribution**: Single static binary\n6. **Cross-compilation**: ARM64/x86_64 support\n\n## Next Steps\n\n1. Full MCP SDK integration (schema definitions)\n2. WebSocket/TCP transport layer\n3. Plugin system for extensibility\n4. Metrics collection and monitoring\n5. Documentation and examples\n\n## Related Documentation\n\n- **Architecture**: [MCP Integration](../architecture/orchestrator-integration-model.md)
|
||||
# MCP Server - Model Context Protocol
|
||||
|
||||
A Rust-native Model Context Protocol (MCP) server for infrastructure automation and AI-assisted DevOps operations.
|
||||
|
||||
> **Source**: `provisioning/platform/mcp-server/`
|
||||
> **Status**: Proof of Concept Complete
|
||||
|
||||
## Overview
|
||||
|
||||
Replaces the Python implementation with significant performance improvements while maintaining philosophical consistency with the Rust ecosystem approach.
|
||||
|
||||
## Performance Results
|
||||
|
||||
```text
|
||||
🚀 Rust MCP Server Performance Analysis
|
||||
==================================================
|
||||
|
||||
📋 Server Parsing Performance:
|
||||
• Sub-millisecond latency across all operations
|
||||
• 0μs average for configuration access
|
||||
|
||||
🤖 AI Status Performance:
|
||||
• AI Status: 0μs avg (10000 iterations)
|
||||
|
||||
💾 Memory Footprint:
|
||||
• ServerConfig size: 80 bytes
|
||||
• Config size: 272 bytes
|
||||
|
||||
✅ Performance Summary:
|
||||
• Server parsing: Sub-millisecond latency
|
||||
• Configuration access: Microsecond latency
|
||||
• Memory efficient: Small struct footprint
|
||||
• Zero-copy string operations where possible
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
```text
|
||||
src/
|
||||
├── simple_main.rs # Lightweight MCP server entry point
|
||||
├── main.rs # Full MCP server (with SDK integration)
|
||||
├── lib.rs # Library interface
|
||||
├── config.rs # Configuration management
|
||||
├── provisioning.rs # Core provisioning engine
|
||||
├── tools.rs # AI-powered parsing tools
|
||||
├── errors.rs # Error handling
|
||||
└── performance_test.rs # Performance benchmarking
|
||||
```
|
||||
|
||||
## Key Features
|
||||
|
||||
1. **AI-Powered Server Parsing**: Natural language to infrastructure config
|
||||
2. **Multi-Provider Support**: AWS, UpCloud, Local
|
||||
3. **Configuration Management**: TOML-based with environment overrides
|
||||
4. **Error Handling**: Comprehensive error types with recovery hints
|
||||
5. **Performance Monitoring**: Built-in benchmarking capabilities
|
||||
|
||||
## Rust vs Python Comparison
|
||||
|
||||
| Metric | Python MCP Server | Rust MCP Server | Improvement |
|
||||
| -------- | ------------------ | ----------------- | ------------- |
|
||||
| **Startup Time** | ~500 ms | ~50 ms | **10x faster** |
|
||||
| **Memory Usage** | ~50 MB | ~5 MB | **10x less** |
|
||||
| **Parsing Latency** | ~1 ms | ~0.001 ms | **1000x faster** |
|
||||
| **Binary Size** | Python + deps | ~15 MB static | **Portable** |
|
||||
| **Type Safety** | Runtime errors | Compile-time | **Zero runtime errors** |
|
||||
|
||||
## Usage
|
||||
|
||||
```text
|
||||
# Build and run
|
||||
cargo run --bin provisioning-mcp-server --release
|
||||
|
||||
# Run with custom config
|
||||
PROVISIONING_PATH=/path/to/provisioning cargo run --bin provisioning-mcp-server -- --debug
|
||||
|
||||
# Run tests
|
||||
cargo test
|
||||
|
||||
# Run benchmarks
|
||||
cargo run --bin provisioning-mcp-server --release
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Set via environment variables:
|
||||
|
||||
```text
|
||||
export PROVISIONING_PATH=/path/to/provisioning
|
||||
export PROVISIONING_AI_PROVIDER=openai
|
||||
export OPENAI_API_KEY=your-key
|
||||
export PROVISIONING_DEBUG=true
|
||||
```
|
||||
|
||||
## Integration Benefits
|
||||
|
||||
1. **Philosophical Consistency**: Rust throughout the stack
|
||||
2. **Performance**: Sub-millisecond response times
|
||||
3. **Memory Safety**: No segfaults, no memory leaks
|
||||
4. **Concurrency**: Native async/await support
|
||||
5. **Distribution**: Single static binary
|
||||
6. **Cross-compilation**: ARM64/x86_64 support
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. Full MCP SDK integration (schema definitions)
|
||||
2. WebSocket/TCP transport layer
|
||||
3. Plugin system for extensibility
|
||||
4. Metrics collection and monitoring
|
||||
5. Documentation and examples
|
||||
|
||||
## Related Documentation
|
||||
|
||||
- **Architecture**: [MCP Integration](../architecture/orchestrator-integration-model.md)
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,70 @@
|
||||
# Taskserv Categorization Plan\n\n## Categories and Taskservs (38 total)\n\n### **kubernetes/** (1)\n\n- kubernetes\n\n### **networking/** (6)\n\n- cilium\n- coredns\n- etcd\n- ip-aliases\n- proxy\n- resolv\n\n### **container-runtime/** (6)\n\n- containerd\n- crio\n- crun\n- podman\n- runc\n- youki\n\n### **storage/** (4)\n\n- external-nfs\n- mayastor\n- oci-reg\n- rook-ceph\n\n### **databases/** (2)\n\n- postgres\n- redis\n\n### **development/** (6)\n\n- coder\n- desktop\n- gitea\n- nushell\n- oras\n- radicle\n\n### **infrastructure/** (6)\n\n- kms\n- os\n- provisioning\n- polkadot\n- webhook\n- kubectl\n\n### **misc/** (1)\n\n- generate\n\n### **Keep in root/** (6)\n\n- info.md\n- manifest.toml\n- manifest.lock\n- README.md\n- REFERENCE.md\n- version.ncl\n\nTotal categorized: 32 taskservs + 6 root files = 38 items ✓
|
||||
# Taskserv Categorization Plan
|
||||
|
||||
## Categories and Taskservs (38 total)
|
||||
|
||||
### **kubernetes/** (1)
|
||||
|
||||
- kubernetes
|
||||
|
||||
### **networking/** (6)
|
||||
|
||||
- cilium
|
||||
- coredns
|
||||
- etcd
|
||||
- ip-aliases
|
||||
- proxy
|
||||
- resolv
|
||||
|
||||
### **container-runtime/** (6)
|
||||
|
||||
- containerd
|
||||
- crio
|
||||
- crun
|
||||
- podman
|
||||
- runc
|
||||
- youki
|
||||
|
||||
### **storage/** (4)
|
||||
|
||||
- external-nfs
|
||||
- mayastor
|
||||
- oci-reg
|
||||
- rook-ceph
|
||||
|
||||
### **databases/** (2)
|
||||
|
||||
- postgres
|
||||
- redis
|
||||
|
||||
### **development/** (6)
|
||||
|
||||
- coder
|
||||
- desktop
|
||||
- gitea
|
||||
- nushell
|
||||
- oras
|
||||
- radicle
|
||||
|
||||
### **infrastructure/** (6)
|
||||
|
||||
- kms
|
||||
- os
|
||||
- provisioning
|
||||
- polkadot
|
||||
- webhook
|
||||
- kubectl
|
||||
|
||||
### **misc/** (1)
|
||||
|
||||
- generate
|
||||
|
||||
### **Keep in root/** (6)
|
||||
|
||||
- info.md
|
||||
- manifest.toml
|
||||
- manifest.lock
|
||||
- README.md
|
||||
- REFERENCE.md
|
||||
- version.ncl
|
||||
|
||||
Total categorized: 32 taskservs + 6 root files = 38 items ✓
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,235 @@
|
||||
# Installation\n\nThis guide walks you through installing the Provisioning Platform on your system.\n\n## Overview\n\nThe installation process involves:\n\n1. Cloning the repository\n2. Installing Nushell plugins\n3. Setting up configuration\n4. Initializing your first workspace\n\nEstimated time: 15-20 minutes\n\n## Step 1: Clone the Repository\n\n```\n# Clone the repository\ngit clone https://github.com/provisioning/provisioning-platform.git\ncd provisioning-platform\n\n# Checkout the latest stable release (optional)\ngit checkout tags/v3.5.0\n```\n\n## Step 2: Install Nushell Plugins\n\nThe platform uses multiple Nushell plugins for enhanced functionality.\n\n### Install nu_plugin_tera (Template Rendering)\n\n```\n# Install from crates.io\ncargo install nu_plugin_tera\n\n# Register with Nushell\nnu -c "plugin add ~/.cargo/bin/nu_plugin_tera; plugin use tera"\n```\n\n### Verify Plugin Installation\n\n```\n# Start Nushell\nnu\n\n# List installed plugins\nplugin list\n\n# Expected output should include:\n# - tera\n```\n\n## Step 3: Add CLI to PATH\n\nMake the `provisioning` command available globally:\n\n```\n# Option 1: Symlink to /usr/local/bin (recommended)\nsudo ln -s "$(pwd)/provisioning/core/cli/provisioning" /usr/local/bin/provisioning\n\n# Option 2: Add to PATH in your shell profile\necho 'export PATH="$PATH:'"$(pwd)"'/provisioning/core/cli"' >> ~/.bashrc # or ~/.zshrc\nsource ~/.bashrc # or ~/.zshrc\n\n# Verify installation\nprovisioning --version\n```\n\n## Step 4: Generate Age Encryption Keys\n\nGenerate keys for encrypting sensitive configuration:\n\n```\n# Create Age key directory\nmkdir -p ~/.config/provisioning/age\n\n# Generate private key\nage-keygen -o ~/.config/provisioning/age/private_key.txt\n\n# Extract public key\nage-keygen -y ~/.config/provisioning/age/private_key.txt > ~/.config/provisioning/age/public_key.txt\n\n# Secure the keys\nchmod 600 ~/.config/provisioning/age/private_key.txt\nchmod 644 ~/.config/provisioning/age/public_key.txt\n```\n\n## Step 5: Configure Environment\n\nSet up basic environment variables:\n\n```\n# Create environment file\ncat > ~/.provisioning/env << 'ENVEOF'\n# Provisioning Environment Configuration\nexport PROVISIONING_ENV=dev\nexport PROVISIONING_PATH=$(pwd)\nexport PROVISIONING_KAGE=~/.config/provisioning/age\nENVEOF\n\n# Source the environment\nsource ~/.provisioning/env\n\n# Add to shell profile for persistence\necho 'source ~/.provisioning/env' >> ~/.bashrc # or ~/.zshrc\n```\n\n## Step 6: Initialize Workspace\n\nCreate your first workspace:\n\n```\n# Initialize a new workspace\nprovisioning workspace init my-first-workspace\n\n# Expected output:\n# ✓ Workspace 'my-first-workspace' created successfully\n# ✓ Configuration template generated\n# ✓ Workspace activated\n\n# Verify workspace\nprovisioning workspace list\n```\n\n## Step 7: Validate Installation\n\nRun the installation verification:\n\n```\n# Check system configuration\nprovisioning validate config\n\n# Check all dependencies\nprovisioning env\n\n# View detailed environment\nprovisioning allenv\n```\n\nExpected output should show:\n\n- ✅ All core dependencies installed\n- ✅ Age keys configured\n- ✅ Workspace initialized\n- ✅ Configuration valid\n\n## Optional: Install Platform Services\n\nIf you plan to use platform services (orchestrator, control center, etc.):\n\n```\n# Build platform services\ncd provisioning/platform\n\n# Build orchestrator\ncd orchestrator\ncargo build --release\ncd ..\n\n# Build control center\ncd control-center\ncargo build --release\ncd ..\n\n# Build KMS service\ncd kms-service\ncargo build --release\ncd ..\n\n# Verify builds\nls */target/release/\n```\n\n## Optional: Install Platform with Installer\n\nUse the interactive installer for a guided setup:\n\n```\n# Build the installer\ncd provisioning/platform/installer\ncargo build --release\n\n# Run interactive installer\n./target/release/provisioning-installer\n\n# Or headless installation\n./target/release/provisioning-installer --headless --mode solo --yes\n```\n\n## Troubleshooting\n\n### Nushell Plugin Not Found\n\nIf plugins aren't recognized:\n\n```\n# Rebuild plugin registry\nnu -c "plugin list; plugin use tera"\n```\n\n### Permission Denied\n\nIf you encounter permission errors:\n\n```\n# Ensure proper ownership\nsudo chown -R $USER:$USER ~/.config/provisioning\n\n# Check PATH\necho $PATH | grep provisioning\n```\n\n### Age Keys Not Found\n\nIf encryption fails:\n\n```\n# Verify keys exist\nls -la ~/.config/provisioning/age/\n\n# Regenerate if needed\nage-keygen -o ~/.config/provisioning/age/private_key.txt\n```\n\n## Next Steps\n\nOnce installation is complete, proceed to:\n→ **[First Deployment](03-first-deployment.md)**\n\n## Additional Resources\n\n- [Detailed Installation Guide](../user/installation-guide.md)\n- [Workspace Management](../user/workspace-setup.md)\n- [Troubleshooting Guide](../user/troubleshooting-guide.md)
|
||||
# Installation
|
||||
|
||||
This guide walks you through installing the Provisioning Platform on your system.
|
||||
|
||||
## Overview
|
||||
|
||||
The installation process involves:
|
||||
|
||||
1. Cloning the repository
|
||||
2. Installing Nushell plugins
|
||||
3. Setting up configuration
|
||||
4. Initializing your first workspace
|
||||
|
||||
Estimated time: 15-20 minutes
|
||||
|
||||
## Step 1: Clone the Repository
|
||||
|
||||
```text
|
||||
# Clone the repository
|
||||
git clone https://github.com/provisioning/provisioning-platform.git
|
||||
cd provisioning-platform
|
||||
|
||||
# Checkout the latest stable release (optional)
|
||||
git checkout tags/v3.5.0
|
||||
```
|
||||
|
||||
## Step 2: Install Nushell Plugins
|
||||
|
||||
The platform uses multiple Nushell plugins for enhanced functionality.
|
||||
|
||||
### Install nu_plugin_tera (Template Rendering)
|
||||
|
||||
```text
|
||||
# Install from crates.io
|
||||
cargo install nu_plugin_tera
|
||||
|
||||
# Register with Nushell
|
||||
nu -c "plugin add ~/.cargo/bin/nu_plugin_tera; plugin use tera"
|
||||
```
|
||||
|
||||
### Verify Plugin Installation
|
||||
|
||||
```text
|
||||
# Start Nushell
|
||||
nu
|
||||
|
||||
# List installed plugins
|
||||
plugin list
|
||||
|
||||
# Expected output should include:
|
||||
# - tera
|
||||
```
|
||||
|
||||
## Step 3: Add CLI to PATH
|
||||
|
||||
Make the `provisioning` command available globally:
|
||||
|
||||
```text
|
||||
# Option 1: Symlink to /usr/local/bin (recommended)
|
||||
sudo ln -s "$(pwd)/provisioning/core/cli/provisioning" /usr/local/bin/provisioning
|
||||
|
||||
# Option 2: Add to PATH in your shell profile
|
||||
echo 'export PATH="$PATH:'"$(pwd)"'/provisioning/core/cli"' >> ~/.bashrc # or ~/.zshrc
|
||||
source ~/.bashrc # or ~/.zshrc
|
||||
|
||||
# Verify installation
|
||||
provisioning --version
|
||||
```
|
||||
|
||||
## Step 4: Generate Age Encryption Keys
|
||||
|
||||
Generate keys for encrypting sensitive configuration:
|
||||
|
||||
```text
|
||||
# Create Age key directory
|
||||
mkdir -p ~/.config/provisioning/age
|
||||
|
||||
# Generate private key
|
||||
age-keygen -o ~/.config/provisioning/age/private_key.txt
|
||||
|
||||
# Extract public key
|
||||
age-keygen -y ~/.config/provisioning/age/private_key.txt > ~/.config/provisioning/age/public_key.txt
|
||||
|
||||
# Secure the keys
|
||||
chmod 600 ~/.config/provisioning/age/private_key.txt
|
||||
chmod 644 ~/.config/provisioning/age/public_key.txt
|
||||
```
|
||||
|
||||
## Step 5: Configure Environment
|
||||
|
||||
Set up basic environment variables:
|
||||
|
||||
```text
|
||||
# Create environment file
|
||||
cat > ~/.provisioning/env << 'ENVEOF'
|
||||
# Provisioning Environment Configuration
|
||||
export PROVISIONING_ENV=dev
|
||||
export PROVISIONING_PATH=$(pwd)
|
||||
export PROVISIONING_KAGE=~/.config/provisioning/age
|
||||
ENVEOF
|
||||
|
||||
# Source the environment
|
||||
source ~/.provisioning/env
|
||||
|
||||
# Add to shell profile for persistence
|
||||
echo 'source ~/.provisioning/env' >> ~/.bashrc # or ~/.zshrc
|
||||
```
|
||||
|
||||
## Step 6: Initialize Workspace
|
||||
|
||||
Create your first workspace:
|
||||
|
||||
```text
|
||||
# Initialize a new workspace
|
||||
provisioning workspace init my-first-workspace
|
||||
|
||||
# Expected output:
|
||||
# ✓ Workspace 'my-first-workspace' created successfully
|
||||
# ✓ Configuration template generated
|
||||
# ✓ Workspace activated
|
||||
|
||||
# Verify workspace
|
||||
provisioning workspace list
|
||||
```
|
||||
|
||||
## Step 7: Validate Installation
|
||||
|
||||
Run the installation verification:
|
||||
|
||||
```text
|
||||
# Check system configuration
|
||||
provisioning validate config
|
||||
|
||||
# Check all dependencies
|
||||
provisioning env
|
||||
|
||||
# View detailed environment
|
||||
provisioning allenv
|
||||
```
|
||||
|
||||
Expected output should show:
|
||||
|
||||
- ✅ All core dependencies installed
|
||||
- ✅ Age keys configured
|
||||
- ✅ Workspace initialized
|
||||
- ✅ Configuration valid
|
||||
|
||||
## Optional: Install Platform Services
|
||||
|
||||
If you plan to use platform services (orchestrator, control center, etc.):
|
||||
|
||||
```text
|
||||
# Build platform services
|
||||
cd provisioning/platform
|
||||
|
||||
# Build orchestrator
|
||||
cd orchestrator
|
||||
cargo build --release
|
||||
cd ..
|
||||
|
||||
# Build control center
|
||||
cd control-center
|
||||
cargo build --release
|
||||
cd ..
|
||||
|
||||
# Build KMS service
|
||||
cd kms-service
|
||||
cargo build --release
|
||||
cd ..
|
||||
|
||||
# Verify builds
|
||||
ls */target/release/
|
||||
```
|
||||
|
||||
## Optional: Install Platform with Installer
|
||||
|
||||
Use the interactive installer for a guided setup:
|
||||
|
||||
```text
|
||||
# Build the installer
|
||||
cd provisioning/platform/installer
|
||||
cargo build --release
|
||||
|
||||
# Run interactive installer
|
||||
./target/release/provisioning-installer
|
||||
|
||||
# Or headless installation
|
||||
./target/release/provisioning-installer --headless --mode solo --yes
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Nushell Plugin Not Found
|
||||
|
||||
If plugins aren't recognized:
|
||||
|
||||
```text
|
||||
# Rebuild plugin registry
|
||||
nu -c "plugin list; plugin use tera"
|
||||
```
|
||||
|
||||
### Permission Denied
|
||||
|
||||
If you encounter permission errors:
|
||||
|
||||
```text
|
||||
# Ensure proper ownership
|
||||
sudo chown -R $USER:$USER ~/.config/provisioning
|
||||
|
||||
# Check PATH
|
||||
echo $PATH | grep provisioning
|
||||
```
|
||||
|
||||
### Age Keys Not Found
|
||||
|
||||
If encryption fails:
|
||||
|
||||
```text
|
||||
# Verify keys exist
|
||||
ls -la ~/.config/provisioning/age/
|
||||
|
||||
# Regenerate if needed
|
||||
age-keygen -o ~/.config/provisioning/age/private_key.txt
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Once installation is complete, proceed to:
|
||||
→ **[First Deployment](03-first-deployment.md)**
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [Detailed Installation Guide](../user/installation-guide.md)
|
||||
- [Workspace Management](../user/workspace-setup.md)
|
||||
- [Troubleshooting Guide](../user/troubleshooting-guide.md)
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user