Skip to content

Commit

Permalink
Add raw SeedImage documentation (#261)
Browse files Browse the repository at this point in the history
Add new fields to SeedImage reference:

* Type
* TargetPlatform
* BuildContainer

Signed-off-by: Fredrik Lönnegren <[email protected]>
  • Loading branch information
frelon authored Jan 5, 2024
1 parent c52bc2f commit 3e89fba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
22 changes: 18 additions & 4 deletions docs/seedimage-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ title: ''

# SeedImage reference

A `SeedImage` resource allows to build an ISO that can be used to install Elemental onto a node.
It requires a `baseImage`, i.e., a URL to an Elemental installation ISO, and a `registrationRef` reference to a `MachineRegistration` resource, from which the registration part of the Elemental configuration is extracted and injected in the ISO to produce the final *seed image*.
It is also possible to inject ISO customizations in the `cloud-config` field.
A `SeedImage` resource allows to build an installation media that can be used to install Elemental onto a node.
It requires a `baseImage`, i.e., a URL to an Elemental installation ISO or node container image, and a `registrationRef` reference to a `MachineRegistration` resource, from which the registration part of the Elemental configuration is extracted and injected in the media to produce the final *seed image*.
It is also possible to inject customizations in the `cloud-config` field.

Once the seed image is ready, the download URL is shared in the `.status.downloadURL` field.
It stays available for download for `cleanupAfterMinutes` minutes (default is `60`, 1 hour), after which it is deleted.
It stays available for download for `cleanupAfterMinutes` minutes (default is `60`, 1 hour), after which it is deleted.
Setting `retriggerBuild` to `true` retriggers the seed image build process while setting `cleanupAfterMinutes` to `0` keeps the seed image around till the `SeedImage` resource is deleted.

The `SeedImage` resource also has a `type` field which can be set to either `iso`, to build an ISO, or `raw` to build a raw disk image. Raw disk images can be copied directly to the target drive and on first boot will automatically boot into a recovery partition to expand the drive to use the available disk space and register the node, after which it will reboot the same way as for the ISO installation.

If no `BuildContainer` is specified for the seed-image it will be automatically filled in based on default values and `type`.

Building a SeedImage for a different platform is accomplished using the `targetPlatform` field. The platform is specified using `os/arch`, for example (`linux/amd64` or `linux/arm64`). By default the image will be built for the same platform that the operator is hosted on.

:::warning seed images may fill up local storage
The seed images are kept on the node's local storage: pay attention to the number of `SeedImage` resources you start concurrently and to the ones you may leave around with the auto-cleanup feature disabled (`cleanupAfterMinutes` = `0`) as you may exhaust the storage on your cluster nodes.
:::
Expand All @@ -36,7 +42,15 @@ The `SeedImage` resource tracks the seed image build process through two status
name: ...
namespace: ...
spec:
type: ...
baseImage: ...
targetPlatform: ...
buildContainer:
name: ...
image: ...
command: [...]
args: [...]
imagePullPolicy: ...
cloud-config: ...
registrationRef:
name: ...
Expand Down
1 change: 1 addition & 0 deletions examples/quickstart/seedimage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: fire-img
namespace: fleet-default
spec:
type: iso
baseImage: registry.suse.com/rancher/elemental-teal-iso/5.4:1.2.2
registrationRef:
apiVersion: elemental.cattle.io/v1beta1
Expand Down

0 comments on commit 3e89fba

Please sign in to comment.