2026-01-14 04:53:21 +00:00
|
|
|
# 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
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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)
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```toml
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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.):
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# Rebuild plugin registry
|
|
|
|
|
nu -c "plugin list; plugin use tera"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Permission Denied
|
|
|
|
|
|
|
|
|
|
If you encounter permission errors:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# Ensure proper ownership
|
|
|
|
|
sudo chown -R $USER:$USER ~/.config/provisioning
|
|
|
|
|
|
|
|
|
|
# Check PATH
|
|
|
|
|
echo $PATH | grep provisioning
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Age Keys Not Found
|
|
|
|
|
|
|
|
|
|
If encryption fails:
|
|
|
|
|
|
2026-01-14 04:53:58 +00:00
|
|
|
```bash
|
2026-01-14 04:53:21 +00:00
|
|
|
# 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)
|
2026-01-14 04:59:11 +00:00
|
|
|
- [Troubleshooting Guide](../user/troubleshooting-guide.md)
|