Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop shelling out from auroraboot #3019

Closed
jimmykarily opened this issue Nov 15, 2024 · 10 comments
Closed

Stop shelling out from auroraboot #3019

jimmykarily opened this issue Nov 15, 2024 · 10 comments
Labels
documentation Improvements or additions to documentation

Comments

@jimmykarily
Copy link
Contributor

jimmykarily commented Nov 15, 2024

This was part of: #1633 (now extracted to a separate ticket)

With the auroraboot image now being the single source of truth for all artifact generation, we should now stop shelling out to bash scripts (like these here).

All functionality should be implemented in go (in auroraboot) and with as little dependencies as possible from the OS.

@jimmykarily jimmykarily converted this from a draft issue Nov 15, 2024
@jimmykarily jimmykarily added the triage Add this label to issues that should be triaged and prioretized in the next planning call label Nov 15, 2024
@mudler mudler mentioned this issue Nov 15, 2024
33 tasks
@mudler mudler moved this from Todo 🖊 to Under review 🔍 in 🧙Issue tracking board Nov 18, 2024
@Itxaka
Copy link
Member

Itxaka commented Nov 19, 2024

Some info about existing files in there:

luet configs inside the image-assets dir: should be dropped inmediatly. We only need the ones in the root dir, this ones are not used anywhere

defaults.yaml is used by the arm images to bundle it. We should move that directly into golang whenporting the arm scripts

arm/boards are specific steps for boards. When arm scripts are ported to go we need to port those as well

netboot.sh should be able to be dropped already, we fixed it to be directly generated under kairos-io/AuroraBoot#80
The old script generated an ipxe file but I dont see where that was used (nowhere!) so it should be ok to remove

update-os-release.sh is only used un the kairos examples dir for fips. Its functionality should be already in kairos-agent versioneer so it can be dropped if we fix the examples
kairos-release.tmpl is part of that and can be dropped at the same time

ipxe.tmpl its only used as a target on the Kairos earthlyfile, to boot from an ISO with that ixpe script bundled. Either we move it there so it can be used especifically for the iso testing or we change the test to use auroraboot for the testing somehow? In any case, that test case its interesting as it builds ipxe and bundles the ipxe config file in there, but still makes more sense to me to have that file over there as aurora does not use it in any capacity

gce and azure scripts should be moved to go directly. I already created the code a long time ago and its available under elemental so its a matter of transporting it to kairos: https://github.com/rancher/elemental-toolkit/blob/main/pkg/action/build-disk.go#L298 but it first need a RAW image and that was also done a long time ago under elemental: https://github.com/rancher/elemental-toolkit/blob/main/pkg/action/build-disk.go#L322 and again, just moving it over our side should be almost enough as we will need to account for our paths in the aurora image and so on

add-cloud-init.sh is just not used anywhere, not even the docs. Lets drop it.

raw-images.sh creates a disk.raw image (EFI)

bios-raw-image.sh creates a disk.raw image(BIOS) I cant see it being used anywhere. It also uses qemu to run an iso and install it, then uses the generated disk for the image.

build-arm-image.sh builds arm images for arm platforms including boards

prepare_arm_images.sh prepares Kairos state, recovery, oem and pesistent partitions as img files. Seems to be heavily used by the nvidia orin (only?)

@jimmykarily
Copy link
Contributor Author

Let's do them one by one. Starting with this:

https://github.com/kairos-io/AuroraBoot/blob/main/image-assets/build-arm-image.sh

We should also have a new command in Auroraboot to build arm images using the result of the above work.

@jimmykarily jimmykarily moved this from Todo 🖊 to In Progress 🏃 in 🧙Issue tracking board Nov 25, 2024
@jimmykarily jimmykarily removed the triage Add this label to issues that should be triaged and prioretized in the next planning call label Dec 2, 2024
@Itxaka Itxaka self-assigned this Dec 12, 2024
@Itxaka Itxaka moved this from Todo 🖊 to In Progress 🏃 in 🧙Issue tracking board Dec 12, 2024
@Itxaka
Copy link
Member

Itxaka commented Dec 23, 2024

raw images done kairos-io/AuroraBoot#139
Next is transform rw images to GCE/VHD which is a simple one as code is available to do it

@Itxaka
Copy link
Member

Itxaka commented Dec 23, 2024

kairos-io/AuroraBoot#146 for GCE/AZure

@Itxaka
Copy link
Member

Itxaka commented Jan 3, 2025

raw image for BIOS is already merged, most of the scripts have been dropped.

Only the arm ones are left

@Itxaka
Copy link
Member

Itxaka commented Jan 14, 2025

This serves as a transition from the current scripts to the newer aurora raw image creation: #3117

@Itxaka
Copy link
Member

Itxaka commented Jan 14, 2025

only missing the docs update to point to aurora directly

@jimmykarily jimmykarily added the documentation Improvements or additions to documentation label Jan 20, 2025
@jimmykarily
Copy link
Contributor Author

New candidate for un-shelling-out? kairos-io/AuroraBoot#180

@jimmykarily jimmykarily moved this from In Progress 🏃 to Todo 🖊 in 🧙Issue tracking board Feb 10, 2025
@mudler
Copy link
Member

mudler commented Feb 18, 2025

New candidate for un-shelling-out? kairos-io/AuroraBoot#180

I'd keep this out. It's really too board-specific at this point, and no much gain to generalize it (unless there are a couple of cases where separate images are needed..)

@mudler
Copy link
Member

mudler commented Feb 18, 2025

Let's close this card for now and have a follow-up on updating the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Archived in project
Development

No branches or pull requests

3 participants