Skip to content
Nextr Consulting, home
← Work

Reference project · designed and built by our founder

Bare metal
to GitOps.

One application, six iterations. Each one starts from a real constraint, makes a decision, and accepts a trade-off. Every iteration lives on its own branch, so you can read the code and runbook as they were.

  • 6 stages, from 3 servers to Kubernetes on AWS
  • Live application and Grafana dashboards
  • Code and runbooks for every stage
01

Servers on-prem

3 servers · 6 services

Branch 01-on-prem →

Constraint

A startup with a tight budget, three legacy servers, and six polyglot services plus PostgreSQL ready to ship.

Decision

Deploy on what exists: frontend, backend and database servers, each service as a systemd unit, UFW default-deny rules, rsyslog and logrotate.

Trade-off

Shipped fast with no new spend, but all five backend services share one server: a single point of failure that only scales vertically. Pain points documented to drive the roadmap.

02

Containers

Observability from day one

Branch 02-containers →

Constraint

Manual systemd processes and no visibility into what was running or how it performed.

Decision

Docker Compose with tiered networks and an nginx proxy, plus Prometheus, Grafana, Loki, the OpenTelemetry Collector and cAdvisor, with Locust for load testing.

Trade-off

Reproducible deploys and real metrics, but still one Docker host, manual scaling, and the database left on its own server.

03

Kubernetes on-prem

−65% infrastructure cost

Branch 03-k8s-onprem →

Constraint

One host, no autoscaling during traffic spikes, and new requirements for network segmentation and access control.

Decision

Multi-node Kubernetes with Helm charts for every service, HPA autoscaling, network policies, RBAC and restricted pod security; Redis, RabbitMQ and flagd; Jaeger tracing and public Grafana dashboards.

Trade-off

Rewrote the Orders service from Java to Go for resource efficiency, a real cost paid once. More moving parts to run, still tied to a single data centre.

04

GitOps & CI/CD

6-layer security scanning

Branch 04-gitops-cicd →

Constraint

Manual deployments: slow, error-prone, no audit trail, and vulnerabilities found after release.

Decision

GitLab parent/child pipelines that only build what changed, shared multi-language templates, SAST, secrets, dependency, SonarQube, container and DAST scans, and ArgoCD app-of-apps promoting dev → qa → staging → prod.

Trade-off

Reused an existing ArgoCD rather than a dedicated instance. Mandatory quality gates add friction to every merge in exchange for catching issues before production.

05

AWS with Terraform

9 subnets · 3 AZs

Branch 05-aws-iac →

Constraint

An open brief, “design our production cloud, you decide”, with self-hosted Postgres, Redis and RabbitMQ needing 24/7 care and no disaster recovery.

Decision

Terraform with an S3 backend and state locking: a three-tier VPC in eu-west-3, EKS, RDS Multi-AZ, ElastiCache and AmazonMQ, with Karpenter on spot instances.

Trade-off

Managed services remove operational load but deepen the AWS dependency. A single NAT gateway and t3/t4g instances keep non-production costs down at some cost to availability.

06

Zero-downtime migration

0 downtime · <5 s replication lag

Branch 06-migration →

Constraint

Move production data and traffic to AWS with zero downtime, no data loss and instant rollback.

Decision

A hybrid setup: AWS DMS replicating to RDS, RabbitMQ federation to AmazonMQ, and Cloudflare weighted load balancing shifting traffic 10 → 25 → 50 → 75 → 100% behind health checks.

Trade-off

SSH tunnels and proxies were enough for the proof of concept; production would need a Site-to-Site VPN or Direct Connect.

07

Nigerian cloud

Planned

The next stage moves the platform onto local cloud infrastructure in Nigeria, with data residency and recovery tested end to end. Results will be published here.

Running now.

The application runs with generated traffic, and its dashboards are public. Open them and look around.

Live Grafana dashboard: business metrics of the reference application
Business metricsOpen live →
Live Grafana dashboard: resource utilisation of the reference application
Resource utilisationOpen live →
Live Grafana dashboard: application logs of the reference application
Application logsOpen live →
Live Grafana dashboard: distributed tracing of the reference application
Distributed tracingOpen live →

Lessons from the migration

  1. 01SSH tunnels are fine for a proof of concept. In production, use a Site-to-Site VPN or Direct Connect.
  2. 02RabbitMQ federation is pull-based: consumers must exist on the destination before messages flow.
  3. 03Monitor DMS replication slots closely, and rehearse cutover timing with production-scale data.
  4. 04Session affinity keeps users on a stable backend while traffic weights shift.