2025-12-11 21:50:42 +00:00
|
|
|
# CLI Reference
|
|
|
|
|
|
|
|
|
|
Complete command-line reference for Infrastructure Automation. This guide covers all commands, options, and usage patterns.
|
|
|
|
|
|
|
|
|
|
## What You'll Learn
|
|
|
|
|
|
|
|
|
|
- Complete command syntax and options
|
|
|
|
|
- All available commands and subcommands
|
|
|
|
|
- Usage examples and patterns
|
|
|
|
|
- Scripting and automation
|
|
|
|
|
- Integration with other tools
|
|
|
|
|
- Advanced command combinations
|
|
|
|
|
|
|
|
|
|
## Command Structure
|
|
|
|
|
|
|
|
|
|
All provisioning commands follow this structure:
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
provisioning [global-options] <command> [subcommand] [command-options] [arguments]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Global Options
|
|
|
|
|
|
|
|
|
|
These options can be used with any command:
|
|
|
|
|
|
|
|
|
|
| Option | Short | Description | Example |
|
2026-01-12 04:42:18 +00:00
|
|
|
| -------- | ------- | ------------- | --------- |
|
2025-12-11 21:50:42 +00:00
|
|
|
| `--infra` | `-i` | Specify infrastructure | `--infra production` |
|
|
|
|
|
| `--environment` | | Environment override | `--environment prod` |
|
|
|
|
|
| `--check` | `-c` | Dry run mode | `--check` |
|
|
|
|
|
| `--debug` | `-x` | Enable debug output | `--debug` |
|
|
|
|
|
| `--yes` | `-y` | Auto-confirm actions | `--yes` |
|
|
|
|
|
| `--wait` | `-w` | Wait for completion | `--wait` |
|
|
|
|
|
| `--out` | | Output format | `--out json` |
|
|
|
|
|
| `--help` | `-h` | Show help | `--help` |
|
|
|
|
|
|
|
|
|
|
### Output Formats
|
|
|
|
|
|
|
|
|
|
| Format | Description | Use Case |
|
2026-01-12 04:42:18 +00:00
|
|
|
| -------- | ------------- | ---------- |
|
2025-12-11 21:50:42 +00:00
|
|
|
| `text` | Human-readable text | Terminal viewing |
|
|
|
|
|
| `json` | JSON format | Scripting, APIs |
|
|
|
|
|
| `yaml` | YAML format | Configuration files |
|
|
|
|
|
| `toml` | TOML format | Settings files |
|
|
|
|
|
| `table` | Tabular format | Reports, lists |
|
|
|
|
|
|
|
|
|
|
## Core Commands
|
|
|
|
|
|
|
|
|
|
### help - Show Help Information
|
|
|
|
|
|
|
|
|
|
Display help information for the system or specific commands.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# General help
|
|
|
|
|
provisioning help
|
|
|
|
|
|
|
|
|
|
# Command-specific help
|
|
|
|
|
provisioning help server
|
|
|
|
|
provisioning help taskserv
|
|
|
|
|
provisioning help cluster
|
|
|
|
|
|
|
|
|
|
# Show all available commands
|
|
|
|
|
provisioning help --all
|
|
|
|
|
|
|
|
|
|
# Show help for subcommand
|
|
|
|
|
provisioning server help create
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--all` - Show all available commands
|
|
|
|
|
- `--detailed` - Show detailed help with examples
|
|
|
|
|
|
|
|
|
|
### version - Show Version Information
|
|
|
|
|
|
|
|
|
|
Display version information for the system and dependencies.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Basic version
|
|
|
|
|
provisioning version
|
|
|
|
|
provisioning --version
|
|
|
|
|
provisioning -V
|
|
|
|
|
|
|
|
|
|
# Detailed version with dependencies
|
|
|
|
|
provisioning version --verbose
|
|
|
|
|
|
|
|
|
|
# Show version info with title
|
|
|
|
|
provisioning --info
|
|
|
|
|
provisioning -I
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--verbose` - Show detailed version information
|
|
|
|
|
- `--dependencies` - Include dependency versions
|
|
|
|
|
|
|
|
|
|
### env - Environment Information
|
|
|
|
|
|
|
|
|
|
Display current environment configuration and settings.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Show environment variables
|
|
|
|
|
provisioning env
|
|
|
|
|
|
|
|
|
|
# Show all environment and configuration
|
|
|
|
|
provisioning allenv
|
|
|
|
|
|
|
|
|
|
# Show specific environment
|
|
|
|
|
provisioning env --environment prod
|
|
|
|
|
|
|
|
|
|
# Export environment
|
|
|
|
|
provisioning env --export
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Output includes:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- Configuration file locations
|
|
|
|
|
- Environment variables
|
|
|
|
|
- Provider settings
|
|
|
|
|
- Path configurations
|
|
|
|
|
|
|
|
|
|
## Server Management Commands
|
|
|
|
|
|
|
|
|
|
### server create - Create Servers
|
|
|
|
|
|
|
|
|
|
Create new server instances based on configuration.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Create all servers in infrastructure
|
|
|
|
|
provisioning server create --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Dry run (check mode)
|
|
|
|
|
provisioning server create --infra my-infra --check
|
|
|
|
|
|
|
|
|
|
# Create with confirmation
|
|
|
|
|
provisioning server create --infra my-infra --yes
|
|
|
|
|
|
|
|
|
|
# Create and wait for completion
|
|
|
|
|
provisioning server create --infra my-infra --wait
|
|
|
|
|
|
|
|
|
|
# Create specific server
|
|
|
|
|
provisioning server create web-01 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Create with custom settings
|
2026-01-08 09:55:37 +00:00
|
|
|
provisioning server create --infra my-infra --settings custom.ncl
|
2025-12-11 21:50:42 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--check`, `-c` - Dry run mode (show what would be created)
|
|
|
|
|
- `--yes`, `-y` - Auto-confirm creation
|
|
|
|
|
- `--wait`, `-w` - Wait for servers to be fully ready
|
|
|
|
|
- `--settings`, `-s` - Custom settings file
|
|
|
|
|
- `--template`, `-t` - Use specific template
|
|
|
|
|
|
|
|
|
|
### server delete - Delete Servers
|
|
|
|
|
|
|
|
|
|
Remove server instances and associated resources.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Delete all servers
|
|
|
|
|
provisioning server delete --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Delete with confirmation
|
|
|
|
|
provisioning server delete --infra my-infra --yes
|
|
|
|
|
|
|
|
|
|
# Delete but keep storage
|
|
|
|
|
provisioning server delete --infra my-infra --keepstorage
|
|
|
|
|
|
|
|
|
|
# Delete specific server
|
|
|
|
|
provisioning server delete web-01 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Dry run deletion
|
|
|
|
|
provisioning server delete --infra my-infra --check
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--yes`, `-y` - Auto-confirm deletion
|
|
|
|
|
- `--keepstorage` - Preserve storage volumes
|
|
|
|
|
- `--force` - Force deletion even if servers are running
|
|
|
|
|
|
|
|
|
|
### server list - List Servers
|
|
|
|
|
|
|
|
|
|
Display information about servers.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# List all servers
|
|
|
|
|
provisioning server list --infra my-infra
|
|
|
|
|
|
|
|
|
|
# List with detailed information
|
|
|
|
|
provisioning server list --infra my-infra --detailed
|
|
|
|
|
|
|
|
|
|
# List in specific format
|
|
|
|
|
provisioning server list --infra my-infra --out json
|
|
|
|
|
|
|
|
|
|
# List servers across all infrastructures
|
|
|
|
|
provisioning server list --all
|
|
|
|
|
|
|
|
|
|
# Filter by status
|
|
|
|
|
provisioning server list --infra my-infra --status running
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--detailed` - Show detailed server information
|
|
|
|
|
- `--status` - Filter by server status
|
|
|
|
|
- `--all` - Show servers from all infrastructures
|
|
|
|
|
|
|
|
|
|
### server ssh - SSH Access
|
|
|
|
|
|
|
|
|
|
Connect to servers via SSH.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# SSH to server
|
|
|
|
|
provisioning server ssh web-01 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# SSH with specific user
|
|
|
|
|
provisioning server ssh web-01 --user admin --infra my-infra
|
|
|
|
|
|
|
|
|
|
# SSH with custom key
|
|
|
|
|
provisioning server ssh web-01 --key ~/.ssh/custom_key --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Execute single command
|
|
|
|
|
provisioning server ssh web-01 --command "systemctl status nginx" --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--user` - SSH username (default from configuration)
|
|
|
|
|
- `--key` - SSH private key file
|
|
|
|
|
- `--command` - Execute command and exit
|
|
|
|
|
- `--port` - SSH port (default: 22)
|
|
|
|
|
|
|
|
|
|
### server price - Cost Information
|
|
|
|
|
|
|
|
|
|
Display pricing information for servers.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Show costs for all servers
|
|
|
|
|
provisioning server price --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Show detailed cost breakdown
|
|
|
|
|
provisioning server price --infra my-infra --detailed
|
|
|
|
|
|
|
|
|
|
# Show monthly estimates
|
|
|
|
|
provisioning server price --infra my-infra --monthly
|
|
|
|
|
|
|
|
|
|
# Cost comparison between providers
|
|
|
|
|
provisioning server price --infra my-infra --compare
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--detailed` - Detailed cost breakdown
|
|
|
|
|
- `--monthly` - Monthly cost estimates
|
|
|
|
|
- `--compare` - Compare costs across providers
|
|
|
|
|
|
|
|
|
|
## Task Service Commands
|
|
|
|
|
|
|
|
|
|
### taskserv create - Install Services
|
|
|
|
|
|
|
|
|
|
Install and configure task services on servers.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Install service on all eligible servers
|
|
|
|
|
provisioning taskserv create kubernetes --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Install with check mode
|
|
|
|
|
provisioning taskserv create kubernetes --infra my-infra --check
|
|
|
|
|
|
|
|
|
|
# Install specific version
|
|
|
|
|
provisioning taskserv create kubernetes --version 1.28 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Install on specific servers
|
|
|
|
|
provisioning taskserv create postgresql --servers db-01,db-02 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Install with custom configuration
|
|
|
|
|
provisioning taskserv create kubernetes --config k8s-config.yaml --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--version` - Specific version to install
|
|
|
|
|
- `--config` - Custom configuration file
|
|
|
|
|
- `--servers` - Target specific servers
|
|
|
|
|
- `--force` - Force installation even if conflicts exist
|
|
|
|
|
|
|
|
|
|
### taskserv delete - Remove Services
|
|
|
|
|
|
|
|
|
|
Remove task services from servers.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Remove service
|
|
|
|
|
provisioning taskserv delete kubernetes --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Remove with data cleanup
|
|
|
|
|
provisioning taskserv delete postgresql --cleanup-data --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Remove from specific servers
|
|
|
|
|
provisioning taskserv delete nginx --servers web-01,web-02 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Dry run removal
|
|
|
|
|
provisioning taskserv delete kubernetes --infra my-infra --check
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--cleanup-data` - Remove associated data
|
|
|
|
|
- `--servers` - Target specific servers
|
|
|
|
|
- `--force` - Force removal
|
|
|
|
|
|
|
|
|
|
### taskserv list - List Services
|
|
|
|
|
|
|
|
|
|
Display available and installed task services.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# List all available services
|
|
|
|
|
provisioning taskserv list
|
|
|
|
|
|
|
|
|
|
# List installed services
|
|
|
|
|
provisioning taskserv list --infra my-infra --installed
|
|
|
|
|
|
|
|
|
|
# List by category
|
|
|
|
|
provisioning taskserv list --category database
|
|
|
|
|
|
|
|
|
|
# List with versions
|
|
|
|
|
provisioning taskserv list --versions
|
|
|
|
|
|
|
|
|
|
# Search services
|
|
|
|
|
provisioning taskserv list --search kubernetes
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--installed` - Show only installed services
|
|
|
|
|
- `--category` - Filter by service category
|
|
|
|
|
- `--versions` - Include version information
|
|
|
|
|
- `--search` - Search by name or description
|
|
|
|
|
|
|
|
|
|
### taskserv generate - Generate Configurations
|
|
|
|
|
|
|
|
|
|
Generate configuration files for task services.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Generate configuration
|
|
|
|
|
provisioning taskserv generate kubernetes --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Generate with custom template
|
|
|
|
|
provisioning taskserv generate kubernetes --template custom --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Generate for specific servers
|
|
|
|
|
provisioning taskserv generate nginx --servers web-01,web-02 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Generate and save to file
|
|
|
|
|
provisioning taskserv generate postgresql --output db-config.yaml --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--template` - Use specific template
|
|
|
|
|
- `--output` - Save to specific file
|
|
|
|
|
- `--servers` - Target specific servers
|
|
|
|
|
|
|
|
|
|
### taskserv check-updates - Version Management
|
|
|
|
|
|
|
|
|
|
Check for and manage service version updates.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Check updates for all services
|
|
|
|
|
provisioning taskserv check-updates --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Check specific service
|
|
|
|
|
provisioning taskserv check-updates kubernetes --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Show available versions
|
|
|
|
|
provisioning taskserv versions kubernetes
|
|
|
|
|
|
|
|
|
|
# Update to latest version
|
|
|
|
|
provisioning taskserv update kubernetes --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Update to specific version
|
|
|
|
|
provisioning taskserv update kubernetes --version 1.29 --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--version` - Target specific version
|
|
|
|
|
- `--security-only` - Only security updates
|
|
|
|
|
- `--dry-run` - Show what would be updated
|
|
|
|
|
|
|
|
|
|
## Cluster Management Commands
|
|
|
|
|
|
|
|
|
|
### cluster create - Deploy Clusters
|
|
|
|
|
|
|
|
|
|
Deploy and configure application clusters.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Create cluster
|
|
|
|
|
provisioning cluster create web-cluster --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Create with check mode
|
|
|
|
|
provisioning cluster create web-cluster --infra my-infra --check
|
|
|
|
|
|
|
|
|
|
# Create with custom configuration
|
|
|
|
|
provisioning cluster create web-cluster --config cluster.yaml --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Create and scale immediately
|
|
|
|
|
provisioning cluster create web-cluster --replicas 5 --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--config` - Custom cluster configuration
|
|
|
|
|
- `--replicas` - Initial replica count
|
|
|
|
|
- `--namespace` - Kubernetes namespace
|
|
|
|
|
|
|
|
|
|
### cluster delete - Remove Clusters
|
|
|
|
|
|
|
|
|
|
Remove application clusters and associated resources.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Delete cluster
|
|
|
|
|
provisioning cluster delete web-cluster --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Delete with data cleanup
|
|
|
|
|
provisioning cluster delete web-cluster --cleanup --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Force delete
|
|
|
|
|
provisioning cluster delete web-cluster --force --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--cleanup` - Remove associated data
|
|
|
|
|
- `--force` - Force deletion
|
|
|
|
|
- `--keep-volumes` - Preserve persistent volumes
|
|
|
|
|
|
|
|
|
|
### cluster list - List Clusters
|
|
|
|
|
|
|
|
|
|
Display information about deployed clusters.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# List all clusters
|
|
|
|
|
provisioning cluster list --infra my-infra
|
|
|
|
|
|
|
|
|
|
# List with status
|
|
|
|
|
provisioning cluster list --infra my-infra --status
|
|
|
|
|
|
|
|
|
|
# List across all infrastructures
|
|
|
|
|
provisioning cluster list --all
|
|
|
|
|
|
|
|
|
|
# Filter by namespace
|
|
|
|
|
provisioning cluster list --namespace production --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--status` - Include status information
|
|
|
|
|
- `--all` - Show clusters from all infrastructures
|
|
|
|
|
- `--namespace` - Filter by namespace
|
|
|
|
|
|
|
|
|
|
### cluster scale - Scale Clusters
|
|
|
|
|
|
|
|
|
|
Adjust cluster size and resources.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Scale cluster
|
|
|
|
|
provisioning cluster scale web-cluster --replicas 10 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Auto-scale configuration
|
|
|
|
|
provisioning cluster scale web-cluster --auto-scale --min 3 --max 20 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Scale specific component
|
|
|
|
|
provisioning cluster scale web-cluster --component api --replicas 5 --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--replicas` - Target replica count
|
|
|
|
|
- `--auto-scale` - Enable auto-scaling
|
|
|
|
|
- `--min`, `--max` - Auto-scaling limits
|
|
|
|
|
- `--component` - Scale specific component
|
|
|
|
|
|
|
|
|
|
## Infrastructure Commands
|
|
|
|
|
|
|
|
|
|
### generate - Generate Configurations
|
|
|
|
|
|
|
|
|
|
Generate infrastructure and configuration files.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Generate new infrastructure
|
|
|
|
|
provisioning generate infra --new my-infrastructure
|
|
|
|
|
|
|
|
|
|
# Generate from template
|
|
|
|
|
provisioning generate infra --template web-app --name my-app
|
|
|
|
|
|
|
|
|
|
# Generate server configurations
|
|
|
|
|
provisioning generate server --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Generate task service configurations
|
|
|
|
|
provisioning generate taskserv --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Generate cluster configurations
|
|
|
|
|
provisioning generate cluster --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Subcommands:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `infra` - Infrastructure configurations
|
|
|
|
|
- `server` - Server configurations
|
|
|
|
|
- `taskserv` - Task service configurations
|
|
|
|
|
- `cluster` - Cluster configurations
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--new` - Create new infrastructure
|
|
|
|
|
- `--template` - Use specific template
|
|
|
|
|
- `--name` - Name for generated resources
|
|
|
|
|
- `--output` - Output directory
|
|
|
|
|
|
|
|
|
|
### show - Display Information
|
|
|
|
|
|
|
|
|
|
Show detailed information about infrastructure components.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Show settings
|
|
|
|
|
provisioning show settings --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Show servers
|
|
|
|
|
provisioning show servers --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Show specific server
|
|
|
|
|
provisioning show servers web-01 --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Show task services
|
|
|
|
|
provisioning show taskservs --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Show costs
|
|
|
|
|
provisioning show costs --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Show in different format
|
|
|
|
|
provisioning show servers --infra my-infra --out json
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Subcommands:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `settings` - Configuration settings
|
|
|
|
|
- `servers` - Server information
|
|
|
|
|
- `taskservs` - Task service information
|
|
|
|
|
- `costs` - Cost information
|
|
|
|
|
- `data` - Raw infrastructure data
|
|
|
|
|
|
|
|
|
|
### list - List Resources
|
|
|
|
|
|
2026-01-08 09:55:37 +00:00
|
|
|
List resource types (servers, networks, volumes, etc.).
|
2025-12-11 21:50:42 +00:00
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# List providers
|
|
|
|
|
provisioning list providers
|
|
|
|
|
|
|
|
|
|
# List task services
|
|
|
|
|
provisioning list taskservs
|
|
|
|
|
|
|
|
|
|
# List clusters
|
|
|
|
|
provisioning list clusters
|
|
|
|
|
|
|
|
|
|
# List infrastructures
|
|
|
|
|
provisioning list infras
|
|
|
|
|
|
|
|
|
|
# List with selection interface
|
|
|
|
|
provisioning list servers --select
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Subcommands:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `providers` - Available providers
|
|
|
|
|
- `taskservs` - Available task services
|
|
|
|
|
- `clusters` - Available clusters
|
|
|
|
|
- `infras` - Available infrastructures
|
|
|
|
|
- `servers` - Server instances
|
|
|
|
|
|
|
|
|
|
### validate - Validate Configuration
|
|
|
|
|
|
|
|
|
|
Validate configuration files and infrastructure definitions.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Validate configuration
|
|
|
|
|
provisioning validate config --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Validate with detailed output
|
|
|
|
|
provisioning validate config --detailed --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Validate specific file
|
2026-01-08 09:55:37 +00:00
|
|
|
provisioning validate config settings.ncl --infra my-infra
|
2025-12-11 21:50:42 +00:00
|
|
|
|
|
|
|
|
# Quick validation
|
|
|
|
|
provisioning validate quick --infra my-infra
|
|
|
|
|
|
|
|
|
|
# Validate interpolation
|
|
|
|
|
provisioning validate interpolation --infra my-infra
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Subcommands:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `config` - Configuration validation
|
|
|
|
|
- `quick` - Quick infrastructure validation
|
|
|
|
|
- `interpolation` - Interpolation pattern validation
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--detailed` - Show detailed validation results
|
|
|
|
|
- `--strict` - Strict validation mode
|
|
|
|
|
- `--rules` - Show validation rules
|
|
|
|
|
|
|
|
|
|
## Configuration Commands
|
|
|
|
|
|
|
|
|
|
### init - Initialize Configuration
|
|
|
|
|
|
|
|
|
|
Initialize user and project configurations.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Initialize user configuration
|
|
|
|
|
provisioning init config
|
|
|
|
|
|
|
|
|
|
# Initialize with specific template
|
|
|
|
|
provisioning init config dev
|
|
|
|
|
|
|
|
|
|
# Initialize project configuration
|
|
|
|
|
provisioning init project
|
|
|
|
|
|
|
|
|
|
# Force overwrite existing
|
|
|
|
|
provisioning init config --force
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Subcommands:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `config` - User configuration
|
|
|
|
|
- `project` - Project configuration
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--template` - Configuration template
|
|
|
|
|
- `--force` - Overwrite existing files
|
|
|
|
|
|
|
|
|
|
### template - Template Management
|
|
|
|
|
|
|
|
|
|
Manage configuration templates.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# List available templates
|
|
|
|
|
provisioning template list
|
|
|
|
|
|
|
|
|
|
# Show template content
|
|
|
|
|
provisioning template show dev
|
|
|
|
|
|
|
|
|
|
# Validate templates
|
|
|
|
|
provisioning template validate
|
|
|
|
|
|
|
|
|
|
# Create custom template
|
|
|
|
|
provisioning template create my-template --from dev
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Subcommands:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `list` - List available templates
|
|
|
|
|
- `show` - Display template content
|
|
|
|
|
- `validate` - Validate templates
|
|
|
|
|
- `create` - Create custom template
|
|
|
|
|
|
|
|
|
|
## Advanced Commands
|
|
|
|
|
|
|
|
|
|
### nu - Interactive Shell
|
|
|
|
|
|
|
|
|
|
Start interactive Nushell session with provisioning library loaded.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Start interactive shell
|
|
|
|
|
provisioning nu
|
|
|
|
|
|
|
|
|
|
# Execute specific command
|
|
|
|
|
provisioning nu -c "use lib_provisioning *; show_env"
|
|
|
|
|
|
|
|
|
|
# Start with custom script
|
|
|
|
|
provisioning nu --script my-script.nu
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `-c` - Execute command and exit
|
|
|
|
|
- `--script` - Run specific script
|
|
|
|
|
- `--load` - Load additional modules
|
|
|
|
|
|
|
|
|
|
### sops - Secret Management
|
|
|
|
|
|
|
|
|
|
Edit encrypted configuration files using SOPS.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Edit encrypted file
|
2026-01-08 09:55:37 +00:00
|
|
|
provisioning sops settings.ncl --infra my-infra
|
2025-12-11 21:50:42 +00:00
|
|
|
|
|
|
|
|
# Encrypt new file
|
2026-01-08 09:55:37 +00:00
|
|
|
provisioning sops --encrypt new-secrets.ncl --infra my-infra
|
2025-12-11 21:50:42 +00:00
|
|
|
|
|
|
|
|
# Decrypt for viewing
|
2026-01-08 09:55:37 +00:00
|
|
|
provisioning sops --decrypt secrets.ncl --infra my-infra
|
2025-12-11 21:50:42 +00:00
|
|
|
|
|
|
|
|
# Rotate keys
|
2026-01-08 09:55:37 +00:00
|
|
|
provisioning sops --rotate-keys secrets.ncl --infra my-infra
|
2025-12-11 21:50:42 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--encrypt` - Encrypt file
|
|
|
|
|
- `--decrypt` - Decrypt file
|
|
|
|
|
- `--rotate-keys` - Rotate encryption keys
|
|
|
|
|
|
|
|
|
|
### context - Context Management
|
|
|
|
|
|
|
|
|
|
Manage infrastructure contexts and environments.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Show current context
|
|
|
|
|
provisioning context
|
|
|
|
|
|
|
|
|
|
# List available contexts
|
|
|
|
|
provisioning context list
|
|
|
|
|
|
|
|
|
|
# Switch context
|
|
|
|
|
provisioning context switch production
|
|
|
|
|
|
|
|
|
|
# Create new context
|
|
|
|
|
provisioning context create staging --from development
|
|
|
|
|
|
|
|
|
|
# Delete context
|
|
|
|
|
provisioning context delete old-context
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Subcommands:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `list` - List contexts
|
|
|
|
|
- `switch` - Switch active context
|
|
|
|
|
- `create` - Create new context
|
|
|
|
|
- `delete` - Delete context
|
|
|
|
|
|
|
|
|
|
## Workflow Commands
|
|
|
|
|
|
|
|
|
|
### workflows - Batch Operations
|
|
|
|
|
|
|
|
|
|
Manage complex workflows and batch operations.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Submit batch workflow
|
2026-01-08 09:55:37 +00:00
|
|
|
provisioning workflows batch submit my-workflow.ncl
|
2025-12-11 21:50:42 +00:00
|
|
|
|
|
|
|
|
# Monitor workflow progress
|
|
|
|
|
provisioning workflows batch monitor workflow-123
|
|
|
|
|
|
|
|
|
|
# List workflows
|
|
|
|
|
provisioning workflows batch list --status running
|
|
|
|
|
|
|
|
|
|
# Get workflow status
|
|
|
|
|
provisioning workflows batch status workflow-123
|
|
|
|
|
|
|
|
|
|
# Rollback failed workflow
|
|
|
|
|
provisioning workflows batch rollback workflow-123
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Options:**
|
2026-01-08 09:55:37 +00:00
|
|
|
|
2025-12-11 21:50:42 +00:00
|
|
|
- `--status` - Filter by workflow status
|
|
|
|
|
- `--follow` - Follow workflow progress
|
|
|
|
|
- `--timeout` - Set timeout for operations
|
|
|
|
|
|
|
|
|
|
### orchestrator - Orchestrator Management
|
|
|
|
|
|
|
|
|
|
Control the hybrid orchestrator system.
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Start orchestrator
|
|
|
|
|
provisioning orchestrator start
|
|
|
|
|
|
|
|
|
|
# Check orchestrator status
|
|
|
|
|
provisioning orchestrator status
|
|
|
|
|
|
|
|
|
|
# Stop orchestrator
|
|
|
|
|
provisioning orchestrator stop
|
|
|
|
|
|
|
|
|
|
# Show orchestrator logs
|
|
|
|
|
provisioning orchestrator logs
|
|
|
|
|
|
|
|
|
|
# Health check
|
|
|
|
|
provisioning orchestrator health
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Scripting and Automation
|
|
|
|
|
|
|
|
|
|
### Exit Codes
|
|
|
|
|
|
|
|
|
|
Provisioning uses standard exit codes:
|
|
|
|
|
|
|
|
|
|
- `0` - Success
|
|
|
|
|
- `1` - General error
|
|
|
|
|
- `2` - Invalid command or arguments
|
|
|
|
|
- `3` - Configuration error
|
|
|
|
|
- `4` - Permission denied
|
|
|
|
|
- `5` - Resource not found
|
|
|
|
|
|
|
|
|
|
### Environment Variables
|
|
|
|
|
|
|
|
|
|
Control behavior through environment variables:
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Enable debug mode
|
|
|
|
|
export PROVISIONING_DEBUG=true
|
|
|
|
|
|
|
|
|
|
# Set environment
|
|
|
|
|
export PROVISIONING_ENV=production
|
|
|
|
|
|
|
|
|
|
# Set output format
|
|
|
|
|
export PROVISIONING_OUTPUT_FORMAT=json
|
|
|
|
|
|
|
|
|
|
# Disable interactive prompts
|
|
|
|
|
export PROVISIONING_NONINTERACTIVE=true
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Batch Operations
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Example batch script
|
|
|
|
|
|
|
|
|
|
# Set environment
|
|
|
|
|
export PROVISIONING_ENV=production
|
|
|
|
|
export PROVISIONING_NONINTERACTIVE=true
|
|
|
|
|
|
|
|
|
|
# Validate first
|
|
|
|
|
if ! provisioning validate config --infra production; then
|
|
|
|
|
echo "Configuration validation failed"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Create infrastructure
|
|
|
|
|
provisioning server create --infra production --yes --wait
|
|
|
|
|
|
|
|
|
|
# Install services
|
|
|
|
|
provisioning taskserv create kubernetes --infra production --yes
|
|
|
|
|
provisioning taskserv create postgresql --infra production --yes
|
|
|
|
|
|
|
|
|
|
# Deploy clusters
|
|
|
|
|
provisioning cluster create web-app --infra production --yes
|
|
|
|
|
|
|
|
|
|
echo "Deployment completed successfully"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### JSON Output Processing
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Get server list as JSON
|
|
|
|
|
servers=$(provisioning server list --infra my-infra --out json)
|
|
|
|
|
|
|
|
|
|
# Process with jq
|
|
|
|
|
echo "$servers" | jq '.[] | select(.status == "running") | .name'
|
|
|
|
|
|
|
|
|
|
# Use in scripts
|
|
|
|
|
for server in $(echo "$servers" | jq -r '.[] | select(.status == "running") | .name'); do
|
|
|
|
|
echo "Processing server: $server"
|
|
|
|
|
provisioning server ssh "$server" --command "uptime" --infra my-infra
|
|
|
|
|
done
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Command Chaining and Pipelines
|
|
|
|
|
|
|
|
|
|
### Sequential Operations
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Chain commands with && (stop on failure)
|
|
|
|
|
provisioning validate config --infra my-infra && \
|
|
|
|
|
provisioning server create --infra my-infra --check && \
|
|
|
|
|
provisioning server create --infra my-infra --yes
|
|
|
|
|
|
|
|
|
|
# Chain with || (continue on failure)
|
|
|
|
|
provisioning taskserv create kubernetes --infra my-infra || \
|
|
|
|
|
echo "Kubernetes installation failed, continuing with other services"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Complex Workflows
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Full deployment workflow
|
|
|
|
|
deploy_infrastructure() {
|
|
|
|
|
local infra_name=$1
|
|
|
|
|
|
|
|
|
|
echo "Deploying infrastructure: $infra_name"
|
|
|
|
|
|
|
|
|
|
# Validate
|
|
|
|
|
provisioning validate config --infra "$infra_name" || return 1
|
|
|
|
|
|
|
|
|
|
# Create servers
|
|
|
|
|
provisioning server create --infra "$infra_name" --yes --wait || return 1
|
|
|
|
|
|
|
|
|
|
# Install base services
|
|
|
|
|
for service in containerd kubernetes; do
|
|
|
|
|
provisioning taskserv create "$service" --infra "$infra_name" --yes || return 1
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Deploy applications
|
|
|
|
|
provisioning cluster create web-app --infra "$infra_name" --yes || return 1
|
|
|
|
|
|
|
|
|
|
echo "Deployment completed: $infra_name"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Use the function
|
|
|
|
|
deploy_infrastructure "production"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Integration with Other Tools
|
|
|
|
|
|
|
|
|
|
### CI/CD Integration
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# GitLab CI example
|
|
|
|
|
deploy:
|
|
|
|
|
script:
|
|
|
|
|
- provisioning validate config --infra production
|
|
|
|
|
- provisioning server create --infra production --check
|
|
|
|
|
- provisioning server create --infra production --yes --wait
|
|
|
|
|
- provisioning taskserv create kubernetes --infra production --yes
|
|
|
|
|
only:
|
|
|
|
|
- main
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Monitoring Integration
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Health check script
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# Check infrastructure health
|
|
|
|
|
if provisioning health check --infra production --out json | jq -e '.healthy'; then
|
|
|
|
|
echo "Infrastructure healthy"
|
|
|
|
|
exit 0
|
|
|
|
|
else
|
|
|
|
|
echo "Infrastructure unhealthy"
|
|
|
|
|
# Send alert
|
|
|
|
|
curl -X POST https://alerts.company.com/webhook \
|
|
|
|
|
-d '{"message": "Infrastructure health check failed"}'
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Backup Automation
|
|
|
|
|
|
2026-01-14 01:56:30 +00:00
|
|
|
```
|
2025-12-11 21:50:42 +00:00
|
|
|
# Backup script
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
DATE=$(date +%Y%m%d_%H%M%S)
|
|
|
|
|
BACKUP_DIR="/backups/provisioning/$DATE"
|
|
|
|
|
|
|
|
|
|
# Create backup directory
|
|
|
|
|
mkdir -p "$BACKUP_DIR"
|
|
|
|
|
|
|
|
|
|
# Export configurations
|
|
|
|
|
provisioning config export --format yaml > "$BACKUP_DIR/config.yaml"
|
|
|
|
|
|
|
|
|
|
# Backup infrastructure definitions
|
|
|
|
|
for infra in $(provisioning list infras --out json | jq -r '.[]'); do
|
|
|
|
|
provisioning show settings --infra "$infra" --out yaml > "$BACKUP_DIR/$infra.yaml"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
echo "Backup completed: $BACKUP_DIR"
|
|
|
|
|
```
|
|
|
|
|
|
2026-01-12 04:42:18 +00:00
|
|
|
This CLI reference provides comprehensive coverage of all provisioning commands. Use it as your primary reference for command syntax, options, and
|
|
|
|
|
integration patterns.
|