1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 03:47:04 +01:00
Files
openshift-docs/modules/machine-user-infra-machines-iso.adoc
2025-11-17 14:08:48 +00:00

101 lines
4.8 KiB
Plaintext

// Module included in the following assemblies:
//
// * machine_management/user_infra/adding-bare-metal-compute-user-infra.adoc
// * post_installation_configuration/node-tasks.adoc
// * post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-ibm-power.adoc
ifeval::["{context}" == "multi-architecture-configuration"]
:multi:
endif::[]
ifeval::["{context}" == "creating-multi-arch-compute-nodes-ibm-power"]
:ibm-power:
endif::[]
:_mod-docs-content-type: PROCEDURE
[id="machine-user-infra-machines-iso_{context}"]
= Creating {op-system} machines using an ISO image
ifndef::ibm-power[]
You can create more {op-system-first} compute machines for your bare metal cluster by using an ISO image to create the machines.
endif::ibm-power[]
ifdef::ibm-power[]
You can create more {op-system-first} compute machines for your cluster by using an ISO image to create the machines.
endif::ibm-power[]
.Prerequisites
* Obtain the URL of the Ignition config file for the compute machines for your cluster. You uploaded this file to your HTTP server during installation.
* You must have the OpenShift CLI (`oc`) installed.
.Procedure
. Extract the Ignition config file from the cluster by running the following command:
+
[source,terminal]
----
$ oc extract -n openshift-machine-api secret/worker-user-data-managed --keys=userData --to=- > worker.ign
----
. Upload the `worker.ign` Ignition config file you exported from your cluster to your HTTP server. Note the URLs of these files.
. You can validate that the ignition files are available on the URLs. The following example gets the Ignition config files for the compute node:
+
[source,terminal]
----
$ curl -k http://<HTTP_server>/worker.ign
----
. You can access the ISO image for booting your new machine by running to following command:
+
[source,terminal]
----
RHCOS_VHD_ORIGIN_URL=$(oc -n openshift-machine-config-operator get configmap/coreos-bootimages -o jsonpath='{.data.stream}' | jq -r '.architectures.<architecture>.artifacts.metal.formats.iso.disk.location')
----
. Use the ISO file to install {op-system} on more compute machines. Use the same method that you used when you created machines before you installed the cluster:
** Burn the ISO image to a disk and boot it directly.
** Use ISO redirection with a LOM interface.
. Boot the {op-system} ISO image without specifying any options, or interrupting the live boot sequence. Wait for the installer to boot into a shell prompt in the {op-system} live environment.
+
[NOTE]
====
You can interrupt the {op-system} installation boot process to add kernel arguments. However, for this ISO procedure you must use the `coreos-installer` command as outlined in the following steps, instead of adding kernel arguments.
====
. Run the `coreos-installer` command and specify the options that meet your installation requirements. At a minimum, you must specify the URL that points to the Ignition config file for the node type, and the device that you are installing to:
+
[source,terminal]
----
$ sudo coreos-installer install --ignition-url=http://<HTTP_server>/<node_type>.ign <device> --ignition-hash=sha512-<digest> <1><2>
----
<1> You must run the `coreos-installer` command by using `sudo`, because the `core` user does not have the required root privileges to perform the installation.
<2> The `--ignition-hash` option is required when the Ignition config file is obtained through an HTTP URL to validate the authenticity of the Ignition config file on the cluster node. `<digest>` is the Ignition config file SHA512 digest obtained in a preceding step.
+
[NOTE]
====
If you want to provide your Ignition config files through an HTTPS server that uses TLS, you can add the internal certificate authority (CA) to the system trust store before running `coreos-installer`.
====
+
The following example initializes a compute node installation to the `/dev/sda` device. The Ignition config file for the compute node is obtained from an HTTP web server with the IP address 192.168.1.2:
+
[source,terminal]
----
$ sudo coreos-installer install --ignition-url=http://192.168.1.2:80/installation_directory/worker.ign /dev/sda --ignition-hash=sha512-a5a2d43879223273c9b60af66b44202a1d1248fc01cf156c46d4a79f552b6bad47bc8cc78ddf0116e80c59d2ea9e32ba53bc807afbca581aa059311def2c3e3b
----
. Monitor the progress of the {op-system} installation on the console of the machine.
+
[IMPORTANT]
====
Ensure that the installation is successful on each node before commencing with the {product-title} installation. Observing the installation process can also help to determine the cause of {op-system} installation issues that might arise.
====
. Continue to create more compute machines for your cluster.
ifeval::["{context}" == "multi-architecture-configuration"]
:!multi:
endif::[]
ifeval::["{context}" == "creating-multi-arch-compute-nodes-ibm-power"]
:!ibm-power:
endif::[]