Devember, automate all the things!

AI Disclosure:

I will be using an open weights model I run locally to use as a soundboard, to sanity check some yaml or to spit out relevant batch scripts. While I could figure those things out myself, they are not the goal of my Devember.


Automate all the things

I’m running a homelab. I have been for years. Since my professional career started it has been upgraded, expanded, migrated, moved,… A LOT has happened. What I currently have left running is 2 servers. 1 Storage, 1 Compute. 2 Switches. 1 Core, 1 distribution. 2 netapp disk shelves and some PDU’s.
After over a decade of homelabbing, it’s time to put some spit and polish to the whole thing. No more quick fixes, time to do things right!

The problem:
VM’s are created manually, managed manually, not lifecycled and not redundant (yes, yes, it’s 1 machine. It’s not redundant anyways…)
Software is deployed and maintained manually.
None of it is documented

The plan:
Move to IAC tooling like terraform.
Move to orchestration tools like ansible or saltstack.
Move to k8s finally.
Properly set up a proxy in a dmz.
Set up SSO for all my apps.

I’ve been working in some pretty massive corporate environments where i had to set up, maintain, architect or manage many or all of these seperate items. But I’ve never had to do it solo, without a vendor and without experts helping me along or doing things for me. I’ve neglected my homelab, it feels like there are spiderwebs around my cli. Time to get a move on!

I hope to learn a lot about many different toolsets I’m not 100% familiar with. Mainly ansible and keycloak. I’m also looking forward to automate all the things. Having VM’s create themselves and configure themselves after being destroyed has always been magical to me at work. I want that at home too…

Hmmm, i do have a gittea server, … I will be using it to track the changes, to store the environment, but i don’t really want all of my personal VM’s and settings public.. I will figure out how to show and tell after I get atleast 1 of the items on the to-do list ticked off…

2 Likes

If you want a little extra challenge, put everything publicly on codeberg/github/bitbucket. This way, you force yourself to encrypt everything that’s sensitive. Maybe even use gitleaks in your pre-commit hooks to prevent accidental commits.

1 Like

I won’t put it on a public service, but I will make the repo public. My gitea server is publicly accessible anyways.
Great idea!
I might want to integrate secrets using keycloak if that’s possible…. Should be….

This is incredibly unfair, and I would like to retract from receiving any prizes or recognition for what’s happening.

In short: I got access to claude code and fixed everything i wanted within a day.

Long form:

I was struggling with opentofu, getting tokens to take, setting permissions for api keys correctly. Running against a 27B model for debugging and checking the wiki and forums helped, i was able to create the test VM, i bounced the ideas for k8s nodes around and then I thought to give claude code a go…
Terraform, fixed in no time. Ansible? Deployed. HAProxy, currently doing that. CIS benchmarks applied and tested.
Claude was able to do all the heavy lifting, i was able to supervise and check out the yaml and HCL to see how it thought to do it.
I’m still working on it, still in tandem with Opus.

I’ve learned a lot about the way to architect these tools better, the way to move forward with technical problems by watching and keeping a lessons learned tab. I’m not doing the actual coding or writing. That makes me sad in a way. Looking at the progress I’m making on actually doing something usefull with my infra and knowledge, making my rack behave the way I would like it too. It feels like cheating, and it is.

I will provide a nice update on the terraform part first in the coming days. You’ll see a lot of code that i didn’t write, so in that sense it’s a little sad. But you’ll also see the architecture, the VM’s, the way to deploy FCOS and Almalinux on proxmox automagically. …

update, soon!

Or, you delete everything and try to do it again by hand ? That way you can see what you’ve learned from it and what you remembered (hint: probably not a lot unfortunately).