Skip to content

Commit 7016b34

Browse files
authored
Merge pull request #88177 from skopacz1/OSDOCS-12787
OSDOCS-12787: iSCSI booting for Agent
2 parents 234208d + fe38323 commit 7016b34

File tree

7 files changed

+142
-9
lines changed

7 files changed

+142
-9
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ Topics:
415415
File: installing-with-agent-based-installer
416416
- Name: Preparing PXE assets for OCP
417417
File: prepare-pxe-assets-agent
418+
- Name: Preparing installation assets for iSCSI booting
419+
File: installing-using-iscsi
418420
- Name: Preparing an Agent-based installed cluster for the multicluster engine for Kubernetes
419421
File: preparing-an-agent-based-installed-cluster-for-mce
420422
- Name: Installation configuration parameters for the Agent-based Installer
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="installing-using-iscsi"]
3+
= Preparing installation assets for iSCSI booting
4+
include::_attributes/common-attributes.adoc[]
5+
:context: installing-using-iscsi
6+
7+
toc::[]
8+
9+
You can boot an {product-title} cluster through Internet Small Computer System Interface (iSCSI) by using an ISO image generated by the Agent-based Installer.
10+
The following procedures describe how to prepare the necessary installation resources to boot from an iSCSI target.
11+
12+
The assets you create in these procedures deploy a single-node {product-title} installation.
13+
You can use these procedures as a basis and modify configurations according to your requirements.
14+
15+
// Downloading the Agent-based Installer
16+
include::modules/installing-ocp-agent-iscsi-requirements.adoc[leveloffset=+1]
17+
18+
[role="_additional-resources"]
19+
.Additional resources
20+
* xref:../../installing/installing_with_agent_based_installer/preparing-to-install-with-agent-based-installer.adoc#agent-install-networking-DHCP_preparing-to-install-with-agent-based-installer[DHCP]
21+
* xref:../../installing/installing_with_agent_based_installer/preparing-to-install-with-agent-based-installer.adoc#root-device-hints_preparing-to-install-with-agent-based-installer[About root device hints]
22+
23+
[id="prerequisites_{context}"]
24+
== Prerequisites
25+
26+
* You reviewed details about the xref:../../architecture/architecture-installation.adoc#architecture-installation[{product-title} installation and update] processes.
27+
* You read the documentation on xref:../../installing/overview/installing-preparing.adoc#installing-preparing[selecting a cluster installation method and preparing it for users].
28+
* If you use a firewall or proxy, you xref:../../installing/install_config/configuring-firewall.adoc#configuring-firewall[configured it to allow the sites] that your cluster requires access to.
29+
30+
// Downloading the Agent-based Installer
31+
include::modules/installing-ocp-agent-download.adoc[leveloffset=+1]
32+
33+
// Creating the preferred configuration inputs
34+
include::modules/installing-ocp-agent-inputs.adoc[leveloffset=+1]
35+
36+
[role="_additional-resources"]
37+
.Additional resources
38+
* xref:../../installing/installing_bare_metal/ipi/ipi-install-installation-workflow.adoc#modifying-install-config-for-dual-stack-network_ipi-install-installation-workflow[Deploying with dual-stack networking]
39+
* xref:../../installing/installing_bare_metal/ipi/ipi-install-installation-workflow.adoc#configuring-the-install-config-file_ipi-install-installation-workflow[Configuring the install-config yaml file]
40+
* xref:../../installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc#installation-three-node-cluster_installing-restricted-networks-bare-metal[Configuring a three-node cluster]
41+
* xref:../../installing/installing_with_agent_based_installer/preparing-to-install-with-agent-based-installer.adoc#root-device-hints_preparing-to-install-with-agent-based-installer[About root device hints]
42+
* link:https://nmstate.io/examples.html[NMState state examples] (NMState documentation)
43+
* xref:../../installing/installing_with_agent_based_installer/installing-with-agent-based-installer.adoc#installing-ocp-agent-opt-manifests_installing-with-agent-based-installer[Optional: Creating additional manifest files]
44+
* xref:../../installing/installing_with_agent_based_installer/installing-with-agent-based-installer.adoc#agent-install-verifying-architectures_installing-with-agent-based-installer[Verifying the supported architecture for an Agent-based installation]
45+
46+
// Creating the installation files
47+
include::modules/installing-ocp-agent-iscsi-files.adoc[leveloffset=+1]

