Firecracker and Nomad?

I currently run Nomad on top of NixOS hosts, mostly launching jobs as docker containers. However, I’d like to migrate to having Nomad create micro vms using firecracker (or something similar) instead.

Does anyone have any recent examples of doing something similar?

I saw Firecracker or Kata on NixOS - #8 by colemickens from a few years ago which lead to GitHub - astro/microvm.nix: NixOS MicroVMs and seems like it’d be helpful, but isn’t quite what I’m looking for.

I also saw this (non-nix) post: Running Untrusted Workloads with Firecracker and containerd - Bruno Scheufler

It’s pretty close to what I was hoping for, just not on top of NixOS. I’m still pretty new to nix and nixos, so I was hoping to find an already complete (or mostly complete) solution that I could start from.

1 Like

I’ve tried to run microvm.nix on nomad in GitHub - astro/skyflake: NixOS Hyperconverged Infrastructure on Nomad/NixOS but it’s very rough.

Thanks, I’ll have a look at skyflake. I’m not looking to define my nomad jobs with nix, but it looks it may still be helpful, especially vm/nomad-job.nix. Having a bunch of scripts in the nomad job to start/stop the vm seems like an easy way to do it without having to make a new nomad plugin

Are you still working on skyflake or did you try using nomad a different way?

I would love to continue work on Skyflake but I am currently lacking three servers :slight_smile: