bottlerocket icon indicating copy to clipboard operation
bottlerocket copied to clipboard

Metal: Include required files in the image at build time

Open zmrow opened this issue 3 years ago • 1 comments
trafficstars

Metal images require a few extra files (net.toml, user-data.toml, and bootconfig.data) to be provisioned to boot and properly function. I'd like the ability to build an image which includes these files on the BOTTLEROCKET-PRIVATE partition. Doing this makes provisioning machines a single step: write the image.

The locations of the files could be passed to Buildsys as environment variables in the cargo make command, i.e. cargo make -e BUILDSYS_NET_CONFIG=net.toml ....

Another less desirable option is to have default locations for these files (root of the repo) and automatically build them into the image if the files exist, but automatically and implicitly including these files configures the image which could cause confusion and big problems.

zmrow avatar Jun 21 '22 15:06 zmrow

A better approach here might be the tool that @webern has pitched to allow for modifications of an existing image.

We could support operations like:

  • modifying root.json to allow an existing image to pull from different repositories
  • adding files like user-data.toml to the private partition
  • resigning kernel and bootloaders for Secure Boot

bcressey avatar Jun 22 '22 16:06 bcressey

@zmrow we would love the same feature as you.

We are using PXE in order to load OS on bare metal nodes. It is not clear to me how to apply the docs of provisioning on metal.

shahaf600 avatar Sep 28 '22 13:09 shahaf600

A better approach here might be the tool that @webern has pitched to allow for modifications of an existing image.

We could support operations like:

  • modifying root.json to allow an existing image to pull from different repositories
  • adding files like user-data.toml to the private partition
  • resigning kernel and bootloaders for Secure Boot

I created an issue to track this idea #2486

webern avatar Oct 12 '22 21:10 webern