When creating the ISO image, configurations are retrieved from the target cluster and are applied to the new nodes. You can override these configurations by specifying new values in either the nodes-config.yaml file or any flags you add to the oc adm node-image create command before you create the ISO image.
- YAML file parameters
-
Configuration parameters that can be specified in the
nodes-config.yamlfile are described in the following table:Table 1. nodes-config.yamlparametersParameter Description Values hosts:
Host configuration.
An array of host configuration objects.
hosts: hostname:
Hostname. Overrides the hostname obtained from either the Dynamic Host Configuration Protocol (DHCP) or a reverse DNS lookup. Each host must have a unique hostname supplied by one of these methods, although configuring a hostname through this parameter is optional.
String.
hosts: interfaces:
Provides a table of the name and MAC address mappings for the interfaces on the host. If a
NetworkConfigsection is provided in thenodes-config.yamlfile, this table must be included and the values must match the mappings provided in theNetworkConfigsection.An array of host configuration objects.
hosts: interfaces: name:The name of an interface on the host.
String.
hosts: interfaces: macAddress:The MAC address of an interface on the host.
A MAC address such as the following example:
00-B0-D0-63-C2-26.hosts: rootDeviceHints:
Enables provisioning of the {op-system-first} image to a particular device. The node-adding tool examines the devices in the order it discovers them, and compares the discovered values with the hint values. It uses the first discovered device that matches the hint value.
A dictionary of key-value pairs. For more information, see "Root device hints" in the "Setting up the environment for an OpenShift installation" page.
hosts: rootDeviceHints: deviceName:The name of the device the {op-system} image is provisioned to.
String.
hosts: networkConfig:
The host network definition. The configuration must match the Host Network Management API defined in the nmstate documentation.
A dictionary of host network configuration objects.
cpuArchitecture:
Optional. Specifies the architecture of the nodes you are adding. This parameter allows you to override the default value from the cluster when required.
String.
sshKey:
Optional. The file containing the SSH key to authenticate access to your cluster machines.
String.
bootArtifactsBaseURL:
Optional. Specifies the URL of the server to upload Preboot Execution Environment (PXE) assets to when you are generating an iPXE script. You must also set the
--pxeflag to generate PXE assets instead of an ISO image.String.
- Command flag options
-
You can use command flags with the
oc adm node-image createcommand to configure the nodes you are creating.The following table describes command flags that are not limited to the single-node use case:
Table 2. General command flags Flag Description Values --certificate-authorityThe path to a certificate authority bundle to use when communicating with the managed container image registries. If the
--insecureflag is used, this flag is ignored.String
--dirThe path containing the configuration file, if provided. This path is also used to store the generated artifacts.
String
--insecureAllows push and pull operations to registries to be made over HTTP.
Boolean
-o,--output-nameThe name of the generated output image.
String
p,--pxeGenerates Preboot Execution Environment (PXE) assets instead of a bootable ISO file.
When this flag is set, you can also use the
bootArtifactsBaseURLparameter in thenodes-config.yamlfile to specify URL of the server you will upload PXE assets to.Boolean
-a,--registry-configThe path to your registry credentials. Alternatively, you can specify the
REGISTRY_AUTH_FILEenvironment variable. The default paths are${XDG_RUNTIME_DIR}/containers/auth.json,/run/containers/${UID}/auth.json,${XDG_CONFIG_HOME}/containers/auth.json,${DOCKER_CONFIG},~/.docker/config.json,~/.dockercfg.The order can be changed through the deprecatedREGISTRY_AUTH_PREFERENCEenvironment variable to a "docker" value, in order to prioritize Docker credentials over Podman.String
-r,--reportGenerates a report of the node creation process regardless of whether the process is successful or not. If you do not specify this flag, reports are generated only in cases of failure.
Boolean
--skip-verificationAn option to skip verifying the integrity of the retrieved content. This is not recommended, but might be necessary when importing images from older image registries. Bypass verification only if the registry is known to be trustworthy.
Boolean
The following table describes command flags that can be used only when creating a single node:
Table 3. Single-node only command flags Flag Description Values -c,--cpu-architectureThe CPU architecture to be used to install the node. This flag can be used to create only a single node, and the
--mac-addressflag must be defined.String
--hostnameThe hostname to be set for the node. This flag can be used to create only a single node, and the
--mac-addressflag must be defined.String
-m,--mac-addressThe MAC address used to identify the host to apply configurations to. This flag can be used to create only a single node, and the
--mac-addressflag must be defined.String
--network-config-pathThe path to a YAML file containing NMState configurations to be applied to the node. This flag can be used to create only a single node, and the
--mac-addressflag must be defined.String
--root-device-hintA hint for specifying the storage location for the image root filesystem. The accepted format is
<hint_name>:<value>. This flag can be used to create only a single node, and the--mac-addressflag must be defined.String
-k,--ssh-key-pathThe path to the SSH key used to access the node. This flag can be used to create only a single node, and the
--mac-addressflag must be defined.String