installing/installing_with_agent_based_installer/installing-with-agent-based-installer.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ include::modules/installing-ocp-agent-verify.adoc[leveloffset=+2]
8383
.Additional resources
8484
* See xref:../../installing/installing_bare_metal/ipi/ipi-install-installation-workflow.adoc#modifying-install-config-for-dual-stack-network_ipi-install-installation-workflow[Deploying with dual-stack networking].
8585
* See xref:../../installing/installing_bare_metal/ipi/ipi-install-installation-workflow.adoc#configuring-the-install-config-file_ipi-install-installation-workflow[Configuring the install-config yaml file].
86-
* See xref:../../installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc#installation-three-node-cluster_installing-restricted-networks-bare-metal[Configuring a three-node cluster] to deploy three-node clusters in bare metal environments.
86+
* See xref:../../installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc#installation-three-node-cluster_installing-restricted-networks-bare-metal[Configuring a three-node cluster] to deploy three-node clusters in bare-metal environments.
8787
* See xref:../../installing/installing_with_agent_based_installer/preparing-to-install-with-agent-based-installer.adoc#root-device-hints_preparing-to-install-with-agent-based-installer[About root device hints].
8888
* See link:https://nmstate.io/examples.html[NMState state examples].
8989

modules/installing-ocp-agent-download.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//
33
// * installing/installing-with-agent-based-installer/installing-with-agent-based-installer.adoc
44
// * installing/installing_with_agent_based_installer/prepare-pxe-infra-agent.adoc
5+
// * installing/installing_with_agent_based_installer/installing-using-iscsi.adoc
56

67
:_mod-docs-content-type: PROCEDURE
78
[id="installing-ocp-agent-retrieve_{context}"]

modules/installing-ocp-agent-inputs.adoc

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,40 @@
22
//
33
// * installing/installing-with-agent-based-installer/installing-with-agent-based-installer.adoc
44
// *installing/installing_with_agent_based_installer/prepare-pxe-infra-agent.adoc
5+
// * installing/installing_with_agent_based_installer/installing-using-iscsi.adoc
56

67
ifeval::["{context}" == "prepare-pxe-assets-agent"]
78
:pxe-boot:
89
endif::[]
910

11+
ifeval::["{context}" == "installing-using-iscsi"]
12+
:iscsi-boot:
13+
endif::[]
14+
1015
:_mod-docs-content-type: PROCEDURE
1116
[id="installing-ocp-agent-inputs_{context}"]
1217
= Creating the preferred configuration inputs
1318

1419
ifndef::pxe-boot[]
1520
Use this procedure to create the preferred configuration inputs used to create the agent image.
21+
22+
[NOTE]
23+
====
24+
Configuring the `install-config.yaml` and `agent-config.yaml` files is the preferred method for using the Agent-based Installer. Using {ztp} manifests is optional.
25+
====
1626
endif::pxe-boot[]
1727
ifdef::pxe-boot[]
1828
Use this procedure to create the preferred configuration inputs used to create the PXE files.
29+
30+
[NOTE]
31+
====
32+
Configuring the `install-config.yaml` and `agent-config.yaml` files is the preferred method for using the Agent-based Installer. Using {ztp} manifests is optional.
33+
====
1934
endif::pxe-boot[]
2035

2136
.Procedure
2237

23-
. Install `nmstate` dependency by running the following command:
38+
. Install the `nmstate` dependency by running the following command:
2439
+
2540
[source,terminal]
2641
----
@@ -36,12 +51,6 @@ $ sudo dnf install /usr/bin/nmstatectl -y
3651
$ mkdir ~/<directory_name>
3752
----
3853

