๐ Capstone Project: The Self-Service Cloud Engine
Welcome to the definitive Capstone Portfolio Project: The Self-Service Cloud Engine.
This end-to-end project unifies all 8 phases of the curriculum into an enterprise-ready, multi-cloud platform that you can build, deploy, and showcase in staff-level architectural interviews.
- โข The Core Loop: Spotify Backstage Scaffolder → ArgoCD GitOps → Crossplane Managed RDS/VNet → Karpenter Graviton Spot Node → Cilium eBPF L7 Zero-Trust.
- โข Business Impact: Reduced new service time-to-market from 14 days of Jira tickets to 3 minutes self-service; enforced 100% compliance with zero ticket friction.
- โข Architectural Traps: Crossplane finalizer deadlocks upon deletion; Karpenter spot interruption PDB deadlocks; SecretStore CSI cache staleness during RDS credential rotation.
๐ง The Concept (Explain Like Iโm 5: The Automated Cloud Gigafactory)
Imagine how cars used to be built in 1900: every time a customer ordered a car, 10 different workshops had to manually forge the wheels, bolt the engine, paint the frame, and inspect the brakes. It took months, and every car had slightly different bugs.
In most companies today, launching a new microservice works like 1900:
- A developer opens a Jira ticket for a GitHub repo (Wait: 2 days).
- Opens a ticket for an AWS RDS database (Wait: 5 days).
- Opens a ticket for IAM permissions and firewall rules (Wait: 5 days).
- Opens a ticket for DNS and load balancers (Wait: 3 days).
The Self-Service Cloud Engine turns this into a modern Automated Gigafactory:
- The Showroom (Spotify Backstage): The developer fills out a 4-field web form (Service Name, Team, Database Size, Public/Private) and clicks โCreateโ.
- The Blueprint Stamp (GitHub + ArgoCD): Backstage automatically stamps out a Git repository with pre-hardened code, Dockerfile, and Kubernetes manifests. ArgoCD immediately spots the new blueprint.
- The Robot Assembly Line (Crossplane + Karpenter + Cilium): Crossplane builds the AWS RDS database and injects the password into Vault; Karpenter boots an ARM64 Spot server in 40 seconds; Cilium locks down the network with eBPF Zero-Trust.
- The Result: In under 3 minutes, the developer gets a live production URL, a Grafana dashboard, and PagerDuty alertsโwith zero Jira tickets and zero human intervention.
๐ฏ Architectural Mission Statement
Build a zero-touch, developer-centric internal cloud platform where an engineer can request a production-ready, secure, and compliant microservice (including AWS RDS database, Redis cache, CI/CD pipeline, and DNS) via a self-service web portal, and have it fully operational in under 3 minutesโall governed by strict enterprise compliance, immutable Golden AMIs, GitOps, and Zero-Trust eBPF security.
๐บ๏ธ Master Architecture Diagram
flowchart TD
Dev["๐จโ๐ป Application Developer"] -->|"1. Selects Golden Path Template"| IDP["<b>Spotify Backstage (IDP)</b><br/>โข Self-Service Scaffolder<br/>โข Software Catalog & TechDocs"]
subgraph ControlPlanePipeline ["Orchestration & Governance Layer"]
IDP -->|"2. Creates Repo & CI/CD"| Git["๐ GitHub Enterprise Fleet Repo"]
Git -->|"3. Pulls GitOps Commits"| ArgoCD["<b>ArgoCD (App-of-Apps)</b><br/>โข Continuous Reconciliation<br/>โข Sync Waves & Self-Healing"]
ArgoCD -->|"4. Provisions Cloud Resources"| Crossplane["<b>Crossplane Control Plane</b><br/>โข Custom XRDs & Compositions<br/>โข AWS Provider"]
end
subgraph InfrastructureLayer ["Multi-Account AWS Infrastructure"]
Crossplane -->|"5. Provisions Managed DB"| RDS[("AWS RDS PostgreSQL<br/>(Private Subnet, Multi-AZ)")]
subgraph EKSCluster ["โธ๏ธ AWS EKS Workload Fleet"]
Karpenter["<b>Karpenter JIT Autoscaler</b><br/>โข Provisions Graviton Spot Instances<br/>โข Bypasses ASGs"]
Cilium["<b>Cilium eBPF Service Mesh</b><br/>โข Zero-Trust L7 Network Policies<br/>โข mTLS & Hubble Observability"]
WorkloadPod["๐ Microservice Workload Pod<br/>โข IRSA IAM Identity<br/>โข Vault Agent Secrets"]
Karpenter --> WorkloadPod
Cilium --> WorkloadPod
end
ALB["โ๏ธ AWS Application Load Balancer<br/>(Direct Pod IP Routing via AWS VPC CNI)"] --> WorkloadPod
end
subgraph SecurityObservability ["Enterprise DevSecOps & Governance"]
TrivyCosign["Trivy Vulnerability Scan & Cosign Keyless Sign"]
Vault["HashiCorp Vault Dynamic Database Credentials"]
Prometheus["Prometheus, PromQL & Grafana Dashboards"]
ArgoRollouts["Argo Rollouts (Progressive Canary Releases)"]
end
WorkloadPod --> Vault
WorkloadPod --> RDS
Prometheus --> ArgoRollouts
๐ Enterprise Multi-Repository Architecture
In staff-level platform engineering, monolithic code repositories are separated into distinct Git repositories based on ownership and blast radius:
โโโ ๐ข repo: terraform-landing-zones/
โ โโโ root.hcl # Root Terragrunt configuration (S3 backend generator)
โ โโโ core-networking/ # Hub VPC, Transit Gateway, Route 53 Resolvers
โ โโโ workload-accounts/ # Spoke VPCs, IAM Identity Center Permission Sets
โ
โโโ ๐ repo: gitops-fleet/
โ โโโ bootstrap/ # Root ArgoCD App-of-Apps manifests
โ โโโ platform-core/ # Cert-Manager, Cilium CNI, Karpenter, External Secrets
โ โโโ crossplane-definitions/ # XRDs & Compositions (XPostgreSQLInstance)
โ โโโ applications/ # Dynamic ApplicationSets generating 50 workloads
โ
โโโ ๐ฅ๏ธ repo: backstage-portal/
โ โโโ app-config.yaml # Backstage plugins (GitHub, ArgoCD, Datadog, PagerDuty)
โ โโโ rbac-policy.csv # Permission framework role definitions
โ โโโ templates/ # Golden Path Software Templates (Scaffolder YAMLs)
โ
โโโ ๐ฆ repo: workload-skeletons/
โโโ python-fastapi/ # Distroless Dockerfile, Helm chart, GitHub Actions CI
โโโ go-microservice/ # Multi-stage Go build, Kyverno signature verification
๐ฐ FinOps & Cost Optimization Model: Unoptimized vs. Optimized
A core deliverable for a Principal Platform Architect is proving business ROI. Here is the financial derivation of running a 50-microservice platform on AWS:
77% total infrastructure cost reduction across 50 production microservices.
Down from 14 days of cross-team Jira tickets through Backstage + ArgoCD GitOps.
$7,350/mo saved by replacing static on-demand ASGs with Karpenter Graviton Spot.
Aurora Global DB (< 1s lag) + Route 53 DNS ARC + Karpenter rapid fleet surge.
| Infrastructure Component | Unoptimized Legacy Architecture | The Optimized Self-Service Cloud Engine | Monthly Savings |
|---|---|---|---|
| NAT Gateways | 1 per spoke account (50 accounts ร $32.40/mo + data) = $2,800/mo | Single Centralized NAT in Hub VPC + Free S3 Gateway Endpoints = $280/mo | $2,520 / mo (90% cut) |
| Compute Worker Fleet | Static On-Demand ASGs (c5.2xlarge ร 40 nodes) = $9,800/mo | Karpenter JIT Graviton (ARM64) Spot Instances = $2,450/mo | $7,350 / mo (75% cut) |
| Load Balancers | 1 ALB per service (50 ALBs ร $22/mo) = $1,100/mo | Consolidated Ingress Group (group.name: shared-alb) = $88/mo |
$1,012 / mo (92% cut) |
| Ingress/Mesh Overhead | Heavy Istio Envoy sidecars (500 pods ร 250MB RAM = 125GB waste) | Sidecarless Cilium eBPF (Kernel socket routing = ~10GB RAM) | $480 / mo (Memory cut) |
| TOTALS | ~$14,180 / month | ~$3,298 / month | $10,882 / mo ($130,584/yr saved!) |
๐จ Multi-Region Disaster Recovery Runbook (RTO < 15 Min, RPO < 1 Sec)
flowchart TD
Incident["๐จ Region Catastrophe: AWS us-east-1 Control Plane Down"] --> Trigger["Platform Lead initiates Failover Protocol"]
Trigger --> Step1["<b>Step 1: Promote Aurora Global Database</b><br/>aws rds failover-global-cluster --global-cluster-identifier corp-db<br/>(Lag: < 1 second)"]
Step1 --> Step2["<b>Step 2: DNS Failover via Route 53</b><br/>Update Traffic Policy to point 100% traffic to us-west-2 ALB<br/>(TTL: 60s)"]
Step2 --> Step3["<b>Step 3: Karpenter Auto-Scales us-west-2</b><br/>Pending traffic triggers Karpenter to boot 30 Graviton nodes in 45s"]
Step3 --> Recovered["๐ Platform 100% Recovered in Secondary Region in 8 Minutes!"]
๐งญ Step-by-Step Operational Playbook (From Zero to Production)
Follow this beginner-friendly, end-to-end execution playbook to build and verify every layer of the Self-Service Cloud Engine.
Step 1: Provision Enterprise Account Hierarchy & Central Networking (Day 0)
- What & Why: Establish multi-account isolation (
Core-Network,Security,Workloads-Prod) and a centralized Transit Gateway (TGW) so spoke VPCs share a single Egress Inspection VPC and free S3 Gateway Endpoints. - Execute via Terragrunt:
cd terraform-landing-zones/ terragrunt run-all init terragrunt run-all plan terragrunt run-all apply --terragrunt-non-interactive - Verify Routing & Appliance Mode:
# Confirm TGW Inspection Attachment has Appliance Mode enabled (prevents asymmetric stateful firewall drops) aws ec2 describe-transit-gateway-vpc-attachments \ --filters "Name=state,Values=available" \ --query "TransitGatewayVpcAttachments[*].[TransitGatewayAttachmentId,Options.ApplianceModeSupport]"
Step 2: Boot the EKS Cluster, Secondary CNI CIDR & Karpenter Fleet (Day 1 Morning)
- What & Why: Provision EKS with a
/16secondary CG-NAT CIDR (100.64.0.0/16) so pods never exhaust corporate RFC1918 IPs, then install Karpenter to autoscale ARM64 Graviton Spot nodes in under 45 seconds. - Execute:
# 1. Update kubeconfig aws eks update-kubeconfig --name prod-platform-eks --region us-east-1 # 2. Enable AWS VPC CNI Custom Networking & Prefix Delegation kubectl set env daemonset aws-node -n kube-system AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG=true kubectl set env daemonset aws-node -n kube-system ENABLE_PREFIX_DELEGATION=true # 3. Install Karpenter & apply Default Graviton NodePool helm upgrade --install karpenter oci://public.ecr.aws/karpenter/karpenter \ --namespace kube-system --version 1.0.0 --wait kubectl apply -f gitops-fleet/platform-core/karpenter-nodepool.yaml - Verify Node Autoscaling:
kubectl get nodepools,ec2nodeclasses kubectl logs -n kube-system -l app.kubernetes.io/name=karpenter --tail=20
Step 3: Activate Cilium eBPF Zero-Trust Mesh & WireGuard Encryption (Day 1 Afternoon)
- What & Why: Replace legacy
kube-proxyiptableschains with O(1) eBPF socket routing, transparent kernel-level WireGuard mTLS, and Hubble flow visibility. - Execute:
cilium install --version 1.15.5 \ --set kubeProxyReplacement=true \ --set encryption.enabled=true \ --set encryption.type=wireguard \ --set hubble.relay.enabled=true \ --set hubble.ui.enabled=true - Verify eBPF & WireGuard Status:
cilium status --wait hubble status
Step 4: Bootstrap ArgoCD App-of-Apps & Crossplane Control Plane (Day 2 Morning)
- What & Why: Point ArgoCD at the
gitops-fleetrepository so Sync Waves deploy namespaces (Wave -1), Crossplane XRDs/KCL Compositions (Wave 0), databases (Wave 1), and workloads (Wave 2) in strict order. - Execute:
# 1. Install ArgoCD and apply the Root App-of-Apps kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml kubectl apply -f gitops-fleet/bootstrap/root-application.yaml # 2. Verify Crossplane XRD & Composition health kubectl get xrd,compositions - Verify Self-Service Database Claim:
kubectl apply -f gitops-fleet/applications/payments-db-claim.yaml kubectl get postgresqlinstances -n payments-prod -w
Step 5: Launch Backstage Developer Portal & Trigger the 3-Minute Golden Path (Day 2 Afternoon)
- What & Why: Expose the self-service Scaffolder UI to developers, backed by OPA/Kyverno admission policies and Cosign image signature verification.
- Execute & Verify End-to-End Flow:
# 1. Port-forward or access Backstage via Shared ALB Ingress kubectl get ingress -n backstage # 2. After clicking "Create" in Backstage Scaffolder for service "checkout-api": argocd app get checkout-api-prod kubectl get rollouts,pods,svc,ingress -n checkout-api-prod
๐ค Interview Presentation Strategy
When presenting this Capstone in an executive architectural interview:
- Lead with the Business Value: โBefore this engine, provisioning an app took 3 weeks of Jira tickets across 4 teams. With this engine, lead time dropped to 90 seconds while eliminating 100% of hardcoded credentials and saving over $130,000 annually through Karpenter Spot and centralized egress.โ
- Defend your Trade-offs: Be prepared to explain why you chose Cilium eBPF over Istio (sidecar-less memory savings), why you chose Karpenter over Cluster Autoscaler (speed and native Spot orchestration), and why you chose Crossplane over Terraform CI pipelines (declarative Kubernetes reconciliation).