rancher / elemental-toolkit

:snowflake: The toolkit to build, ship and maintain cloud-init driven Linux derivatives based on container images
https://rancher.github.io/elemental-toolkit/docs/
Apache License 2.0
289 stars 49 forks source link

Support CAPA/CAPZ/CAPG-ready SLE Micro images #1978

Open anmazzotti opened 6 months ago

anmazzotti commented 6 months ago

When using CAPA we are relying on AWS hosted images.
Normally, the images coming from the AWS marketplace should be enough.
Publishing a SLE Micro image there would solve the issue.

However, when working in airgap mode, the images need some custom baking to add some specific version of the k8s binaries, like rke2 for example.
This would require the user to bake custom images through the provider-specific image building/publishing tool.

The elemental-toolkit could be a provider agnostic (and recommended) way to bake these custom images.
This should mostly involve documentation, with a custom section on how to publish the images for consumption on each provider.

It can be extended to e2e test coverage, to make sure that elemental built images can be published to each supported provider and can be used to deploy a cluster, using rancher-turtles with the cluster-api-provider-rke2.

anmazzotti commented 6 months ago

For example, for CAPA this should translate to:

  1. Create a raw disk image using elemental-toolkit
  2. Push the image as raw object to a S3 bucket
  3. Import the disk as snapshot
  4. Create an AMI from the snapshot
  5. Reference the AMI when creating new CAPI AWSMachineTemplates

This can all be automated through CLI, so the first 4 steps could just be done periodically or on demand by a CI agent.

anmazzotti commented 6 months ago

Similarly, for CAPG:

  1. Create a raw disk image using elemental-toolkit
  2. Import the raw image on GCP
  3. Reference the image when creating new CAPI GCPMachineTemplates