Engineering Overview · On-Prem Dev Platform Platform briefing →

Engineering Overview

How the platform is built: the layered architecture, the technology choices, the phased build sequence, and the quality gates that keep every change honest. This page is for the people who will read the code, run the playbooks, and extend the pattern.

Architecture

Six layers, strict dependency rules

The platform is built as layers. Each depends only on the layers beneath it. Independent pieces stay compatible because the contracts between layers are fixed before build begins.

L0Power & installPXE boot and unattended OS install — no keyboard, no console
L1VirtualisationProxmox VE hypervisors running all workloads in virtual machines
L2Network policypfSense firewall with zone-based rules generated from one policy source
L3HardeningCIS benchmark applied via Ansible, re-scanned on schedule for drift
L4Platform servicesIdentity (Authentik), secrets (Vault), PKI, monitoring, container management
L5WorkloadsApplication services, each onboarded through a readiness checklist

Two golden rules: a layer never depends on anything above it (so a rebuild can never deadlock), and logic is generic while specifics live in data files (so moving to different hardware means editing inventory, not rewriting roles).

Network facts, host inventory, and zone definitions each exist in exactly one machine-readable file. Firewall rules, virtualisation checks, and service placement are generated from that source — they cannot quietly disagree.

Tech stack

Proven, open, pinned

Every tool is a design-level choice, stated openly. Only the deployment data behind them is private. Dependencies are pinned by digest or version and tracked against upstream releases within defined windows.

LayerToolRole
L0–L1Proxmox VEHypervisor — headless install via PXE, all workloads virtualised
L2pfSenseFirewall and network policy engine — rules generated from code
L0–L5Ansible + VaultIaC engine — playbooks, roles, encrypted secrets (ansible-vault)
L3CIS BenchmarksHost hardening via ansible-lockdown, continuous compliance scanning
L4AuthentikIdentity provider — MFA, SSO (phased rollout), lifecycle management
L4HashiCorp VaultSecrets management, internal PKI and certificate authority
L4–L5Podman / DockerContainer runtimes — images scanned and deployed by digest
L4Wazuh + SuricataSIEM and network intrusion detection — survives failover
CIGitHub Actions + GHCRAutomation, container registry — off-platform, publicly auditable
CITrivyImage and IaC vulnerability scanning in CI

Assurance frameworks mapped (not just cited): UK Secure by Design, CIS Benchmarks, OWASP Top 10, and MITRE ATT&CK + ATLAS.

Repository architecture

Three-repo split

The pattern, the deployment data, and the evidence each live in a separate repository. This boundary is load-bearing: it enforces the public/private separation and ensures compliance evidence survives a full rebuild.

Public pattern

Roles, playbooks, templates, documentation, CI workflows. Contains pattern only — no addresses, secrets, or deployment specifics.

public

Private overlay

Host inventory, network data, encrypted secrets (ansible-vault). Layered at a gitignored path over the pattern repo.

private

Evidence store

Gate output, scan results, compliance records. Stored off-platform so the record survives a full reroll.

private · off-platform
The public repo is monitored by layered leak controls: automated scanners, custom deny-list patterns, code-owner review on all paths, and periodic human review as the primary signal.

Build sequence

Foundations first, services last

The build is strictly sequenced: each phase depends on the one before it. The same sequence is drilled as the disaster-recovery reroll — if it rebuilds unattended, the design is proven.

1 · ProvisionMachines PXE boot and install themselves unattended
2 · NetworkFirewall and zone policies come up alongside a temporary build network
3 · VerifyConnectivity through the new network is proven before cutover
4 · Cut overHosts move to production network; build path is retired
5 · RotateEvery credential used during build is rotated — build-time secrets are now useless
6 · HardenCIS benchmark applied and audited; failure blocks progress
7 · ServicesIdentity, secrets management, monitoring, and container platform come up
8 · WorkloadsApplication services deploy; critical data restored from encrypted backup

Amber steps are verification gates — the sequence stops on failure rather than proceeding. Destructive steps are double-gated: an explicit confirmation flag and an environment lock that refuses to run against the wrong target.

Quality gates

Every change is scanned before merge

CI checks are required, not advisory. A red check blocks the pull request from merging. No human override, no fast lane.

pre-commit
Formatting, linting, and hygiene checks run locally before code leaves your machine.
local · on every commit
gitleaks
Scans for committed secrets, tokens, API keys, and private keys. Blocks the merge on any finding.
secret-scan.yml
semgrep
Static analysis including MITRE ATLAS rules for AI/ML-specific risks. Custom rules for the project's deny patterns.
semgrep.yml
Trivy
Container image scanning for known CVEs. Runs against every image built in CI.
container-scan.yml
weekly audit
Scheduled full-repository security sweep. Catches drift that incremental scans miss.
repository-audit.yml
branch protection
Required status checks, conventional commits, code-owner review on all paths. One branch, one PR per unit of work.
repo settings
The gate output is written to the private evidence store, not just the CI log. Reviewers independent of the author can audit the record at any time.

Security model

Deny by default, prove continuously

The network is divided into isolated zones. No zone talks to another unless a written rule allows that specific flow. Rules are generated from a single policy source, applied to both the primary and standby appliance.

ManagementAdmin only, MFA enforced
User & devDay-to-day, no admin reach
ServicesPlatform and workloads
AI workloadsApproved API traffic only
Lab / testWalled off from everything
UntrustedQuarantined by default

CIS hardening gates every merge

Hosts are benchmarked on every change. Live hosts are re-scanned on schedule — drift raises an alert and writes to the evidence record.

Identity lifecycle

MFA mandatory for privileged access. Recorded approval, quarterly review, offboarding that provably removes every key — from one authoritative access file.

Secrets encrypted at rest

Ansible-vault for deployment secrets. HashiCorp Vault for runtime secrets and internal PKI. Automated leak checks guard the public repo.

External control plane

Apply-credentials live off-platform. Changes push from an admin workstation. Compromising the platform does not grant the keys to it.

Zone names describe roles; the full model and per-flow rules live in the policy source. Deployment specifics are intentionally not published.

Adoption

Two paths to stand this up

The pattern is designed for reuse. Pick the path that fits how you intend to run it.

Overlay-nested recommended

Keep the pattern upstream. Layer a private overlay (inventory, secrets) at a gitignored path. You receive upstream fixes and the public/private boundary stays clean. Best for long-lived deployments.

Template fork

Use "Use this template" to generate a private copy and edit in place. Simpler for a single lab, but you diverge from upstream. The copy must stay private.

Either way, retarget hardware by swapping inventory — no role edits. The pattern contains no addresses, secrets, or deployment specifics.

Success criteria

Measured, not asserted

Twelve-month targets drawn from the specification. Each has a concrete test.

≤ 4hBare metal to healthy, including data restore
≤ 1 dayNew service onboarded, request to productive
≤ 30 minOperator effort per onboard
0Leaks in the public repo
PromiseHow it is proven
Rebuilds unattendedScheduled reroll drills complete with no manual step beyond declared power actions
Hardening holdsCIS post-audit gate blocks a merge on control failure; drift caught by scheduled live scans
Evidence is credibleEvidence pack passes review by an assessor independent of the author
Pattern is portableStood up at least once on non-reference hardware by inventory swap alone
Policy breaks are caughtAn intentional policy break fails the automated checks as designed