As an experiment to familiarize myself with Nomad driver plugins, I created a driver plugin for Tart that allows you to manage macOS VMs using Nomad. It allows you to manage macOS VMs with Nomad in a similar way to how you would manage Docker containers.

Disclaimer: This is a WIP and not yet ready for production use. It is a proof of concept and should be treated as such. Please do not use this in production environments. If you need production ready solutions, consider using Orchard which is built by the same developers behind Tart.

What is Tart?

Tart is a VM Manager that is built to let you manage macOS VMs on Apple Silicon. One of Tart’s key features is its integration with OCI-compatible container registries, allowing you to store and distribute VM images just like Docker containers.

Why create the Nomad driver plugin?

One of the ways I like to learn new things is to build something. Since I wanted to learn more about Nomad and its driver plugin system, I decided to create a driver plugin. I chose Tart, since many others already exist such as Docker, etc.. Since Tart only manages specific VMs on a specific machine, rather than orchestrates across several, I thought it would be a good candidate for a driver plugin. Tart already has an orchestration manager, Orchard, but it is bespoke for Tart itself, and you may want to use Nomad for other workloads as well.

Sample Nomad Job

Here’s a simple example of how you can spin up a macOS VM:

job "tart-demo" {
  datacenters = ["dc1"]
  type        = "service"

  group "demo" {
    task "vm" {
      driver = "tart"

      config {
        image     = "ghcr.io/cirruslabs/macos-sequoia-base:latest"
        cpu       = 4
        memory    = 8192
        disk_size = 50
        command   = "echo 'Hello from Tart VM'"
      }
    }
  }
}

Conclusion

There are many reasons why you may want to orchestrate macOS VMs, such as CI/CD workflows, ephemeral development environments, or testing infrastructure, and this plugin allows you to do just that.