Case study 02 · Institute challenges 3 and 4 · Jun – Sep 2026
PlanPal is a meeting scheduler with an AI chat. It has a Rust backend, a web app and an iOS app. In a team of three, we put its AWS infrastructure into Terraform, Ansible and Packer. Then I built my own deployment of it on Kubernetes, from a laptop to Amazon EKS.
- When
- Jun – Sep 2026, two challenges
- Team
- Three people each time, with different teammates
- My part
- In the infrastructure, the database tier, network rules, DNS and monitoring. On Kubernetes, one of three parallel deployments, mine end to end.
- Stack
- Terraform, Ansible, Packer, AWS (RDS, ElastiCache, EKS, ECR), Helm, Argo CD, Argo Rollouts, GitLab CI, k6
The problem
Everything in code, then everything in containers
The first brief was that nobody should click in the AWS console. Every resource and every server setting had to be written as code.
The second was that the app should grow with traffic, restart itself when it crashes, and survive a bad release.
01 · Infrastructure as code
Bake once, set up at first boot
The team built staging and production in Terraform, with a tool called Atlantis running every change from a pull request. My part was the database tier and the monitoring stack.
(opens full size in a new tab)What I wrote
- The database module. It creates encrypted PostgreSQL with no public access and 7 days of backups. Production also runs a standby copy and can’t be deleted by accident.
- The first module for network rules, and the private DNS zone.
- The monitoring stack as Ansible roles for Grafana, Alloy, Prometheus, Loki, Tempo, a NATS exporter and OpenVPN. Seven of the thirteen roles on main are mine.
- Machine images that carry no secrets. On first boot the Grafana server fetches its admin password from Secrets Manager, and the VPN server generates its own keys.
- A limit on what servers report. Alloy forwards about 15 kinds of metric and drops the rest, because in the previous challenge one unbounded label took the cohort’s shared Grafana from about 338 series to about 998,000.
- Tests. 37 Python tests for the role templates and 7 Terraform test runs. The Python tests ran locally and were never wired into the pipeline.
- For the iOS app, build settings for each environment and 91 unit tests, with a coverage check at 80%.
Not mine, and not merged
- Teammates built the base network with Atlantis, the load balancer, the auto-scaling module, the image pipeline and the AI summary of each plan.
- My design for one secret per service stayed on a branch. The team chose one shared secret for each environment.
- My fix that makes a new auto-scaled server fetch the current app at boot never merged.
02 · Kubernetes
Three clusters, one set of manifests
Each of the three of us built a separate deployment. Mine went through three clusters.
- ComposeNine services from two images.
- kindOn a laptop, with autoscaling.
- kubeadmThree virtual machines on the group’s Mac mini.
- Amazon EKSA load balancer, a managed database, secrets from AWS, my Helm chart and Argo CD.
The app’s own configuration survived the move to EKS almost unchanged. What changed was every place the platform touches the outside, such as traffic, storage, identity, secrets and images.
(opens full size in a new tab)How a change ships
CI never touches the cluster. It builds an image, tags it with the commit, pushes it to the registry, records that tag in a Git repository, and stops. Argo CD sees the new tag and applies it. Argo Rollouts starts one new pod beside the old ones and waits for me to promote it.
- MergeTo main, in GitLab.
- BuildTests and binaries in one job.
- ImagePushed to the registry, tagged by commit.
- PromoteCI records the tag in Git.
- SyncArgo CD applies it.
- CanaryOne new pod, paused until I promote.
On EKS
- Secrets come from AWS Secrets Manager, so Git holds pointers and never values.
- Pods get AWS credentials without stored keys, through IRSA and EKS Pod Identity.
- One backend image holds all five Rust programs. Each workload picks one.
Backend pipeline · minutes from scratch
18 minutes to test and build the backend from scratch, down from 47
Where the time went
88% of the 47 minutes was compiling. One job built about 590 crates for the tests and another built them again for the release, on a 2-core machine.
What I changed
One job that compiles once, on a larger spot machine. The image step packages the result instead of compiling again.
The caveat
Part of the gain is a machine with twice the CPUs. The timings are from my review deck, not a saved log.
Result
Faster builds, and an app that scales itself
- The backend pipeline takes 18 minutes from scratch, down from 47. The frontend’s went from just over 4 minutes to just over 1.
- Under a load test of 25 users logging in, the API scaled from 2 pods to its cap of 5 with no restarts. The first run had exposed a memory problem, which I fixed.
- CI promoted ten images to the cluster in five days.
Cost
About $330 a month at list price, worked out and not billed. Moving CI to a spot machine took that machine from about $38 to $22 a month, with twice the CPU.
What it doesn’t do
- Only a production environment exists.
- The cluster was created in the console, and its servers are sized by hand.
- A person decides when a canary is promoted. Nothing measures the new version first.
- The API reports itself healthy even when its database is down, so Kubernetes won’t take that pod out of service.
- A teammate wrote the CI checks for commit style, leaked secrets and dependency audits. I built the delivery half.