News for hackers. Stuff that matters.
Re:Using Ansible and Nomad for a homelab (part 1) by AtlasBarfed on Sunday February 27, 2022 @11:42PM (#30496496)
It's sad that we go from bash ---> massive enterprisey system. There's nothing in between.

I ran into this at my work. We have ansible and salt and terraform and nomad and spinnaker and kubernetes and docker, each in varying states of favor/disfavor.

Bash scripts are awful: no standard library, no functional ide for debugging, pathetic language, whitespace sensitive. The only saving grace is the universality.

Everything else? Heavyweight servers, daemons, opinions through the wazoo.

What did I want? I want a way to get an inventory/list/cluster map of nodes, then be able to send CLI commands to them, and the parse the response and send more. I want to a decent language, good runtime, IDE/modern toolchain support.

Can I just ssh into boxes? Yeah, uh, kinda? Or maybe I use aws-ssm to send/receive commands. Or kubectl or dockerrun. Or teleport. Or salt daemon. Each of them can do the job of "send command to a node".

And I want to write meta-applications on top of that.

So I settled on groovy: optional typing, if I want near-full JVM speed I can use CompileStatic, lots of scriptability, full JVM parallelism/threading power. The JVM sucks in some ways at running CLI commands locally, but once I figured that monstrosity out, got Jsch working for "pure" java SSH, caching kinda solved, thing....

So after about six rewrites, and a sufficient amount of configuration that makes a complicated ssh conf look like child's play, I can do cluster-level operations that make me happy: setup clusters, orchestrate/run/track load tests, fully scripted backups and restores, migrations/upgrades, red/black. Restore backups to analysis clusters.

I'm not tied to a specific cloud. I'm not tied to a command delivery substrate.

Is it useful to someone else? Dunno, I'll try to get it released and documented.

Does anyone else know of something like this?

There are no comments on this comment yet.