Approach

How the systems fit together

These are the patterns I use at work and at home. The diagrams show the shape of each system and why it is built that way. Addresses, names and credentials are left out on purpose.

01

Delivery: the change is the commit

Nothing reaches a cluster because somebody ran a command. A change is a commit; the pipeline builds and publishes an image; the desired state is updated in Git; a controller notices the difference and closes it. The same path carries applications, infrastructure and configuration.

GitOps delivery pipelineA commit goes to the Git forge, where CI builds and tests it and pushes an image to the registry. The manifests in Git are updated, Argo CD compares Git with the cluster and syncs, and the cluster runs the new version. Drift in the cluster is detected and reverted to what Git says.Commitreviewed changeGit forge + CIbuild, test, scanRegistryversioned imagesManifests in GitKustomize overlaysArgo CDcompare and syncClusterruns what Git saysSource of truth: Git. Nobody deploys by hand.drift is detected and revertedevery step is repeatable and leaves a record
Delivery pipeline. The highlighted box is the only place the desired state is written.

Why

A deployment that is a commit can be reviewed, reverted and audited with tools everyone already knows. It also removes the most fragile part of most platforms: the person who remembers the steps.

In practice

Gitea for source and CI, Harbor as the registry, Kustomize for manifests and Argo CD for sync. At work the same pattern runs on GitLab, Terraform and Rancher or EKS.

The rule

If I do something by hand twice, the third time it becomes code. Legacy scripts become containers; manual changes become pull requests.

02

Platform: layers with one job each

Each layer does one thing and can be rebuilt without touching the layers around it. Kubernetes carries the services that need scheduling and self-healing. A smaller Docker environment sits beside it for development and for workloads that do not suit a cluster.

Platform layersFrom top to bottom: people and devices; an edge layer that terminates TLS and checks sign-in; then a Kubernetes cluster with service-mesh ingress and replicated storage beside a Docker environment for development and special workloads; shared services including identity, registry, source control and databases; and virtualisation and bare metal underneath.People and devicesEdgereverse proxy · TLS · sign-in check before anything is reachedKubernetes clusterservice-mesh ingress · replicated and network storageworkloads declared in GitDocker environmentdevelopment · specialised workloadsShared servicesidentity provider · image registry · source control · databasesVirtualisation and bare metal
Platform layers. Requests enter at the top; every layer below can be replaced on its own.

Why two runtimes

Not everything deserves a cluster. Keeping a plain Docker environment beside Kubernetes means experiments stay cheap and the cluster stays clean.

Storage

Replicated block storage for things that must survive a node, network storage for bulk data. Which one a workload gets is a line in its manifest.

Rebuildable

The platform has been re-architected many times. Because state is declared, a rebuild is a matter of pointing the controller at the same repository.

03

Identity: one front door

Every internal application sits behind the same identity provider. Applications that speak OIDC use it directly. Applications with no login of their own are protected at the reverse proxy, which checks the session before the request is passed on. Adding a service does not add a password.

Single sign-on flowA person makes a request to the reverse proxy. The proxy asks the identity provider whether the session is valid. If it is, the request goes to the application: either an OIDC-aware application that receives the identity, or a plain application that is protected by the proxy alone.Personbrowser or deviceReverse proxychecks every requestIdentity providersigned in? which groups?App that speaks OIDCreceives the identity and applies its own rolesApp with no loginnever sees an unauthenticated request
Single sign-on. The proxy is the one place where access is enforced for everything behind it.

Least privilege

Access is granted to groups, not to people, and services get their own narrowly scoped credentials. Secrets are delivered to workloads, not copied into repositories.

Compliance as a by-product

In federal environments the same habits keep an authority to operate: hardened images, tracked findings and remediation through the build, not by patching running systems.

Kept private

My own environment stores real configuration so it can be rebuilt quickly. That is exactly why its repositories are not public, and why this page stops at the architecture.

04

AI: one endpoint, many models

Tools should not need to know where a model runs. Every client talks to one router, which sends each request to a local model or a cloud model. Memory is its own service, so what an agent learned last month is available to the agent that runs today.

Self-hosted AI stackChat interfaces, coding agents and automations all send requests to a single model router. The router forwards each request to local models running on my own hardware or to cloud models. Agents also read from and write to a separate long-term memory service.Chat interfacesAutomationsCoding and task agentsModel routerone API · keys and limitschooses where a request goesLocal modelsprivate or high-volume workCloud modelswhen a stronger model is worth itLong-term memoryshared by agents
AI stack. Swapping or adding a model is a change to the router, not to every tool that uses it.

Local first where it counts

Private material and bulk work stay on hardware I own. Cloud models are used deliberately, for the tasks where they are clearly better.

Same platform

The AI services are ordinary workloads: declared in Git, deployed by the pipeline, behind single sign-on. No special snowflakes.

Tools

Ollama for local inference, LiteLLM as the router, Open WebUI and ComfyUI as front ends, with agent and memory services alongside.

05

Agents: work that survives the session

I use coding agents heavily, and treat them like capable colleagues who lose their memory every evening. So the memory lives outside them: a tracker holds each project’s brief, plan, decisions and open questions. An agent told “you work on project X” can read that project and carry on.

Agent workflowAn agent reads the project brief, takes the next task, and works on a branch. If a decision belongs to the owner it posts a question to a queue and stops; the owner answers and the task resumes. When it stops, the agent writes a handoff note. Finished work becomes a pull request that a person merges.Read the briefwhat it is, how to run itTake the next taskone at a timeWork on a branchnotes as it goesHand offstate, next step, risksPull requesta person mergesQuestion queuedecision, access or approvalthe agent stops and waitsOwner answersthe task resumesagents never guess at a decision that is mine
Agent workflow. The dashed path is the only way an agent gets a decision from me.

Briefs before code

Every project has one page that says what it is, where it runs, how to build and test it, and what to watch out for. Writing it is the first task.

Questions, not guesses

Scope, trade-offs, access, merges and anything destructive go to a queue I answer. The agent picks up other work in the meantime.

No secrets in the loop

The tracker records where a credential lives, never the credential. Agents work on branches; main is mine.