kairos
kairos copied to clipboard
:factory: Consolidate osbuilder and Auroraboot
We currently have 2 different tools to build Kairos images:
- Auraboot, meant to be used outside Kubernetes
- osbuilder, meant to be used as a controller inside Kubernetes
Both of them have more responsibilities than building (e.g. Auroraboot handles netbooting, osbuilder handles upgrades) but they share the building part.
The current situation and the desired is described in the image above.
This is an epic to collect all the steps/issues toward the desired state.
- https://github.com/kairos-io/kairos/issues/1634
- https://github.com/kairos-io/kairos/issues/1635
- [TBD] Stop shelling out to scripts from Auroraboot and move all functionality to the Auroraboot binary
The last item needs to be discussed and it will be more clear when we have everything consolidated in one image.
One more image describing the desired state of the various tools (osbuilder, auroraboot, enki) and the relations between them.
We will soon be able to build Kairos container images using just Dockerfiles (no Earthly or other tools). There are 2 things missing to have the full "factory" experience:
- A tool that produces the various other artifacts from the container image (e.g. iso, img)
- A tool that wraps the whole flow in some nice UX
Right now the creation of additional artifacts happens in Earthly using osbuilder-tools image. Above we describe how Autoraboot should provide both the UX and the artifact building functionality. Let's consider splitting as such:
- enki is the tool that builds all types of artifacts given a container image
- Auroraboot is a cli interface that calls out to enki. It's meant to be used by humans.\
- Osbuilder controller also calls out to enki. It's meant to be used in Kubernetes in a declarative way.
The new suggestion above is that osbuilder doesn't use Auroraboot but enki directly. This allows us to focus the UX of Auroraboot to humans and not try to satisfy the needs of osbuilder too. enki should be able to cover both since it will be an internal tool, with no focus on UX.
Work happening here:
- [x] https://github.com/kairos-io/AuroraBoot/pull/68
- [x] https://github.com/kairos-io/AuroraBoot/pull/69
- [x] https://github.com/kairos-io/AuroraBoot/pull/77
- [x] https://github.com/kairos-io/enki/pull/224
New auroraboot release: https://github.com/kairos-io/AuroraBoot/releases/tag/v0.3.0 We should be good to archive the enki repository now. If there is any importing of code from that repo, we will port to auroraboot or kairos-sdk as soon as we discover it. No changes or fixes should be made on enki from now on.
Cut another release which completely removes enki as a dependency: https://github.com/kairos-io/AuroraBoot/releases/tag/v0.3.1
also the enki repository is now archived.
I extracted the last item to a separate ticket. Since it has nothing to do with consolidation of osbuilder and auroraboot, I don't think it is part of this epic. Let's close this one as soon as the other 2 items are done.