Skip to content

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

Open
@jimmykarily

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.

Activity

mudler

mudler commented on Mar 23, 2023

@mudler
Member

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

changed the title provider-kairos +iso target should work with just BASE_IMAGE (no FLAVOR) 🌱 provider-kairos +iso target should work with just BASE_IMAGE (no FLAVOR) on Mar 23, 2023
moved this from Todo 🖊 to No status in 🧙Issue tracking boardon Jul 13, 2023
Atharva1723

Atharva1723 commented on Oct 19, 2024

@Atharva1723

Can I work on this issue ?

jimmykarily

jimmykarily commented on Oct 22, 2024

@jimmykarily
ContributorAuthor

@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

jimmykarily commented on Oct 22, 2024

@jimmykarily
ContributorAuthor

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

Itxaka commented on Oct 22, 2024

@Itxaka
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      🌱 provider-kairos +iso target should work with just BASE_IMAGE (no FLAVOR) · Issue #1181 · kairos-io/kairos