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

Extend OS Installation Options for Machines #145

Open
3 of 4 tasks
hardikdr opened this issue Oct 17, 2024 · 3 comments
Open
3 of 4 tasks

Extend OS Installation Options for Machines #145

hardikdr opened this issue Oct 17, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@hardikdr
Copy link
Member

hardikdr commented Oct 17, 2024

Summary

Add support for multiple boot modes concerning how operating-system is installed on the Machine.

  • Installation of the OS directly on the disk.
  • Installation of the OS in memory for the session.
  • Preserving specific bind mounts post-boot.

Progress Tracker:

  • Develop the initial version of the on-disk installation mechanism. @5kt
  • Enhance the installer by integrating it with the initrd. @5kt
  • Publish updated operating system images that include the new initrd. @hardikdr
  • Design and implement APIs for incorporating the installer into the Metal Operator.

Motivation

Better flexibility in deployment scenarios.

@hardikdr hardikdr added the enhancement New feature or request label Oct 17, 2024
@hardikdr
Copy link
Member Author

hardikdr commented Nov 15, 2024

A possible enhancement in the APIs could look following, it's open for discussion:

ServerClaim:

apiVersion: metal.ironcore.dev/v1alpha1
kind: ServerClaim
metadata:
  name: example-serverclaim
spec:
  power: "On"
  ...
  bootPolicy: NetworkBootOnce   # Options: NetworkBootOnce / NetworkBootAlways / None
status:
  conditions:
    - type: NetworkBootedOnce
      status: "True"
      reason: Network boot was performed once.
  • bootPolicy Field in ServerClaim: Add a spec.bootPolicy field with the following values:

    • NetworkBootOnce: Set PXEBootOnce signal for the first boot, and delete the associated ServerBootConfig after the successful power cycle operation execution.
    • NetworkBootAlways: Always set a PXEBootOnce signal during power cycles and retain the ServerBootConfig.
    • None: Do not set any boot-related signals, and do not create a ServerBootConfig.
  • ServerBootConfig Lifecycle:

    • Delete ServerBootConfig after the first boot for NetworkBootOnce.
    • Retain ServerBootConfig indefinitely for NetworkBootAlways.
    • Skip creation of ServerBootConfig for None.
  • Tracking Boot State:

    • Add a NetworkBootedOnce condition in ServerClaim.status to track if the network boot was successfully performed.

cc @5kt @defo89 @stefanhipfel @afritzler

@defo89
Copy link
Contributor

defo89 commented Nov 22, 2024

Thanks @hardikdr! I like the proposal. With above implemented, how would you approach behaviour in #175 ?

I guess for Reserved server with bootPolicy: NetworkBootOnce it would just reconcile fully (with PXE boot) once and since ServerBootConfig is deleted afterwards it would not go through this in further reconciliations?

@hardikdr
Copy link
Member Author

hardikdr commented Dec 9, 2024

@defo89 Considering the last offline discussions, it's probably not a good idea to delete the ServerBootConfig.
I will post the revised version, where we need an indication in both ServerClaim and ServerBootConfig objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants