-
Notifications
You must be signed in to change notification settings - Fork 1.8k
HCIDOCS-72: DS & RN: METAL-650 Attach non-bootable ISO to BMH #77467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
98 changes: 98 additions & 0 deletions
98
modules/bmo-attaching-a-non-bootable-iso-to-a-bare-metal-node.adoc
This file contains hidden or 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,98 @@ | ||
// This module is included in the following assemblies: | ||
// | ||
// * post_installation_configuration/bare-metal-configuration.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="attaching-a-non-bootable-iso-to-a-bare-metal-node_{context}"] | ||
= Attaching a non-bootable ISO to a bare-metal node | ||
|
||
You can attach a generic, non-bootable ISO virtual media image to a provisioned node by using the `DataImage` resource. After you apply the resource, the ISO image becomes accessible to the operating system after it has booted. This is useful for configuring a node after provisioning the operating system and before the node boots for the first time. | ||
|
||
.Prerequisites | ||
|
||
* The node must use Redfish or drivers derived from it to support this feature. | ||
* The node must be in the `Provisioned` or `ExternallyProvisioned` state. | ||
* The `name` must be the same as the name of the node defined in its `BareMetalHost` resource. | ||
* You have a valid `url` to the ISO image. | ||
|
||
.Procedure | ||
|
||
. Create a `DataImage` resource: | ||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: metal3.io/v1alpha1 | ||
kind: DataImage | ||
metadata: | ||
name: <node_name> # <1> | ||
spec: | ||
url: "http://dataimage.example.com/non-bootable.iso" # <2> | ||
---- | ||
<1> Specify the name of the node as defined in its `BareMetalHost` resource. | ||
<2> Specify the URL and path to the ISO image. | ||
|
||
. Save the `DataImage` resource to a file by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ vim <node_name>-dataimage.yaml | ||
---- | ||
|
||
. Apply the `DataImage` resource by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc apply -f <node_name>-dataimage.yaml -n <node_namespace> <1> | ||
---- | ||
<1> Replace `<node_namespace>` so that the namespace matches the namespace for the `BareMetalHost` resource. For example, `openshift-machine-api`. | ||
|
||
. Reboot the node. | ||
+ | ||
[NOTE] | ||
==== | ||
You can physically reboot the node. You can also attach the `reboot.metal3.io` annotation or reset set the `online` status in the `BareMetalHost` resource. A forced reboot of the bare-metal node will change the state of the node to `NotReady` for awhile. For example, 5 minutes or more. | ||
==== | ||
|
||
. View the `DataImage` resource by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc get dataimage <node_name> -n openshift-machine-api -o yaml | ||
johnwilkins marked this conversation as resolved.
Show resolved
Hide resolved
|
||
---- | ||
+ | ||
.Example output | ||
[source,yaml] | ||
---- | ||
apiVersion: v1 | ||
items: | ||
- apiVersion: metal3.io/v1alpha1 | ||
kind: DataImage | ||
metadata: | ||
annotations: | ||
kubectl.kubernetes.io/last-applied-configuration: | | ||
{"apiVersion":"metal3.io/v1alpha1","kind":"DataImage","metadata":{"annotations":{},"name":"bmh-node-1","namespace":"openshift-machine-api"},"spec":{"url":"http://dataimage.example.com/non-bootable.iso"}} | ||
creationTimestamp: "2024-06-10T12:00:00Z" | ||
finalizers: | ||
- dataimage.metal3.io | ||
generation: 1 | ||
name: bmh-node-1 | ||
namespace: openshift-machine-api | ||
ownerReferences: | ||
- apiVersion: metal3.io/v1alpha1 | ||
blockOwnerDeletion: true | ||
controller: true | ||
kind: BareMetalHost | ||
name: bmh-node-1 | ||
uid: 046cdf8e-0e97-485a-8866-e62d20e0f0b3 | ||
resourceVersion: "21695581" | ||
uid: c5718f50-44b6-4a22-a6b7-71197e4b7b69 | ||
spec: | ||
url: http://dataimage.example.com/non-bootable.iso | ||
status: | ||
attachedImage: | ||
url: http://dataimage.example.com/non-bootable.iso | ||
error: | ||
count: 0 | ||
message: "" | ||
lastReconciled: "2024-06-10T12:05:00Z" | ||
---- |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.