|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * post_installation_configuration/machine-configuration-tasks.adoc |
| 4 | + |
| 5 | +[id="rhcos-load-firmware-blobs_{context}"] |
| 6 | += Loading custom firmware blobs in the machine config manifest |
| 7 | + |
| 8 | +Because the default location for firmware blobs in `/usr/lib` is read-only, you can locate a custom firmware blob by updating the search path. This enables you to load local firmware blobs in the machine config manifest when the blobs are not managed by {op-system}. |
| 9 | + |
| 10 | +.Procedure |
| 11 | + |
| 12 | +. Create a Butane config file, `98-worker-firmware-blob.bu`, that updates the search path so that it is root-owned and writable to local storage. The following example places the custom blob file from your local workstation onto nodes under `/var/lib/firmware`. |
| 13 | ++ |
| 14 | +[NOTE] |
| 15 | +==== |
| 16 | +See "Creating machine configs with Butane" for information about Butane. |
| 17 | +==== |
| 18 | +.Butane config file for custom firmware blob |
| 19 | ++ |
| 20 | +[source,yaml] |
| 21 | +---- |
| 22 | +variant: openshift |
| 23 | +version: 4.9.0 |
| 24 | +metadata: |
| 25 | + labels: |
| 26 | + machineconfiguration.openshift.io/role: worker |
| 27 | + name: 98-worker-firmware-blob |
| 28 | +storage: |
| 29 | + files: |
| 30 | + - path: /var/lib/firmware/<package_name> <1> |
| 31 | + contents: |
| 32 | + local: <package_name> <2> |
| 33 | + mode: 0644 <3> |
| 34 | +openshift: |
| 35 | + kernel_arguments: |
| 36 | + - 'firmware_class.path=/var/lib/firmware' <4> |
| 37 | +---- |
| 38 | ++ |
| 39 | +<1> Sets the path on the node where the firmware package is copied to. |
| 40 | +<2> Specifies a file with contents that are read from a local file directory on the system running Butane. The path of the local file is relative to a `files-dir` directory, which must be specified by using the `--files-dir` option with Butane in the following step. |
| 41 | +<3> Sets the permissions for the file on the {op-system} node. It is recommended to set `0644` permissions. |
| 42 | +<4> The `firmware_class.path` parameter customizes the kernel search path of where to look for the custom firmware blob that was copied from your local workstation onto the root file system of the node. This example uses `/var/lib/firmware` as the customized path. |
| 43 | + |
| 44 | +. Run Butane to generate a `MachineConfig` object file that uses a copy of the firmware blob on your local workstation named `98-worker-firmware-blob.yaml`. The firmware blob contains the configuration to be delivered to the nodes. The following example uses the `--files-dir` option to specify the directory on your workstation where the local file or files are located: |
| 45 | ++ |
| 46 | +[source,terminal] |
| 47 | +---- |
| 48 | +$ butane 98-worker-firmware-blob.bu -o 98-worker-firmware-blob.yaml --files-dir <directory_including_package_name> |
| 49 | +---- |
| 50 | +. Apply the configurations to the nodes in one of two ways: |
| 51 | ++ |
| 52 | +* If the cluster is not running yet, after you generate manifest files, add the `MachineConfig` object file to the `<installation_directory>/openshift` directory, and then continue to create the cluster. |
| 53 | ++ |
| 54 | +* If the cluster is already running, apply the file: |
| 55 | ++ |
| 56 | +[source,terminal] |
| 57 | +---- |
| 58 | +$ oc apply -f 98-worker-firmware-blob.yaml |
| 59 | +---- |
| 60 | ++ |
| 61 | +A `MachineConfig` object YAML file is created for you to finish configuring your machines. |
| 62 | ++ |
| 63 | +. Save the Butane config in case you need to update the `MachineConfig` object in the future. |
0 commit comments