Introducing Incant -- a frontend for Incus with a declarative way to define and manage development environments

I’d like to introduce Incant (GitHub, PyPI). Incant is a frontend for Incus that provides a declarative way to define and manage development environments. It simplifies the creation, configuration, and provisioning of Incus instances using YAML-based configuration files.

In short, you can create an incant.yaml file with:

instances:
  my-instance:
    image: images:debian/12
    vm: false # use a container, not a KVM virtual machine
    provision:
      - echo "Hello, World!"
      - apt-get update && apt-get install -y curl

Then run incant up, and let Incant interact with Incus to orchestrate the provisioning of your instance.

More complex examples are provided on GitHub, including with using Mako or Jinja2 to script parts of the configuration file.

As the name suggests, Incant is intended as an Incus-based replacement for Vagrant. There are more details about how it compares in the README.md.

At this stage this is mostly a proof of concept. Feedback (both positive and negative) and pull requests, are welcomed!

7 Likes

I like it and it’s helpful, I hope you will continue development.

this is sweet… like a cloud init alternative if i understand correctly?

It’s not really at the same level as cloud-init: in terms of stack, Incant is a wrapper around Incus, while Incus wraps cloud-init.

In theory (because I haven’t tried it), you could use Incant to describe and provision a set of Incus instances, and use cloud-init to configure those instances (and combine that with Incant’s provision stanzas to complete the configuration if needed).

I actually worded that wrong… I was looking for something to replace cloudinit to run a few commands within an shell of a container on startup. Good stuff so far, hope you keep it up.