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

Enable out-of-tree Bottlerocket variants #2669

Closed
cbgbt opened this issue Dec 16, 2022 · 7 comments
Closed

Enable out-of-tree Bottlerocket variants #2669

cbgbt opened this issue Dec 16, 2022 · 7 comments
Assignees
Labels
area/core Issues core to the OS (variant independent) area/out-of-tree-builds Related to the efforts of making it easy to create builds outside of the main Bottlerocket repo status/needs-proposal Needs a more detailed proposal for next steps type/enhancement New feature or request

Comments

@cbgbt
Copy link
Contributor

cbgbt commented Dec 16, 2022

What I’d Like:
A supported mechanism for creating custom Bottlerocket variants that live within their own git trees. These variants should support some mechanism for defining a dependency on Bottlerocket’s core in a way that allows the custom variant to evolve independently and consume Bottlerocket-core updates safely.

We've been calling the project to enable this "Out of Tree Builds" and shortening that to OOTB, so if you see references to either, they are a reference to this issue.

Background:
Currently a set of variants are maintained in the Bottlerocket tree, but any additional variants must be created by forking the repo and maintaining a series of patches which add the special variant. Some risks and challenges of this include:

  • The custom variant repo must frequently rebase a substantial volume of code to stay atop Bottlerocket changes. These rebases are unpredictable and likely non-trivial in many cases.
  • The integration points of custom variants are not well-defined. For example, changes to the semantic meaning of settings could impact out-of-tree variants in ways that are difficult to discern during rebase.
  • The forked repo will include a significant amount of code/documentation/information which is not relevant to the specific changes needed for the custom variant.

Edit: We have started a new GitHub repository for a tool that will drive these builds. Track bottlerocket-os/twoliter#1 for the design.

@cbgbt cbgbt added type/enhancement New feature or request status/needs-triage Pending triage or re-evaluation status/needs-proposal Needs a more detailed proposal for next steps area/core Issues core to the OS (variant independent) labels Dec 16, 2022
@grosser
Copy link

grosser commented Dec 16, 2022

similarly: if we need 1 custom package we also have to fork atm, so ideally the variant workflow would address this issue too
for example having a "build" repo that uses bottlerocket as a git-submodule and all the customization stays outside

@jfbette
Copy link
Contributor

jfbette commented May 5, 2023

Coming back to this functionnality. On my side it is a must-have capability and seems complex for now to make custom Bottlerock variants.

On my side the identified customization needed could be listed as following :

  • add/remove packages
  • remove some functionnalities that are not really core system but more linked to AWS ecosystem.
  • ability switch to other components doing same functionnality. E.g. switch from grub to direct EFI boot (this is an example, I know the impact on update process).
  • specific compilation options (kernel, ...) or apply specific patches
  • customize trademarks

For exemple I tried to create a new variant but even in the name of the variant their are some hard coded reference/tests to the name itself. For example, in early-boot-config, it tests if it is a metal variant and then apply some configuration. Being a metal should not be related to the name of the variant but rather a configuration variants

@webern
Copy link
Contributor

webern commented May 5, 2023

@jfbette thank you for providing these requirements. We will be posting a design doc for consideration. We have created a new repository for a tool that will drive these builds, which we have given the name twoliter. Here is the issue to track for the design: bottlerocket-os/twoliter#1

@stockholmux
Copy link
Member

@jfbette Could you give me a little more details and a further example on what you want by "customize trademarks"?

@soostdijck
Copy link

I came here via #1225 and #2570 looking for a way to install mount.nfs in bottlerocket. My requirement is that I want to use Netapp trident in my EKS Anywhere cluster (running bottlerocket).
As stated in those other issues I also ran into the same issues using trident on native EKS, using FSx ontap.

Netapp trident wants node preparation like this

@webern webern mentioned this issue Aug 11, 2023
5 tasks
webern added a commit to webern/bottlerocket that referenced this issue Aug 18, 2023
In order support out-of-tree builds (see bottlerocket-os#2669 and
https://github.com/bottlerocket-os/twoliter), we need to move the
build system to the Twoliter repository. This commit starts this
process by moving the Makefile.toml logic to Twoliter and using
Twoliter as a facade over the build system.
@cbgbt
Copy link
Contributor Author

cbgbt commented Aug 8, 2024

I'm happy to say that we've accomplished this! 🎉 🚀 🎉

We still have a lot of documentation to write, but in short:

If you're seeing this and want to try creating a Bottlerocket out-of-tree variant but encounter issues or have questions, please feel free to cut us an issue! The most sensible repo for such issues would likely by:

@cbgbt cbgbt closed this as completed Aug 8, 2024
@webern
Copy link
Contributor

webern commented Aug 13, 2024

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues core to the OS (variant independent) area/out-of-tree-builds Related to the efforts of making it easy to create builds outside of the main Bottlerocket repo status/needs-proposal Needs a more detailed proposal for next steps type/enhancement New feature or request
Projects
Development

No branches or pull requests

7 participants