0 Followers
0 Following
1 Posts
Knowing what and when to abstract can be hard to define precisely. Over abstraction has a cost. So does under abstraction. I have seen, wrote and refactored terrible examples of both, written by myself and others. Anecdotally, flattening an over abstracted hierarchy feels like less work and usually has better test coverage to validate correctness after refactoring than abstracting spaghetti code. Be aware of both extremes and try to find the balance.
Switched to qbittorrent+gluetun side car recently and it’s been pretty good compared to the poorly maintained combo torrent+OpenVPN images I was using. Being able to update my torrent client image/config independent from the VPN client is great. Unfortunately most of the docs are Docker focused so it’s a bit of trial and error to get it setup in a non-docker environment like Kubernetes. Here’s my deployment in case it’s useful for anyone. Be careful that you configure qbittirrent to use “tun0” as it’s network interface or you will be exposed (got pinged by AT&T before I realized that one). I’m sure there’s a more robust way to makeuse of gluetun’s DNS over TLS and iptables kill switch that doesn’t require messing with qbittorrent config to secure, but that’s what I have so far and it works well enough for now.
homelab/kube/media/qbittorrent/qbittorrent.yml at master · macgregor/homelab

Contribute to macgregor/homelab development by creating an account on GitHub.

GitHub
Look for refurbished units, you can get enterprise grade units for like half the retail price. I recently got a refurbished APC from refurbups.com. Comes with brand new batteries, mostly rack mountable stuff. Ended up being a little over half the price of a brand new one with shipping. Can’t tell at a glance if they ship to Canada, but if not I’d be surprised if there wasn’t a similar Canada based site you could find.
APC Batteries, Save on UPS Battery Replacement, APC RBC Replacement Battery Cartridges , UPS Battery Kits | RefurbUPS

Stretch your Budget on Performance Guaranteed UPS systems from APC Schneider Electric UPS Systems, Vertiv UPS Systems, Liebert, Eaton, Tripplite and more. Save on Brand New UPS Battery Solutions for Leading UPS Manufacturers APC, Powerware, Eaton, Dell, Vertiv, Liebert, Tripplite, and many more. Same Day Shipping, Performance Guaranteed.

Not really, its mostly a hobby/nerdy/because I can thing. I am a software engineer with a decade of experience. The job sometimes requires virtual sys admin work (VM/container, cloud networking, etc). Setting up my own baremetal cluster has given me more insight into how things work, especially on the network side. Most of my peers take for granted that traffic gets in or out of a cluster, but I can actually troubleshoot it or design with it in mind.

Thoughts on server/network racks?

https://lemmy.world/post/1494880

Thoughts on server/network racks? - Lemmy.world

Every couple months I get the urge to organize my lab/home office equipment into a rack/cabinet, but never follow through on it. I ocassionally look on craigslist for deals, but everything is either too far away or too big. I’d rather pay more for a smaller rack that doesn’t go all the way to the ceiling and will just show up on my doorstep. A 6U would fulfil my current requirements, 12U is probably more than enough in reality but as an engineer I find myself eyeing 15-18U to be conservative. This iteration of the search has me eying these options: * sysracks 18U server rack [https://www.amazon.com/dp/B082YJVBTV/?coliid=I3NT2EN7YX0XES&colid=3E8TPEGQ105CM&psc=1&ref_=list_c_wl_lv_ov_lig_dp_it] - slightly bigger than I want, but still reasonable. Some questionable reviews on manufacturing/shipping quality, but this seems like a solid cost/value ratio: fully enclosed, room to grow, wheels, accessories like shelves and such I’d want anyway. Feels like maybe overkill, but for the price… * NavePoint 15U Portable Rolling Network Rack [https://www.amazon.com/dp/B08HWGKPWF/?coliid=I3TO1OGGRHCC1D&colid=3E8TPEGQ105CM&psc=1&ref_=list_c_wl_lv_ov_lig_dp_it] - closer to the size I want (12/15U options), cheaper but no accessories, like shelves, I’d need bringing it closer in price to the sysrack. Similar manufacturing/shipping concern reviews. I like this one, but hard to feel like it’s a worse deal than the sysrack. * some startech variant - these seem generally higher build quality (sturdier) but higher cost and more “bare bones” looking. also often adjustable depth making it potentially more future proof. but I’m not sure either of these make up for the increased cost. What do you think? Any advice or wisdom you can share? I’m feeling like finally following through this time because my office is a tiny mess. Leaning toward the NavePoint currently.

Kubernetes and SSD Read Cache - Beautiful Silence

https://lemmy.world/post/1117290

Kubernetes and SSD Read Cache - Beautiful Silence - Lemmy.world

So I run a small Kubernetes cluster (k3s) backed by MariaDB hosted on a Synology NAS with only HDDs rather than etcd colocated on the control nodes. For resiliency purposes it’s been great, nodes are basically pure compute resources I can wipe out and recreate with ease and not worry about data loss. However, for over a year now I’ve lived with the constant chatter of active hard drives in my office. The Kube DB workload is extremely read heavy and very active: many thousands of selects per minutes with only a handful of writes. Clickclickclickclickclickclick. Seems like a good case for caching, and luckily my NAS has 2 NVMe slots for an SSD cache. I bought a couple data center drives with PLP (Kingston DC1000B, probably overkill, but not crazy expensive), pop them in, set up a read/write cache for the database and Kube NFS volumes and…silence, wonderful silence. It’s almost constantly at 100% cache hits. Bonus points if things are faster as well. I’m very happy. Never optimized an application for noise levels before 😁.

If I am trying to fix problems with my cluster or the baremetal hosts they are running on, I can't rely on the VPN access running on those nodes, which means I need dedicated reliable hardware acting as a bastion. Right now all I have for that is my router. Home routers have awkward limitations for installing and configuring software even if you are running better custom firmware like FreshTomato or OpenWRT, making them the edge case for "just" set up a VPN. Yes I played around with making it work. Yes, I could make it work if I sunk enough effort in to it, but again, I found it acceptably secure to simply enable remote ssh access.

I do suggest talescale all the time for most people though. It's cool tech, their blog is fantastic. I'm looking forward to having a proper network switch one day and I'll revisit the issue.

It's for the chance that I need to administer my cluster when I am not on my LAN. I can set up a port forward to the externally accessible port and everything works as normal like I'm on my LAN. Non-default port, password auth disabled, ssh with root disabled (so you have to have my user and ssh key) and limited ssh connection attempts before ban. I can toggle it on or off with a check box on my router. Yes, I understand there are other ways that are even more secure, yes I understand the risks, but for my circumstances this was a good balance of convenience and security. I've also never had an issue :).
I do as well on a non-standard port, although that doesn't really provide any extra security. I found ssh only login acceptably secure personally, but it's definitely less secure than tailscale which can operate with 0 open ports. The risk would be from os/sshd vulnerabilities that can be exploited. As long as you keep the router up to date it should be safe enough.

It's a great tool for knowledge sharing, ramp up and debugging. Definitely not something that needs to happen on every story. Stuck on something or working on a weird bug? Get someone on a call and walk them through it. New team member or old susbsytem not many people understand? Pair the less knowledgeable person up with an SME for the first couple tasks so they can pick the SME's brain while they work and get valuable context that might be lost in code or the story description.

It also doesn't need to drag on. I find 30 minutes is best because as you approach an hour+ attention is hard to maintain. Get on the same page, learn a few things and once your making progress move to async communication.

Pair programming is a tool and only valuable if you know how and when to use it.