6.3 KiB
Examples
Real-world infrastructure as code examples demonstrating Provisioning across multi-cloud, Kubernetes, security, and operational scenarios.
Overview
This section contains production-ready examples showing how to:
- Deploy infrastructure from basic single-cloud to complex multi-cloud environments
- Orchestrate Kubernetes clusters with Provisioning automation
- Implement security patterns including encryption, secrets management, and compliance
- Build custom workflows for specialized infrastructure operations
- Handle disaster recovery with backup strategies and failover procedures
- Optimize costs through resource analysis and right-sizing
- Migrate legacy systems from traditional infrastructure to cloud-native architectures
- Test infrastructure as code with validation, policy checks, and integration tests
All examples use Nickel for type-safe configuration and are designed as learning resources and templates for your own deployments.
Quick Start Examples
Basic Infrastructure Setup
-
Basic Setup - Single-cloud with networking, compute, storage - perfect starting point
-
E-Commerce Platform - Multi-tier application across AWS and UpCloud with load balancing, databases
Multi-Cloud Deployments
-
Multi-Cloud Deployment - Deploy across AWS, UpCloud, Hetzner with provider abstraction
-
Kubernetes Deployment - Kubernetes clusters, workloads, networking, operators via Nickel
-
Machine Learning Infrastructure
- Training clusters, GPU resources, features, inference services
-
Hybrid Cloud Setup - Hub-and-spoke architecture connecting on-premise and cloud
Operational Examples
-
Disaster Recovery Drills - Database failover, complete infrastructure failover, backup recovery testing procedures.
-
FinOps Cost Governance - Budget frameworks, cost monitoring, chargeback models, and cost optimization strategies.
-
Legacy System Migration - Zero-downtime migration with gradual traffic cutover (5% → 100%).
Advanced Patterns
-
Batch Workflow Orchestration - DAG scheduling, parallel execution, conditional logic, error handling.
-
Advanced Networking - Load balancing, service mesh, DNS management, zero-trust architecture.
-
GitOps Infrastructure Deployment - GitHub Actions, automated reconciliation, drift detection, audit trails.
-
Secrets Rotation Strategy - Passwords, API keys, certificates with zero-downtime rotation.
Security and Compliance
-
Compliance and Audit - SOC2, GDPR, HIPAA, PCI-DSS compliance with audit logging.
-
Security Examples - Encryption, authentication, MFA, secrets management, and audit patterns.
-
Infrastructure as Code Testing - Syntax validation, schema checks, policy compliance, unit and integration tests.
Cloud Provider Specific
-
AWS Deployment Guide - EC2, RDS, S3, VPC, Load Balancers, IAM with cost optimization.
-
UpCloud Deployment Guide - Compute, Storage, Networking, Backups with managed services.
-
Hetzner Deployment Guide - Dedicated servers, cloud infrastructure, networking with cost efficiency.
-
Kubernetes Examples - Deployments, StatefulSets, DaemonSets, Jobs, Custom Resources, Operators.
Configuration and Migration
-
Terraform to Nickel Migration - Convert existing Terraform HCL to Nickel type-safe configuration with validation examples.
-
KCL to Nickel Migration - Upgrade from deprecated KCL to Nickel with schema examples and best practices.
Example Organization
Each example follows this structure:
example-name.md
├── Overview - What this example demonstrates
├── Prerequisites - Required setup
├── Architecture Diagram - Visual representation
├── Nickel Configuration - Complete, runnable configuration
├── Deployment Steps - Command-by-command instructions
├── Verification - How to validate deployment
├── Troubleshooting - Common issues and solutions
└── Next Steps - How to extend or customize
Learning Paths
I'm new to Provisioning
- Start with Basic Setup
- Read Real-World Scenario
- Try Kubernetes Deployment
I need multi-cloud infrastructure
- Review Multi-Cloud Deployment
- Study Hybrid Cloud Setup
- Implement Advanced Networking
I need to migrate existing infrastructure
- Start with Legacy System Migration
- Add Terraform Migration if applicable
- Set up GitOps Deployment
I need enterprise features
- Implement Compliance and Audit
- Set up Disaster Recovery
- Deploy Cost Governance
- Configure Secrets Rotation
Copy and Customize
All examples are self-contained and can be:
- Copied into your workspace and adapted
- Extended with additional resources and customizations
- Tested using Provisioning's validation framework
- Deployed directly via
provisioning apply
Use them as templates, learning resources, or reference implementations for your own infrastructure.
Related Documentation
- Configuration Guide → See
provisioning/docs/src/infrastructure/nickel-guide.md - API Reference → See
provisioning/docs/src/api-reference/ - Development → See
provisioning/docs/src/development/ - Operations → See
provisioning/docs/src/operations/