39-
+
40-
[NOTE]
41-
====
42-
This is the preferred method for the Agent-based installation. Using {ztp} manifests is optional.
43-
====
44-
4554
. Create the `install-config.yaml` file by running the following command:
4655
+
4756
--
@@ -86,7 +95,7 @@ If you are using the release image with the `multi` payload, you can install the
8695
+
8796
[NOTE]
8897
====
89-
For bare metal platforms, host settings made in the platform section of the `install-config.yaml` file are used by default, unless they are overridden by configurations made in the `agent-config.yaml` file.
98+
For bare-metal platforms, host settings made in the platform section of the `install-config.yaml` file are used by default, unless they are overridden by configurations made in the `agent-config.yaml` file.
9099
====
91100
<5> Specify your pull secret.
92101
<6> Specify your SSH public key.
@@ -173,6 +182,7 @@ hosts: // <2>
173182
next-hop-address: 192.168.111.2
174183
next-hop-interface: eno1
175184
table-id: 254
185+
ifdef::iscsi-boot[minimalISO: true <6>]
176186
EOF
177187
----
178188
+
@@ -182,6 +192,10 @@ You must provide the rendezvous IP address when you do not specify at least one
182192
<3> Optional: 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.
183193
<4> Enables provisioning of the {op-system-first} image to a particular device. The installation program 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.
184194
<5> Optional: Configures the network interface of a host in NMState format.
195+
ifdef::iscsi-boot[]
196+
<6> Generates an ISO image without the rootfs image file, and instead provides details about where to pull the rootfs file from.
197+
You must set this parameter to `true` to enable iSCSI booting.
198+
endif::iscsi-boot[]
185199

186200
ifdef::pxe-boot[]
187201

@@ -203,3 +217,7 @@ endif::pxe-boot[]
203217
ifeval::["{context}" == "prepare-pxe-assets-agent"]
204218
:!pxe-boot:
205219
endif::[]
220+
221+
ifeval::["{context}" == "installing-using-iscsi"]
222+
:!iscsi-boot:
223+
endif::[]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * installing/installing_with_agent_based_installer/installing-using-iscsi.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="installing-ocp-agent-iscsi-files_{context}"]
7+
= Creating the installation files
8+
9+
Use the following procedure to generate the ISO image and create an iPXE script to upload to your iSCSI target.
10+
11+
.Procedure
12+
13+
. Create the agent image by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ openshift-install --dir <install_directory> agent create image
18+
----
19+
20+
. Create an iPXE script by running the following command:
21+
+
22+
[source,terminal]
23+
----
24+
$ cat << EOF > agent.ipxe
25+
!ipxe
26+
set initiator-iqn <iscsi_initiator_base>:\${hostname}
27+
sanboot --keep iscsi:<iscsi_network_subnet>.1::::<iscsi_target_base>:\${hostname}
28+
EOF
29+
----
30+
+
31+
--
32+
where:
33+
34+
<iscsi_initiator_base>:: Specifies the iSCSI initiator name on the host that is booting the ISO.
35+
This name can also be used by the iSCSI target.
36+
<iscsi_network_subnet>:: Specifies the IP address of the iSCSI target.
37+
<iscsi_target_base>:: Specifies the iSCSI target name.
38+
This name can be the same as the initiator name.
39+
--
40+
+
41+
.Example Command
42+
[source,terminal]
43+
----
44+
$ cat << EOF > agent.ipxe
45+
!ipxe
46+
set initiator-iqn iqn.2023-01.com.example:\${hostname}
47+
sanboot --keep iscsi:192.168.45.1::::iqn.2023-01.com.example:\${hostname}
48+
EOF
49+
----
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * installing/installing_with_agent_based_installer/installing-using-iscsi.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="iscsi-boot-requirements_{context}"]
7+
= Requirements for iSCSI booting
8+
9+
The following configurations are necessary to enable iSCSI booting when using the Agent-based Installer:
10+
11+
* Dynamic Host Configuration Protocol (DHCP) must be configured.
12+
Static networking is not supported.
13+
* You must create an additional network for iSCSI that is separate from the machine network of the cluster.
14+
The machine network is rebooted during cluster installation and cannot be used for the iSCSI session.
15+
* If the host on which you are booting the agent ISO image also has an installed disk, it might be necessary to specify the iSCSI disk name in the `rootDeviceHints` parameter to ensure that it is chosen as the boot disk for the final {op-system-first} image.
16+
You can also use a diskless environment for iSCSI booting, in which case you do not need to set the `rootDeviceHints` parameter.

0 commit comments

Comments
 (0)