unRob / nidito

home as code
7 stars 0 forks source link
ansible homelab nomad terraform

nidito

A repository to hold the code running (in) my homelab.

Description

My homelab runs on a diverse set of machines, and there's a bunch of workloads I'be been playing with in it. I don't quite know what I'm doing, so I wanna make sure it's less of a pain when it comes time to upgrade/undo/redo. Hardware fails, I tend to trip over ethernet, and thus this lab's automation and design is focused on allowing me to be as lazy and chill about failure as possible.

Most things these days can and will run great with docker, and some things will be better off running outside a container. A few essential services run like this and those are provisioned on nodes with ansible. Every other workload is scheduled with nomad.

Hardware

Power efficiency is the name of the game; I started with a 40 watt/hour budget which has slowly grown along the amount of hardware in my rack. Now we're on a 100 watt/hour budget, which I wanna try to stick to for a long time.

These happily chug along inside my little rack, converted from an ATLAS half-size airline trolley.

My airplane service cart turned into rack

Previous Hardware

Services

These hosts run a few services I think of in three layers, in descending order of essentialness:

  1. network provide a working local+remote network, and dns resolution
  2. workload provide the runtime, scheduler, configuration, storage, logging, and load balancing for other services
  3. home turn on the lights, media streaming, long-term storage, backup
  4. et al everything else

Network services

Without a working network, either wired, wireless or through a vpn, nothing else works. Apart from regular network-y services, the router runs:

Workload services

consul, nomad and vault provide the basis for running workloads and doing the service discovery/config dance. Along DNS and VPN, I consider these services "tier-1", as everything else is dead without it.

tier-2 services provide nicer abstractions for roberto, the power-user, to run stuff on. These services are:

Finally, there's tier-3 services that actually do stuff for humans in my home:

Previously, I've also ran: