Skip to content

Commit

Permalink
Add BMH boot-iso proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Hardy committed Nov 10, 2020
1 parent 1a0b33b commit dd64aed
Showing 1 changed file with 128 additions and 0 deletions.
128 changes: 128 additions & 0 deletions design/baremetal-operator/bmh_boot_iso.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!--
This work is licensed under a Creative Commons Attribution 3.0
Unported License.
http://creativecommons.org/licenses/by/3.0/legalcode
-->

# Add boot-iso API to BareMetalHost

## Status

provisional

## Summary

Add a new interface so that it is possible to boot arbitrary
iso images via Ironic when using redfish-virtualmedia.

## Motivation

In some circumstances it is desirable to boot an existing iso image
instead of having Ironic boot IPA, for example:

To reduce boot time for ephemeral workloads, it may be possible to boot an iso
and not deploy any image to disk (saving the time to write the image and reboot)

Where an alternative installer exists that is distributed as a live-iso, it
may be desirable to leverage that toolchain instead of the IPA deploy ramdisk,
for example the [fedora-coreos installer](https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal/)

An [Ironic API](https://docs.openstack.org/ironic/latest/admin/drivers/redfish.html#virtual-media-ramdisk) exists for this, but it's not currently accessible via metal3, so it would be desirable to optionally enable this workflow.

### Goals

Expose the Ironic API to boot iso images via metal3.

### Non-Goals

This only considers the case where the redfish-virtualmedia BMC
option is used, not any ability to boot arbitrary iso images via
PXE.

## Proposal

Add a new field to the BareMetalHost spec which indicates that instead of
deploying an image to disk, a live-iso image will be booted:

```
spec:
image:
iso: http://1.2.3.4/image.iso
online: true
```

Note that in this mode, `rootDeviceHints` and `userData` will not be used
since the image won't be written to disk, and Ironic doesn't
support passing user-data in addition to the iso attachment at present.

At some future point it would be desirable for Ironic to add the ability
to pass userData - then a generic iso could be booted with the ability
to define customization via the userData field in the normal way.

## Design Details

When this mode is selected, we need to configure Ironic to use the [ramdisk
deploy interface](https://docs.openstack.org/ironic/stein/admin/interfaces/deploy.html#ramdisk-deploy)
which is not currently enabled in ironic-image.

We will also need to write the provided ISO URL into the
[instance_info boot_iso field](https://docs.openstack.org/ironic/latest/admin/drivers/redfish.html#virtual-media-ramdisk)

This will only work when the redfish-virtual-media boot interface is selected
which will be the case when the `redfish-virtualmedia+http://foo` bmc address
is specified - we need to ensure validation exists to catch invalid combinations

### Risks and Mitigations

- Currently there is no detachment API in ironic, so in the case where an installer
iso is booted, we don't have a way to detach the virtualmedia and will have to
rely e.g on efibootmgr in whatever iso gets booted to ensure the correct boot device.

- The inspection of a BMH will still rely on booting IPA and there's no support for
fast-track provisioning in this workflow (since it's booting two different iso images)
so this adds a reboot into the process. This can potentially be avoided in some cases
where we can provide a status annotation on creation of the BMH such that inspection
is not performed.

- Similarly cleaning of a BMH will rely on IPA, so will require a reboot which may
not be desirable in some situations. This can potentially be avoided if cleaning
is globally disabled in the ironic-image configuration via the
[IRONIC_AUTOMATED_CLEAN](https://github.com/metal3-io/ironic-image/blob/master/configure-ironic.sh#L39)
variable but this doesn't provide any per-host control.

### Work Items

- Enable ramdisk deploy interface in ironic-image
- Add `iso` field to the BMH schema
- Update BMO deploy logic to set the `deploy_interface` and `instance_info` appropriately

### Dependencies



### Test Plan

This should be tested in CI - do we have any metal3 coverage for redfish-virtualmedia atm?

### Upgrade / Downgrade Strategy

This new field is added to the BMH API as an optional new interface, all existing
BMH interfaces should continue to work as before.

On upgrade this new interface will become available, and once in use it will not
be possible to downgrade, which given the expected use in net-new deployments
is probably reasonable.

## Alternatives

We could avoid exposing this interface and mandate all users rely on IPA to
deploy disk images, but this doesn't provide a good solution for the
emphemeral worload case, and requires testing/supporting two install paths
where a platform (such as FCOS mentioned) provides existing iso based
tooling to deploy to disk.


## References


0 comments on commit dd64aed

Please sign in to comment.