Skip to content

Commit fbdc22a

Browse files
authored
Merge pull request #77322 from jldohmann/OSDOCS-9735-pt2
OSDOCS-9735: add customize subcommand iscsi procedures
2 parents df38a71 + 35771e9 commit fbdc22a

5 files changed

+153
-0
lines changed

installing/installing_bare_metal/installing-bare-metal-network-customizations.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ include::modules/installation-user-infra-machines-advanced-customizing-live-seri
141141
include::modules/installation-user-infra-machines-advanced-customizing-live-ca-certs.adoc[leveloffset=+4]
142142

143143
include::modules/installation-user-infra-machines-advanced-customizing-live-network-config.adoc[leveloffset=+4]
144+
145+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-manual.adoc[leveloffset=+4]
146+
147+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-ibft.adoc[leveloffset=+4]
144148
:boot-media!:
145149
:boot!:
146150

@@ -153,6 +157,10 @@ include::modules/installation-user-infra-machines-advanced-customizing-live-seri
153157
include::modules/installation-user-infra-machines-advanced-customizing-live-ca-certs.adoc[leveloffset=+4]
154158

155159
include::modules/installation-user-infra-machines-advanced-customizing-live-network-config.adoc[leveloffset=+4]
160+
161+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-manual.adoc[leveloffset=+4]
162+
163+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-ibft.adoc[leveloffset=+4]
156164
:boot-media!:
157165
:boot!:
158166

installing/installing_bare_metal/installing-bare-metal.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ include::modules/installation-user-infra-machines-advanced-customizing-live-seri
169169
include::modules/installation-user-infra-machines-advanced-customizing-live-ca-certs.adoc[leveloffset=+4]
170170

171171
include::modules/installation-user-infra-machines-advanced-customizing-live-network-config.adoc[leveloffset=+4]
172+
173+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-manual.adoc[leveloffset=+4]
174+
175+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-ibft.adoc[leveloffset=+4]
172176
:boot-media!:
173177
:boot!:
174178

@@ -181,6 +185,10 @@ include::modules/installation-user-infra-machines-advanced-customizing-live-seri
181185
include::modules/installation-user-infra-machines-advanced-customizing-live-ca-certs.adoc[leveloffset=+4]
182186

183187
include::modules/installation-user-infra-machines-advanced-customizing-live-network-config.adoc[leveloffset=+4]
188+
189+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-manual.adoc[leveloffset=+4]
190+
191+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-ibft.adoc[leveloffset=+4]
184192
:boot-media!:
185193
:boot!:
186194

installing/installing_bare_metal/installing-restricted-networks-bare-metal.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ include::modules/installation-user-infra-machines-advanced-customizing-live-seri
162162
include::modules/installation-user-infra-machines-advanced-customizing-live-ca-certs.adoc[leveloffset=+4]
163163

164164
include::modules/installation-user-infra-machines-advanced-customizing-live-network-config.adoc[leveloffset=+4]
165+
166+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-manual.adoc[leveloffset=+4]
167+
168+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-ibft.adoc[leveloffset=+4]
165169
:boot-media!:
166170
:boot!:
167171

@@ -174,6 +178,10 @@ include::modules/installation-user-infra-machines-advanced-customizing-live-seri
174178
include::modules/installation-user-infra-machines-advanced-customizing-live-ca-certs.adoc[leveloffset=+4]
175179

