Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

# 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 several Nushell plugins for enhanced functionality.

Install nu_plugin_tera (Template Rendering)

# Install from crates.io
cargo install nu_plugin_tera

# Register with Nushell
nu -c "plugin add ~/.cargo/bin/nu_plugin_tera; plugin use tera"

Install nu_plugin_kcl (Optional, KCL Integration)

# Install from custom repository
cargo install --git https://repo.jesusperez.pro/jesus/nushell-plugins nu_plugin_kcl

# Register with Nushell
nu -c "plugin add ~/.cargo/bin/nu_plugin_kcl; plugin use kcl"

Verify Plugin Installation

# Start Nushell
nu

# List installed plugins
plugin list

# Expected output should include:
# - tera
# - kcl (if installed)

Step 3: Add CLI to PATH

Make the provisioning command available globally:

# 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:

# 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:

# 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:

# 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:

# 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.):

# 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:

# 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:

# Rebuild plugin registry
nu -c "plugin list; plugin use tera"

Permission Denied

If you encounter permission errors:

# Ensure proper ownership
sudo chown -R $USER:$USER ~/.config/provisioning

# Check PATH
echo $PATH | grep provisioning

Age Keys Not Found

If encryption fails:

# 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

Additional Resources