Blog

Lernreise 3/7: Teaching a Machine to Build Machines

Lernreise 3/7: Teaching a Machine to Build Machines

Before this week, I had never used OpenTofu. I knew it was a Terraform fork, I had seen it mentioned in the same breath as infrastructure as code, and that was roughly where my knowledge ended.

Ansible I knew slightly better, in the way that you know a neighbour’s name without having had a proper conversation. I was aware of what it does. I had never sat down and done it.

These are not tools for the uninitiated. They reward people who already have a clear mental model of their infrastructure, a tolerance for YAML, and enough experience to know when the tool is fighting them and when they are fighting the tool. I had the infrastructure mental model. The rest I was going to have to learn by doing.


The goal for this first phase was specific: spin up a new LXC container on Proxmox, install ChromaDB inside it, and have the whole thing provisioned and documented without manual clicking through the Proxmox UI.

ChromaDB would serve as the vector database for the RAG pipeline I was planning. More on that tomorrow. First, the infrastructure.

I set up two files that would guide the AI throughout the project: a skill.md describing what we were building and what decisions had already been made, and a context.md that gave the AI explicit instructions about how to work. One of those instructions was important enough that I am going to mention it specifically: the AI was asked to document everything it did in the Gitea wiki, in a format that would be useful to read later.

I included that instruction because documentation in IT projects is famously where good intentions go to die. Every project I have ever worked on has a wiki page created on day one and a wiki page that has not been touched since day three. I wanted to see whether an AI, given an explicit mandate to document as it went, would actually do it.

It did. Properly. The wiki entries it wrote were clear, structured, and explained the reasoning behind the choices, not just the commands that were run. I found myself reading them and learning things I had not quite absorbed while watching the commands execute.


The speed was the other thing that surprised me. The first container was provisioned and running faster than I expected, certainly faster than if I had clicked through the Proxmox web interface myself. OpenTofu turned out to be more approachable than I had feared. The declarative model clicks into place fairly quickly once you have seen a few resource blocks.

Then the first real problem.

ChromaDB and Alpine Linux are not compatible. Not “slightly awkward to configure” incompatible. Simply: it does not work. This was not something the AI flagged before choosing Alpine as the container OS. It became apparent after the fact, in the form of dependency errors that no amount of creative package management would resolve.

It would have been helpful to know this beforehand.

We rebuilt on Ubuntu. It worked without drama. The ChromaDB instance came up, the API was accessible, and we had a vector database sitting in a fresh LXC container on Proxmox, provisioned by code, documented in the wiki.


A small note on what this feels like from the inside: it is not magic. The AI does not know your infrastructure. You have to tell it. You have to correct it when it makes assumptions that do not match your environment. The Alpine incident was a good example of this. The AI was not wrong about anything it knew; it simply did not know what it did not know, and neither did I.

What it does very well is maintain state across a complex task. It applies naming conventions and network addresses consistently. Worth noting: the network inventory it referenced was itself AI-generated — the AI had documented the homelab as it built it, then used that documentation as context for subsequent steps. The whole thing was somewhat recursive. For an IT generalist working alone, that consistency is genuinely valuable. I am the person most likely to forget what I called something two days ago.


← Lernreise 2/7: The Starting Point: A Thousand Untagged Documents  ·  Lernreise 4/7: The Grand Plan: RAG, Vectors, and a 7-Cent Bargain →

Lernreise 3/7 of 7. Follow the lernreise tag for the full series.