I am happy to introduce incus-apply, a tool for declarative incus configuration management.
I have been mulling over the idea for a while. I was able to finally put something together and for the past few days adopted it for all my incus related setups.
Why?
The incus cli is very easy and simple to use, coupled with the webui. However, it is lacking an easy (and reproducible) way to define resources.
Terraform is more suited to complex infrastructure setups, and it can be an overkill when you simply want to define few instances. Incus-compose on the other hand does not fully align with incus as it provides a docker focused perspective.
incus-apply is exactly incus with no learning curve and no translation layer. If you can use the Incus cli, you can use incus-apply.
A simple incus-apply debian.yaml afterwards would have the instance up and running. And a subsequent incus-apply -d debian.yaml would tear down the instance.
Just a suggestion but if you enable the GitHub repo “wiki” it might be a good place for users to provide or get info such as Q&A, Tips, Examples w/out resorting to opening “issues”.
This looks really useful, thank you for building it! Right now I have some things scripted with incus commands, and I like the idea of replacing those with declarative configuration.
This resonates with me, Terraform is an intimidating beast. I like the idea of having a specialized equivalent for Incus. Bonus points for being a single binary!
Great demo, straight to the point.
Edit: omg I just noticed you put a Windows example, now I really need to test this.
Just wanted to say that I’ve been using incus-apply for a few months now, and it’s easily been my go-to way to manage my containers. I’m definitely not an incus expert in any sort of way, but it’s really helped me understand and cement Incus-specific configuration options. Declarative config that’s essentially 1-to-1 with what I’d do with incus config edit <container> feels really well done with incus-apply. I really appreciate your contribution, it’s genuinely helped me get into Incus!