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

Platform-agnostic host metadata for early-boot-config and pluto #1218

Closed
zmrow opened this issue Nov 17, 2020 · 1 comment
Closed

Platform-agnostic host metadata for early-boot-config and pluto #1218

zmrow opened this issue Nov 17, 2020 · 1 comment
Assignees
Labels
type/enhancement New feature or request

Comments

@zmrow
Copy link
Contributor

zmrow commented Nov 17, 2020

Problem

early-boot-config and pluto use IMDS directly. In order to start testing Bottlerocket on other platforms, these services must retrieve metadata and user data from other sources.

Proposed Solution

For the short term, we will extend early-boot-config for other platforms via the PlatformDataProvider trait provided in the program and conditionally compile it based on the variant. pluto will be similarly refactored and extended, adding additional arguments for other platforms if required. Doing so removes the first roadblock, allows us to begin testing on other platforms, and start gaining knowledge. While conditional compilation isn’t our favorite solution, the code can be factored out into a more unified solution should we find one in the future. Given the fact that there are only two first party Rust programs to extend makes this low risk and a two-way door.

Alternatives

Metadata translation service
This service would run on the Bottlerocket host and programs would call it rather than IMDS. It would translate any calls to the appropriate source for metadata. This is a compelling idea, but given how little we know about running Bottlerocket on other platforms, it feels a bit too early to commit to such a service. It is also yet another service to run at boot. The complexity it would add feels a bit unnecessary at this point.

One-shot program to query for all metadata
This idea is similar to the above metadata translation service, except it wouldn’t be a long running program. This program would run once at boot, query for the required metadata, and populate a file or data store with a commonly agreed upon format. Other programs would query this file or data store. This idea solves the issue of unifying the logic for querying various metadata services. However, it does raise a few problems of its own. This one-shot program must shape data in a format that other programs must agree on, which means a common and conditionally compiled library. We also would need to agree on a secure place to store this data. It is also another service to run on boot. Once again, the additional complexity doesn’t seem worth it for the short term.

Related to #968, #1097, #1114

@zmrow zmrow changed the title Platform-agnostic host metadata for early-boot-config and pluto Platform-agnostic host metadata for early-boot-config and pluto Nov 17, 2020
@zmrow zmrow changed the title Platform-agnostic host metadata for early-boot-config and pluto Platform-agnostic host metadata for early-boot-config and pluto Nov 17, 2020
@jhaynes jhaynes added type/enhancement New feature or request priority/p1 labels Dec 10, 2020
@bcressey bcressey added the status/needs-triage Pending triage or re-evaluation label Dec 11, 2020
@gregdek gregdek removed the status/needs-triage Pending triage or re-evaluation label Dec 11, 2020
@zmrow zmrow self-assigned this Dec 15, 2020
@zmrow
Copy link
Contributor Author

zmrow commented Mar 8, 2021

Closing this in favor of more specific issues. I opened #1369 to track some additional work for VMware for early-boot-config.

In regards to pluto we also have the option to write a new settings generator rather than extending pluto. Once we have a better idea of the settings we'll need, a separate issue will be opened.

@zmrow zmrow closed this as completed Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants