73 lines
No EOL
3.5 KiB
Text
73 lines
No EOL
3.5 KiB
Text
#!/usr/bin/env nu
|
|
|
|
# Demo 3: Hybrid Infrastructure Management
|
|
# Shows on-premises + cloud integration
|
|
# Target audience: Enterprise IT, system architects
|
|
|
|
print "=== Demo 3: Hybrid Infrastructure Management ==="
|
|
|
|
print "\n1. Setting up hybrid infrastructure (on-prem + cloud)..."
|
|
|
|
# Create hybrid infrastructure spanning multiple providers
|
|
print "Creating hybrid setup: on-premises + AWS + edge..."
|
|
run-external "provisioning" generate infra --new "hybrid-demo" --providers "local,aws,edge" --topology hybrid
|
|
|
|
print "\n2. Infrastructure topology:"
|
|
run-external "provisioning" show topology --infra "hybrid-demo" --visual
|
|
|
|
# Simulated topology visualization
|
|
print "\n🏢 Hybrid Infrastructure Topology:"
|
|
print "┌─────────────┐ ┌─────────────┐ ┌─────────────┐"
|
|
print "│ On-Premise │◄──►│ AWS │◄──►│ Edge/IoT │"
|
|
print "│ │ │ │ │ │"
|
|
print "│ • Database │ │ • Web Apps │ │ • Sensors │"
|
|
print "│ • Storage │ │ • API │ │ • Gateways │"
|
|
print "│ • Backup │ │ • CDN │ │ • Analytics │"
|
|
print "└─────────────┘ └─────────────┘ └─────────────┘"
|
|
|
|
print "\n3. Deploying components to optimal locations..."
|
|
|
|
# Deploy database to on-premises for compliance
|
|
run-external "provisioning" taskserv create postgresql --infra "hybrid-demo" --provider local --compliance "data-sovereignty"
|
|
|
|
# Deploy web application to AWS for scalability
|
|
run-external "provisioning" taskserv create web-app --infra "hybrid-demo" --provider aws --auto-scale
|
|
|
|
# Deploy IoT gateway to edge for low latency
|
|
run-external "provisioning" taskserv create iot-gateway --infra "hybrid-demo" --provider edge --latency-optimized
|
|
|
|
print "\n4. Network configuration with VPN mesh:"
|
|
run-external "provisioning" network create --infra "hybrid-demo" --type mesh --encryption wireguard
|
|
|
|
print "\n5. Data flow and compliance:"
|
|
|
|
let data_flows = [
|
|
{source: "IoT Sensors", destination: "Edge Gateway", latency: "5ms", compliance: "✅"},
|
|
{source: "Edge Gateway", destination: "On-Prem DB", latency: "50ms", compliance: "✅ GDPR"},
|
|
{source: "On-Prem DB", destination: "AWS API", latency: "100ms", compliance: "✅ Encrypted"},
|
|
{source: "AWS API", destination: "CDN", latency: "10ms", compliance: "✅"}
|
|
]
|
|
|
|
$data_flows | table
|
|
|
|
print "\n6. Cost optimization across providers:"
|
|
|
|
let cost_breakdown = [
|
|
{component: "Database", location: "On-Premise", cost: "$500/month", reason: "Compliance + Control"},
|
|
{component: "Web Apps", location: "AWS", cost: "$800/month", reason: "Auto-scaling"},
|
|
{component: "IoT Gateway", location: "Edge", cost: "$200/month", reason: "Low latency"},
|
|
{component: "Network", location: "Hybrid", cost: "$300/month", reason: "VPN mesh"}
|
|
]
|
|
|
|
$cost_breakdown | table
|
|
|
|
print "\n7. Monitoring and observability across all environments:"
|
|
run-external "provisioning" monitoring setup --infra "hybrid-demo" --unified-dashboard
|
|
|
|
print "\n8. Disaster recovery strategy:"
|
|
run-external "provisioning" backup create --infra "hybrid-demo" --strategy "3-2-1" --cross-provider
|
|
|
|
print "\n✅ Result: Seamless hybrid operations with unified management"
|
|
print "💰 Cost: 40% savings vs pure cloud (compliance + optimization)"
|
|
print "🛡️ Security: End-to-end encryption, zero-trust networking"
|
|
print "📊 Visibility: Single pane of glass for all environments" |