🌱 provider-kairos +iso target should work with just BASE_IMAGE (no FLAVOR) #1181
Open
Description
If you create an iso with:
earthly -P +iso -BASE_IMAGE=quay.io/kairos/core-ubuntu-22-lts
you get an image that reports this:
debugging-station login: kairos
Password:
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.19.0-35-generic x86_64)
* Documentation: https://help.ubuntu.com/
* Management: https://landscape.canonical.com/
* Support: https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
Welcome to Kairos!
Refer to https://kairos.io/ for documentation.
kairos@debugging-station:~$ cat /etc/os-release
NAME="kairos-opensuse-leap"
(notice how ubuntu and opensuse is mixed).
This happens because FLAVOR
flag was not set. We should infer the FLAVOR from the BASE_IMAGE to simplify how the target should be used and avoid mistakes.
Metadata
Assignees
Type
Projects
Status
No status
Activity
mudler commentedon Mar 23, 2023
We can also read the os-release file directly, so no need to parse strings from the image name
Atharva1723 commentedon Oct 19, 2024
Can I work on this issue ?
jimmykarily commentedon Oct 22, 2024
@Atharva1723 sure, give it a try. The idea was that all the other Earthly targets except
base-image
would work with just a base image as input. Currently, we've made most targets work on the same set of input flags, eventually calling the base-image target.We would need to change all targets and instead of building the base image themselves (by calling the base-image target), they would simply accept a base image and work with that.
Given the intricacies of Earthly and the fact that the "canonical" tool for building the various artifacts will be Auroraboot (as soon as we are done with the "factory" epic), I'm not sure if it's worth refactoring Earhtly targets at this point. Because, all the pipelines will need to be adapted to work with the new targets.
@kairos-io/maintainers what do you think?
jimmykarily commentedon Oct 22, 2024
I just realized that while writing my message I went from "sure give it a try" to "I don't think it's worth it" :D. Let's wait for others to chime in.
Itxaka commentedon Oct 22, 2024
I think its ok. At least base image could automatically set the FLAVOR and FLAVOR_RELEASE so thats 2 things that we can drop :D