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

Update build script to facilitate iso builds #241

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

rahulbabu95
Copy link
Contributor

Description

Linuxkit also offers an option to build kernel as an iso file. Update the build script to be able Hook as an ISO.

Why is this needed

Apart from the default build, this change provides the users to be able to mount Hook as an ISO and boot using the virtual media option.

Fixes: #

How Has This Been Tested?

Set LINUXKIT_ISO to true and built hook as an ISO. Mounted the ISO on a Dell R340 as a virtual media device and booted using the ISO. As this flow kicks in only when the above env var is set, it should affect any existing user workflow.

Checklist:

If this gets approved, I will update the Readme appropriately to document the option to build as an ISO.

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@rahulbabu95
Copy link
Contributor Author

/hold

@rpardini
Copy link
Contributor

Hey @rahulbabu95, interesting; my main question is that by booting the .ISO directly (and thus directly into HookOS), there's no chance for iPXE to add the kernel command-line arguments that are required (eg, the tink address, worker image, etc) -- how would one define those in the .ISO scenario?

@rahulbabu95
Copy link
Contributor Author

@rpardini That's a great question. So end goal of getting an ISO build is to be able to have Tinkerbell stack running on L3. I don't have a concrete design yet but will trying out some POCs with an Hook ISO. But if the worker image is embedded then the only thing to be dynamically arrived at is the tink address. Main ideas I have been thinking of is to either provide the address during the build time or dynamically feed in the address at run time to Hook.

@rahulbabu95
Copy link
Contributor Author

@rpardini just following up on the earlier discussion, I used tink-worker image with embedded images and tried up two scenarios. 1. Provide syslog_host and grpc_authority host as kernel commandLine args at buildtime.
2. Set them dynamically by patching the Hook ISO at run time.
I was able to boot a DELL R340 for my POC using Hook ISO.

Could you take another look on this when you get a chance? Let me know if you have more questions/ideas.!

This should help users know how to build the ISO.

Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock
Copy link
Member

@rpardini , @rahulbabu95 . I like where this is going as it leads us to the possibility for layer 3 provisioning. There is still lots to do to enable layer 3 provisioning and @rahulbabu95 we'll need a proper design doc for that so we can all discuss but I don't see this impacting any exist code. I'm going to merge this. If there are concerns, please bring them up and we can iterate on resolving them. Thanks All!

@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Oct 4, 2024
@mergify mergify bot merged commit 0bfb51e into tinkerbell:main Oct 4, 2024
29 checks passed
mergify bot added a commit to tinkerbell/smee that referenced this pull request Nov 14, 2024
## Description
This change adds the ability in Smee to serve Hook as an ISO file through HTTP and also patch it with all the necessary dynamic information needed to connect with a Tink Server. 

## Why is this needed
Hook recently added an [feature](tinkerbell/hook#241) to support building it as an ISO file. This change leverages that feature to be able to serve and patch Hook as an ISO file. This will be needed to be able to get Tinkerbell stack running on L3 without any Layer 2 dependency.  
 



## How Has This Been Tested?
Built a custom smee image with above changes, and tested with that image and replacing the smee deployment of Tink stack on a k3d cluster with real hardware. Set the Hardware to boot from Virtual media mount and verified that the hardware was able to boot properly.

## How are existing users impacted? What migration steps/scripts do we need?
ISO serving will not be enabled by default in the CLI and users have to explicitly set the 'iso-enabled' flag to make use of the feature. So as such the change will not have any impact on existing users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants