-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #791 from hs0210/proposal
Support RAID and BIOS configuration for baremetal IPI deployments
- Loading branch information
Showing
1 changed file
with
172 additions
and
0 deletions.
There are no files selected for viewing
172 changes: 172 additions & 0 deletions
172
enhancements/baremetal/baremetal-config-raid-and-bios.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
--- | ||
title: Config-RAID-and-BIOS-for-Baremetal-IPI-deployments | ||
authors: | ||
- "@fenggw-fnst" | ||
- "@Hellcatlk" | ||
- "@hs0210" | ||
- "@zhouhao3" | ||
- "@zhu1fei" | ||
reviewers: | ||
- "@dtantsur" | ||
- "@hardys" | ||
approvers: | ||
- | ||
creation-date: 2021-05-18 | ||
last-updated: 2021-08-23 | ||
status: implementable | ||
see-also: | ||
- | ||
replaces: | ||
- | ||
superseded-by: | ||
- | ||
--- | ||
|
||
# Config RAID and BIOS for Baremetal IPI deployments | ||
|
||
## Release Signoff Checklist | ||
|
||
- [x] Enhancement is `implementable` | ||
- [ ] Design details are appropriately documented from clear requirements | ||
- [ ] Test plan is defined | ||
- [ ] Operational readiness criteria is defined | ||
- [ ] Graduation criteria for dev preview, tech preview, GA | ||
- [ ] User-facing documentation is created in [openshift-docs](https://github.com/openshift/openshift-docs/) | ||
|
||
## Summary | ||
|
||
This enhancement proposes to add the support of RAID and BIOS configuration for baremetal IPI deployments. | ||
|
||
## Motivation | ||
|
||
With the new features of [RAID configuration](https://github.com/metal3-io/baremetal-operator/pull/292) and [BIOS configuration](https://github.com/metal3-io/baremetal-operator/pull/302), openshift already has the ability to configure RAID and BIOS for baremetal. | ||
|
||
However, these features only work with a running cluster, users cannot configure desired RAID and BIOS during IPI deployments. | ||
|
||
### Goals | ||
|
||
- Allow users to manage the RAID and BIOS configuration for control plane hosts during installation. | ||
- IPI deployments can handle the configuration of RAID and BIOS. | ||
|
||
### Non-Goals | ||
|
||
- Add new or vendor specific options regarding RAID and BIOS. | ||
|
||
## Proposal | ||
|
||
The configuration of RAID and BIOS is finally handed over to Ironic during the IPI deployments. | ||
1. The user runs `create manifests` and then adds RAID and BIOS fields to the **BMH** created by the installer. | ||
2. The interface to terraform in the installer code parses the BIOS and RAID fields. | ||
3. [Terraform-provider-ironic](https://github.com/openshift-metal3/terraform-provider-ironic) gets the | ||
configuration of RAID and BIOS for control plane hosts and then passes it to Ironic([Baremetal Operator(BMO)](https://github.com/metal3-io/baremetal-operator) | ||
has supported the process of RAID and BIOS for worker nodes). | ||
|
||
### User Stories | ||
|
||
With the addition of this feature, the users can configure RAID and BIOS in IPI deployments. | ||
|
||
### API Extensions | ||
|
||
N/A | ||
|
||
### Implementation Details/Notes/Constraints | ||
|
||
#### Fill two fields | ||
|
||
The user runs `create manifests` and then fill *raid* and *firmware* fields in the **BMH** created by the installer. | ||
|
||
```yaml | ||
spec: | ||
bmc: | ||
address: <bmc>://<ip-address> | ||
credentialsName: worker-0-bmc-secret | ||
bootMACAddress: mac-address | ||
raid: raid-config | ||
firmware: bios-config | ||
... | ||
``` | ||
|
||
#### Process the fields in installer | ||
|
||
For control plane hosts, transform the *raid* and *firmware* fields into string respectively and then write them into the | ||
***terraform.baremetal.auto.tfvars.json*** file as the values of *raid_config* and *bios_settings* respectively. | ||
|
||
#### Process the fields in terraform-provider-ironic | ||
|
||
Add *raid_config* and *bios_settings* fields to terraform-provider-ironic API, transform them back to struct format, and then call the | ||
methods in **BMO** to process the two fields to perform [manual cleaning](https://docs.openstack.org/ironic/latest/admin/cleaning.html#manual-cleaning). | ||
|
||
#### Notes | ||
|
||
When the IPI deployments completed, the **BMH** resources will still get persisted in the cluster, though control plane hosts have | ||
RAID and BIOS field in their **BMH**, but the *externallyProvisioned* field's value is true, so the RAID and BIOS configurations are | ||
invalid. | ||
|
||
### Risks and Mitigations | ||
|
||
N/A | ||
|
||
## Design Details | ||
|
||
### Test Plan | ||
|
||
- Unit tests for determining the configuration of RAID and BIOS passed to Ironic meeting expectations. | ||
- e2e tests for determining the configuration of RAID and BIOS configured during the IPI deployments. | ||
|
||
### Graduation Criteria | ||
|
||
N/A | ||
|
||
#### Dev Preview -> Tech Preview | ||
|
||
N/A | ||
|
||
#### Tech Preview -> GA | ||
|
||
N/A | ||
|
||
#### Removing a deprecated feature | ||
|
||
N/A | ||
|
||
### Upgrade / Downgrade Strategy | ||
|
||
Older versions of the installer will ignore the *raid* and *firmware* fields. | ||
|
||
### Version Skew Strategy | ||
|
||
N/A | ||
|
||
### Operational Aspects of API Extensions | ||
|
||
N/A | ||
|
||
#### Failure Modes | ||
|
||
N/A | ||
|
||
#### Support Procedures | ||
|
||
N/A | ||
|
||
## Implementation History | ||
|
||
- [Implementation on openshift/installer](https://github.com/hs0210/installer/tree/ipi-support-raid-bios) | ||
- [Implementation on openshift-metal3/terraform-provider-ironic](https://github.com/hs0210/terraform-provider-ironic/tree/ipi-support-raid-bios) | ||
|
||
## Drawbacks | ||
|
||
This will increase the number of steps in IPI deployments and take longer. | ||
|
||
## Alternatives | ||
|
||
### Modify manifest files | ||
|
||
It is already possible to modify the manifest files generated by the installer, but currently any changes to RAID or BIOS config will | ||
only have any affect for workers hosts. It is desirable to enable configuration of both master and worker hosts via the same method. | ||
|
||
### Modify install-config | ||
|
||
Add *raid* and *firmware* to the **install-config.yaml** and process them to manifests which can be got and handed over to ironic by | ||
terraform-provider-ironic. But install-config need to be small and limited to things that almost every deployment needs to manage, | ||
so this way may violate the original intention of openshift. |