176180
include::modules/installation-user-infra-machines-advanced-customizing-live-network-config.adoc[leveloffset=+4]
181+
182+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-manual.adoc[leveloffset=+4]
183+
184+
include::modules/installation-user-infra-machines-advanced-customizing-live-iscsi-ibft.adoc[leveloffset=+4]
177185
:boot-media!:
178186
:boot!:
179187

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Module included in the following assemblies
2+
//
3+
// * installing/installing_bare_metal/installing-bare-metal.adoc
4+
// * installing/installing_bare_metal/installing-restricted-networks-bare-metal.adoc
5+
// * installing_bare_metal/installing-bare-metal-network-customizations.adoc
6+
7+
:_mod-docs-content-type: PROCEDURE
8+
[id="installation-user-infra-machines-advanced-customizing-live-{boot}-iscsi-ibft_{context}"]
9+
= Customizing a live install {boot-media} for an iSCSI boot device with iBFT
10+
11+
You can set the iSCSI target and initiator values for automatic mounting, booting and configuration using a customized version of the live {op-system} image.
12+
13+
.Prerequisites
14+
. You have an iSCSI target you want to install {op-system} on.
15+
. Optional: you have multipathed your iSCSI target.
16+
17+
.Procedure
18+
19+
. Download the `coreos-installer` binary from the link:https://mirror.openshift.com/pub/openshift-v4/clients/coreos-installer/latest/[`coreos-installer` image mirror] page.
20+
21+
ifeval::["{boot-media}" == "ISO image"]
22+
. Retrieve the {op-system} ISO image from the link:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/[{op-system} image mirror] page and run the following command to customize the ISO image with the following information:
23+
+
24+
[source,text]
25+
----
26+
$ coreos-installer iso customize \
27+
--pre-install mount-iscsi.sh \ <1>
28+
--post-install unmount-iscsi.sh \ <2>
29+
--dest-device /dev/mapper/mpatha \ <3>
30+
--dest-ignition config.ign \ <4>
31+
--dest-karg-append rd.iscsi.firmware=1 \ <5>
32+
--dest-karg-append rd.multipath=default \ <6>
33+
-o custom.iso rhcos-<version>-live.x86_64.iso
34+
----
35+
<1> The script that gets run before installation. It should contain the `iscsiadm` commands for mounting the iSCSI target and any commands enabling multipathing.
36+
<2> The script that gets run after installation. It should contain the command `iscsiadm --mode node --logout=all`.
37+
<3> The path to the device. If you are using multipath, the multipath device, `/dev/mapper/mpatha`, If there are multiple multipath devices connected, or to be explicit, you can use the World Wide Name (WWN) symlink available in `/dev/disk/by-path`.
38+
<4> The Ignition configuration for the destination system.
39+
<5> The iSCSI parameter is read from the BIOS firmware.
40+
<6> Optional: include this parameter if you are enabling multipathing.
41+
endif::[]
42+
43+
ifeval::["{boot-media}" == "PXE environment"]
44+
. Retrieve the {op-system} `kernel`, `initramfs` and `rootfs` files from the link:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/[{op-system} image mirror] page and run the following command to create a new customized `initramfs` file with the following information:
45+
+
46+
[source,text]
47+
----
48+
$ coreos-installer pxe customize \
49+
--pre-install mount-iscsi.sh \ <1>
50+
--post-install unmount-iscsi.sh \ <2>
51+
--dest-device /dev/mapper/mpatha \ <3>
52+
--dest-ignition config.ign \ <4>
53+
--dest-karg-append rd.iscsi.firmware=1 \ <5>
54+
--dest-karg-append rd.multipath=default \ <6>
55+
-o custom.img rhcos-<version>-live-initramfs.x86_64.img
56+
----
57+
<1> The script that gets run before installation. It should contain the `iscsiadm` commands for mounting the iSCSI target.
58+
<2> The script that gets run after installation. It should contain the command `iscsiadm --mode node --logout=all`.
59+
<3> The path to the device. If you are using multipath, the multipath device, `/dev/mapper/mpatha`, If there are multiple multipath devices connected, or to be explicit, you can use the World Wide Name (WWN) symlink available in `/dev/disk/by-path`.
60+
<4> The Ignition configuration for the destination system.
61+
<5> The iSCSI parameter is read from the BIOS firmware.
62+
<6> Optional: include this parameter if you are enabling multipathing.
63+
endif::[]
64+
+
65+
For more information about the iSCSI options supported by `dracut`, see the link:https://www.man7.org/linux/man-pages/man7/dracut.cmdline.7.html[`dracut.cmdline` manual page].
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Module included in the following assemblies
2+
//
3+
// * installing/installing_bare_metal/installing-bare-metal.adoc
4+
// * installing/installing_bare_metal/installing-restricted-networks-bare-metal.adoc
5+
// * installing_bare_metal/installing-bare-metal-network-customizations.adoc
6+
7+
:_mod-docs-content-type: PROCEDURE
8+
[id="installation-user-infra-machines-advanced-customizing-live-{boot}-iscsi-manual_{context}"]
9+
= Customizing a live install {boot-media} for an iSCSI boot device
10+
11+
You can set the iSCSI target and initiator values for automatic mounting, booting and configuration using a customized version of the live {op-system} image.
12+
13+
.Prerequisites
14+
. You have an iSCSI target you want to install {op-system} on.
15+
16+
.Procedure
17+
18+
. Download the `coreos-installer` binary from the link:https://mirror.openshift.com/pub/openshift-v4/clients/coreos-installer/latest/[`coreos-installer` image mirror] page.
19+
20+
ifeval::["{boot-media}" == "ISO image"]
21+
. Retrieve the {op-system} ISO image from the link:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/[{op-system} image mirror] page and run the following command to customize the ISO image with the following information:
22+
+
23+
[source,text]
24+
----
25+
$ coreos-installer iso customize \
26+
--pre-install mount-iscsi.sh \ <1>
27+
--post-install unmount-iscsi.sh \ <2>
28+
--dest-device /dev/disk/by-path/<IP_address>:<port>-iscsi-<target_iqn>-lun-<lun> \ <3>
29+
--dest-ignition config.ign \ <4>
30+
--dest-karg-append rd.iscsi.initiator=<initiator_iqn> \ <5>
31+
--dest-karg-append netroot=<target_iqn> \ <6>
32+
-o custom.iso rhcos-<version>-live.x86_64.iso
33+
----
34+
<1> The script that gets run before installation. It should contain the `iscsiadm` commands for mounting the iSCSI target and any commands enabling multipathing.
35+
<2> The script that gets run after installation. It should contain the command `iscsiadm --mode node --logout=all`.
36+
<3> The location of the destination system. You must provide the IP address of the target portal, the associated port number, the target iSCSI node in IQN format, and the iSCSI logical unit number (LUN).
37+
<4> The Ignition configuration for the destination system.
38+
<5> The iSCSI initiator, or client, name in IQN format. The initiator forms a session to connect to the iSCSI target.
39+
<6> The the iSCSI target, or server, name in IQN format.
40+
endif::[]
41+
42+
ifeval::["{boot-media}" == "PXE environment"]
43+
. Retrieve the {op-system} `kernel`, `initramfs` and `rootfs` files from the link:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/[{op-system} image mirror] page and run the following command to create a new customized `initramfs` file with the following information:
44+
+
45+
[source,text]
46+
----
47+
$ coreos-installer pxe customize \
48+
--pre-install mount-iscsi.sh \ <1>
49+
--post-install unmount-iscsi.sh \ <2>
50+
--dest-device /dev/disk/by-path/<IP_address>:<port>-iscsi-<target_iqn>-lun-<lun> \ <3>
51+
--dest-ignition config.ign \ <4>
52+
--dest-karg-append rd.iscsi.initiator=<initiator_iqn> \ <5>
53+
--dest-karg-append netroot=<target_iqn> \ <6>
54+
-o custom.img rhcos-<version>-live-initramfs.x86_64.img
55+
----
56+
<1> The script that gets run before installation. It should contain the `iscsiadm` commands for mounting the iSCSI target and any commands enabling multipathing.
57+
<2> The script that gets run after installation. It should contain the command `iscsiadm --mode node --logout=all`.
58+
<3> The location of the destination system. You must provide the IP address of the target portal, the associated port number, the target iSCSI node in IQN format, and the iSCSI logical unit number (LUN).
59+
<4> The Ignition configuration for the destination system.
60+
<5> The iSCSI initiator, or client, name in IQN format. The initiator forms a session to connect to the iSCSI target.
61+
<6> The the iSCSI target, or server, name in IQN format.
62+
endif::[]
63+
+
64+
For more information about the iSCSI options supported by `dracut`, see the link:https://www.man7.org/linux/man-pages/man7/dracut.cmdline.7.html[`dracut.cmdline` manual page].

0 commit comments

Comments
 (0)