kairos icon indicating copy to clipboard operation
kairos copied to clipboard

🌱 provider-kairos +iso target should work with just BASE_IMAGE (no FLAVOR)

Open jimmykarily opened this issue 2 years ago • 2 comments

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.

jimmykarily avatar Mar 23 '23 10:03 jimmykarily

We can also read the os-release file directly, so no need to parse strings from the image name

mudler avatar Mar 23 '23 10:03 mudler

Can I work on this issue ?

Atharva1723 avatar Oct 19 '24 19:10 Atharva1723

@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 avatar Oct 22 '24 06:10 jimmykarily

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.

jimmykarily avatar Oct 22 '24 06:10 jimmykarily

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

Itxaka avatar Oct 22 '24 07:10 Itxaka

This is fixed now :D

Itxaka avatar Jun 13 '25 15:06 Itxaka