$ mkdir ibi-iso-workdir (1)
Use the openshift-install
program to create a live installation ISO for preinstalling single-node OpenShift on bare-metal hosts. For more information about downloading the installation program, see "Installation process" in the "Additional resources" section.
The installation program takes a seed image URL and other inputs, such as the release version of the seed image and the disk to use for the installation process, and creates a live installation ISO. You can then start the host using the live installation ISO to begin preinstallation. When preinstallation is complete, the host is ready to ship to a remote site for the final site-specific configuration and deployment.
The following are the high-level steps to preinstall a single-node OpenShift cluster using an image-based installation:
Generate a seed image.
Create a live installation ISO using the openshift-install
installation program.
Boot the host using the live installation ISO to preinstall the host.
You can embed your single-node OpenShift seed image URL, and other installation artifacts, in a live installation ISO by using the openshift-install
program.
For more information about the specification for the |
You generated a seed image from a single-node OpenShift seed cluster.
You downloaded the latest version of the openshift-install
program.
The target host has network access to the seed image URL and all other installation artifacts.
If you require static networking, you must install the nmstatectl
library on the host that creates the live installation ISO.
Create a live installation ISO and embed your single-node OpenShift seed image URL and other installation artifacts:
Create a working directory by running the following:
$ mkdir ibi-iso-workdir (1)
1 | Replace ibi-iso-workdir with the name of your working directory. |
Optional. Create an installation configuration template to use as a reference when configuring the ImageBasedInstallationConfig
resource:
$ openshift-install image-based create image-config-template --dir ibi-iso-workdir (1)
1 | If you do not specify a working directory, the command uses the current directory. |
INFO Image-Config-Template created in: ibi-iso-workdir
The command creates the image-based-installation-config.yaml
installation configuration template in your target directory:
#
# Note: This is a sample ImageBasedInstallationConfig file showing
# which fields are available to aid you in creating your
# own image-based-installation-config.yaml file.
#
apiVersion: v1beta1
kind: ImageBasedInstallationConfig
metadata:
name: example-image-based-installation-config
# The following fields are required
seedImage: quay.io/openshift-kni/seed-image:4.17.0
seedVersion: 4.17.0
installationDisk: /dev/vda
pullSecret: '<your_pull_secret>'
# networkConfig is optional and contains the network configuration for the host in NMState format.
# See https://nmstate.io/examples.html for examples.
# networkConfig:
# interfaces:
# - name: eth0
# type: ethernet
# state: up
# mac-address: 00:00:00:00:00:00
# ipv4:
# enabled: true
# address:
# - ip: 192.168.122.2
# prefix-length: 23
# dhcp: false
Edit your installation configuration file:
image-based-installation-config.yaml
fileapiVersion: v1beta1
kind: ImageBasedInstallationConfig
metadata:
name: example-image-based-installation-config
seedImage: quay.io/repo-id/seed:latest
seedVersion: "4.17.0"
extraPartitionStart: "-240G"
installationDisk: /dev/disk/by-id/wwn-0x62c...
sshKey: 'ssh-ed25519 AAAA...'
pullSecret: '{"auths": ...}'
networkConfig:
interfaces:
- name: ens1f0
type: ethernet
state: up
ipv4:
enabled: true
dhcp: false
auto-dns: false
address:
- ip: 192.168.200.25
prefix-length: 24
ipv6:
enabled: false
dns-resolver:
config:
server:
- 192.168.15.47
- 192.168.15.48
routes:
config:
- destination: 0.0.0.0/0
metric: 150
next-hop-address: 192.168.200.254
next-hop-interface: ens1f0
Create the live installation ISO by running the following command:
$ openshift-install image-based create image --dir ibi-iso-workdir
INFO Consuming Image-based Installation ISO Config from target directory
INFO Creating Image-based Installation ISO with embedded ignition
View the output in the working directory:
ibi-iso-workdir/
└── rhcos-ibi.iso
Using your preferred method, boot the target bare-metal host from the rhcos-ibi.iso
live installation ISO to preinstall single-node OpenShift.
Login to the target host.
View the system logs by running the following command:
$ journalctl -b
Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="All the precaching threads have finished."
Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Total Images: 125"
Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Images Pulled Successfully: 125"
Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Images Failed to Pull: 0"
Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Completed executing pre-caching"
Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13T17:01:44Z" level=info msg="Pre-cached images successfully."
Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13 17:01:44" level=info msg="Skipping shutdown"
Aug 13 17:01:44 10.46.26.129 install-rhcos-and-restore-seed.sh[2876]: time="2024-08-13 17:01:44" level=info msg="IBI preparation process finished successfully!"
Aug 13 17:01:44 10.46.26.129 systemd[1]: var-lib-containers-storage-overlay.mount: Deactivated successfully.
Aug 13 17:01:44 10.46.26.129 systemd[1]: Finished SNO Image-based Installation.
Aug 13 17:01:44 10.46.26.129 systemd[1]: Reached target Multi-User System.
Aug 13 17:01:44 10.46.26.129 systemd[1]: Reached target Graphical Interface.
The following content describes the specifications for the image-based-installation-config.yaml
manifest.
The openshift-install
program uses the image-based-installation-config.yaml
manifest to create a live installation ISO for image-based installations of single-node OpenShift.
Specification | Type | Description |
---|---|---|
|
|
Specifies the seed image to use in the ISO generation process. |
|
|
Specifies the OpenShift Container Platform release version of the seed image. The release version in the seed image must match the release version that you specify in the |
|
|
Specifies the disk that will be used for the installation process. Because the disk discovery order is not guaranteed, the kernel name of the disk can change across booting options for machines with multiple disks. For example, |
|
|
Specifies the pull secret to use during the precache process. The pull secret contains authentication credentials for pulling the release payload images from the container registry. If the seed image requires a separate private registry authentication, add the authentication details to the pull secret. |
Specification | Type | Description | ||
---|---|---|---|---|
|
|
Specifies if the host shuts down after the installation process completes. The default value is |
||
|
|
Specifies the start of the extra partition used for |
||
|
|
The label of the extra partition you use for
|
||
|
|
The number of the extra partition you use for |
||
|
|
The installation process formats the disk on the host. Set this specification to 'true' to skip this step. The default is |
||
|
|
Specifies networking configurations for the host, for example:
If you require static networking, you must install the
|
||
|
|
Specifies proxy settings to use during the installation ISO generation, for example:
|
||
|
|
Specifies the sources or repositories for the release-image content, for example:
|
||
|
|
Specifies the PEM-encoded X.509 certificate bundle. The installation program adds this to the
|
||
|
|
Specifies the SSH key to authenticate access to the host. |
||
|
|
Specifies a JSON string containing the user overrides for the Ignition config. The configuration merges with the Ignition config file generated by the installation program. This feature requires Ignition version is 3.2 or later. |