From ab2fbe45331236ddb4d3cbb2e1bfc3964757ec88 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Wed, 15 May 2024 12:08:46 -0500 Subject: my kubernetes adventure Signed-off-by: Xe Iaso --- lume/src/_components/XeblogConv.tsx | 4 +- lume/src/_includes/blog.njk | 8 +- lume/src/blog/2024/homelab-v2.mdx | 1326 ++++++++++++++++++++++++++++ lume/src/notes/2024/homelab-v2/05.mdx | 4 +- lume/src/static/blog/cert-manager-flow.svg | 1 + 5 files changed, 1337 insertions(+), 6 deletions(-) create mode 100644 lume/src/blog/2024/homelab-v2.mdx create mode 100644 lume/src/static/blog/cert-manager-flow.svg diff --git a/lume/src/_components/XeblogConv.tsx b/lume/src/_components/XeblogConv.tsx index 45443d7..5d783b9 100644 --- a/lume/src/_components/XeblogConv.tsx +++ b/lume/src/_components/XeblogConv.tsx @@ -15,14 +15,14 @@ const ConvSnippet = ({ }: XeblogConvProps) => { const nameLower = name.toLowerCase(); name = name.replace(" ", "_"); - const size = standalone ? 128 : 64; + const size = standalone ? 256 : 128; return ( <>
{`${name} -

{{title}}

-

+

{{title}}

+

Published on , {{ readingInfo.words }} words, {{ readingInfo.minutes }} minutes to read

+ {% if desc %} +

{{desc}}

+ {% endif %} + {% if patronExclusive %}

This content is exclusive to my patrons. If you are not a patron, please don't be the reason I need to make a process more complicated than the honor system. This will be made public in the future, once the series is finished.

diff --git a/lume/src/blog/2024/homelab-v2.mdx b/lume/src/blog/2024/homelab-v2.mdx new file mode 100644 index 0000000..962ba36 --- /dev/null +++ b/lume/src/blog/2024/homelab-v2.mdx @@ -0,0 +1,1326 @@ +--- +title: "Rebuilding my homelab: Suffering as a service" +desc: With additional Kubernetes mode! +date: 2024-05-15 +tags: + - Homelab + - RockyLinux + - FedoraCoreOS + - TalosLinux + - Kubernetes + - Ansible + - Longhorn + - Nginx + - CertManager + - ExternalDNS +hero: + ai: "Photo by Xe Iaso, Canon EOS R6 mark II with a Rokinon Cine DSX 85mm T1.5 lens" + file: ../xedn/dynamic/766623e0-26d1-4068-9a63-a91d274f23d0 + prompt: "A field of dandelion flowers in the sun, heavy depth of field. A thin strip of the field is in focus, the rest is a blur." +--- + +I have a slight problem where I have too many computers in my office. These extra computers are my [homelab](https://www.reddit.com/r/homelab/), or a bunch of slack compute that I can use to run various workloads at home. I use my homelab to have a place to "just run things" like [Plex](https://plex.tv) and the whole host of other services that I either run or have written for my husband and I. + + + I want to have my own platform so that I can run things that I used to run in + the cloud. If I can "just run things locally", I can put my slack compute + space to work for good. This can help me justify the power bill of these nodes + to my landlord! + + +Really, I just wanna be able to use this to mess around, try new things, and turn the fruit of those experiments into blogposts like this one. Until very recently, everything in my homelab ran NixOS. [A friend of mine](https://fasterthanli.me) has been goading me into trying Kubernetes again, and in a moment of weakness, I decided to see how bad the situation was to get Kubernetes running on my own hardware at home. + +- `kos-mos`, a small server that I use for running some CI things and periphery services. It has 32 GB of ram and a Core i5-10600. +- `ontos`, identical to `kos-mos` but with an RTX 2060 6 GB. +- `logos`, identical to `kos-mos` but with a RTX 3060 12 GB. +- `pneuma`, my main shellbox and development machine. It is a handbuilt tower PC with 64 GB of ram and a Ryzen 9 5900X. It has a GPU (AMD RX5700 non-XT w/8GB of vram) because the 5900X doesn't have integrated graphics. It has a bunch of random storage devices in it. It also handles the video transcoding for xesite video uploads. +- `itsuki`, the NAS. It has all of our media and backups on it. It runs Plex and a few other services, mostly managed by docker compose. It has 16 GB of ram and a Core i5-10600. +- `chrysalis`, an old Mac Pro from 2013 that I mostly use as my Prometheus server. It has 32 GB of ram and a Xeon E5-1650. It also runs the IRC bot `[Mara]` in `#xeserv` on Libera.chat (it announces new posts on my blog). It's on its last legs in multiple ways, but it works for now. I've been holding off on selling it because I won it in a competition involving running an IRC network in Docker containers. Sentimental value is a bitch, eh? + + + When the homelab was built, the Core i5-10600 was a "last generation" + processor. It also met a perfect balance between compute oomph, onboard iGPU + support, power usage, and not requiring a massive cooler to keep it running + happily. We could probably get some more use out of newer processors, but that + will probably have to wait for one or more of our towers/their parts to get + cycled out in regular upgrades. That probably won't happen for a year or two, + but it'll be nice to get a Ryzen 9 5950x or two into the cluster eventually. + + +Of these machines, `kos-mos` is the easiest to deal with because it normally doesn't have any services dedicated to it. In the past, I had to move some workloads off of it for various reasons. + +I have no plans to touch my shellbox or the NAS, those have complicated setups that I don't want to mess with. I'm okay with my shellbox being different because that's where I do a lot of development and development servers are almost always vastly different from production servers. I'm also scared to touch the NAS because that has all my media on it and I don't want to risk losing it. It has more space than the rest of the house combined. + +A rebuild of the homelab is going to be a fair bit of work. I'm going to have to take this one piece at a time and make sure that I don't lose anything important. + + + Foreshadowing is a literary technique in which... + + +This post isn't going to be like my other posts. This is a synthesis of a few patron-exclusive notes that described my steps in playing with options and had my immediate reactions as I was doing things. If you want to read those brain-vomit notes, you can [support me on Patreon](https://patreon.com/cadey) and get access to them. + +When I was considering what to do, I had a few options in mind: + +- [Rocky Linux](https://rockylinux.org/) (or even [Oracle Linux](https://yum.oracle.com/)) with Ansible +- Something in the [Universal Blue](https://universal-blue.org/) ecosystem +- [Fedora CoreOS](https://fedoraproject.org/coreos/) +- [K3os](https://k3os.io/) +- [Talos Linux](https://talos.dev) +- Giving up on the idea of having a homelab, throwing all of my computers into the sun (or selling them on Kijiji), and having a simpler life + + + Wait, hold up. You're considering _Kubernetes_ for your _homelab_? I thought + you were as staunchly anti-Kubernetes as it got. + + + I am, but hear me out. Kubernetes gets a lot of things wrong, but it does get + one thing so clearly right that it's worth celebration: you don't need to SSH + into a machine to look at logs, deploy new versions of things, or see what's + running. Everything is done via the API. You also don't need to worry about + assigning workloads to machines, it just does it for you. Not to mention I + have to shill a [Kubernetes product for + work](https://fly.io/docs/kubernetes/fks-quickstart/) at some point so having + some experience with it would be good. + + + Things really must be bad if you're at this point... + + + Let's be real, the latest release is actually, real life, unironically named + uwubernetes. I can't _not_ try it. I'd be betraying my people. + + + You really weren't kidding about technology decisions being made arbitrarily + in the [Shashin talk](/talks/2024/shashin/), were you. How do you exist? + + +I ran a poll on [Mastodon](https://pony.social/@cadey/112345742472623188) to see what people wanted me to do. The results were overwhelmingly in favor of Rocky Linux. As an online "content creator", who am I to not give the people what they want? + +## Rocky Linux + +[Rocky Linux](https://rockylinux.org/) is a fork of pre-Stream CentOS. It aims to be a 1:1 drop-in replacement for CentOS and RHEL. It's a community-driven project that is sponsored by the [Rocky Enterprise Software Foundation](https://resf.org/). + +For various reasons involving my HDMI cable being too short to reach the other machines, I'm gonna start with `chrysalis`. Rocky Linux has a GUI installer and I can hook it up to the sideways monitor that I have on my desk. For extra fun, whenever the mac tries to display something on the monitor, the EFI framebuffer dances around until the OS framebuffer takes over. + +