Closed theCalcaholic closed 2 months ago
Thanks for the review! I'm on the bus right now, will make the adjustments later.
I pushed the requested changes. Let me know, if there's anything else :)
@theCalcaholic Thanks! I would be interested in adding Incus to buildroot and SkiffOS as a option for hosting containers as well.
go install mvdan.cc/sh/v3/cmd/shfmt@latest shfmt -l -w thing.sh
I am running shfmt on your scripts and a few minor changes, will apply them while merging! Thanks!
@theCalcaholic Thanks! I would be interested in adding Incus to buildroot and SkiffOS as a option for hosting containers as well.
That would be cool. Unfortunately I have no experience with adding new packages to buildroot - do you have an example you could point me to?
incus can run both containers and VMs btw, so it might make sense to add the latter as well as build target (never used them much personally, though).
@theCalcaholic
It appears incus is a Go project, so you can add one just copying + changing:
That should be about it! Also see the buildroot manual: https://nightly.buildroot.org/manual.html#_infrastructure_for_go_packages
This PR implements support for generating incus/LXD images (and running incus containers). I have been using your implementation of the virt/docker and virt/qemu packages as inspiration. Looking forward to your feedback.
For convenience, here's the package Readme:
Containerized: Incus
This package builds a SkiffOS system for use as a Incus container image.
Incus containers are versatile system containers that, as opposed to application containers like docker, emulate a full init system by default (more details here) and are therefore well suited for multi service/container deployments. Incus utilizes the LXC APIs internally and provides a powerful toolset on top of them.
Building and starting the container requires incus to be installed and running on the host and the executing user to be in the
incus-admin
group.Example
Executing a shell in the container:
Persistence
When using the included command
cmd/virt/incus/run
for creating the container, a persistence volume will be created in the first incus storage pool available and attached to the container. If you want to reset the persistence volume, just delete it, so it will be recreated: