2.12. 在 IBM Z 或 IBM (R) Linux 环境中使用静态 IP 配置 NBDE
在 IBM Z 或 IBM® LinuxONE 环境中启用 NBDE 磁盘加密需要额外的步骤,本节中详细介绍。
先决条件
- 您已设置了外部 Tang 服务器。具体步骤请查看 网络绑定磁盘加密。
-
您已安装了 with
ane
实用程序。 - 您已查看如何使用 Butane 创建机器配置的说明。
流程
为 control plane 和计算节点创建 Butane 配置文件。
以下 control plane 节点的 Butane 配置示例为磁盘加密创建一个名为
master-storage.bu
的文件:variant: openshift version: 4.13.0 metadata: name: master-storage labels: machineconfiguration.openshift.io/role: master storage: luks: - clevis: tang: - thumbprint: QcPr_NHFJammnRCA3fFMVdNBwjs url: http://clevis.example.com:7500 options: 1 - --cipher - aes-cbc-essiv:sha256 device: /dev/disk/by-partlabel/root 2 label: luks-root name: root wipe_volume: true filesystems: - device: /dev/mapper/root format: xfs label: root wipe_filesystem: true openshift: fips: true 3
重要OpenShift Container Platform 4.13 基于 Red Hat Enterprise Linux (RHEL) 9.2。RHEL 9.2 尚未提交用于 FIPS 验证。如需更多信息,请参阅 4.13 OpenShift Container Platform 发行注记 中的 "About this release"。
运行以下命令,创建自定义 initramfs 文件来引导机器:
$ coreos-installer pxe customize \ /root/rhcos-bootfiles/rhcos-<release>-live-initramfs.s390x.img \ --dest-device /dev/disk/by-id/scsi-<serial-number> --dest-karg-append \ ip=<ip-address>::<gateway-ip>:<subnet-mask>::<network-device>:none \ --dest-karg-append nameserver=<nameserver-ip> \ --dest-karg-append rd.neednet=1 -o \ /root/rhcos-bootfiles/<Node-name>-initramfs.s390x.img
注意首次引导前,您必须为集群中的每个节点自定义 initramfs,并添加 PXE 内核参数。
创建包含
ignition.platform.id=metal
和ignition.firstboot
的参数文件。control plane 机器的内核参数文件示例:
rd.neednet=1 \ console=ttysclp0 \ coreos.inst.install_dev=/dev/dasda \ 1 ignition.firstboot ignition.platform.id=metal \ coreos.live.rootfs_url=http://10.19.17.25/redhat/ocp/rhcos-413.86.202302201445-0/rhcos-413.86.202302201445-0-live-rootfs.s390x.img \ coreos.inst.ignition_url=http://bastion.ocp-cluster1.example.com:8080/ignition/master.ign \ ip=10.19.17.2::10.19.17.1:255.255.255.0::enbdd0:none nameserver=10.19.17.1 \ zfcp.allow_lun_scan=0 \ 2 rd.znet=qeth,0.0.bdd0,0.0.bdd1,0.0.bdd2,layer2=1 \ rd.zfcp=0.0.5677,0x600606680g7f0056,0x034F000000000000 \ 3 zfcp.allow_lun_scan=0 \ rd.znet=qeth,0.0.bdd0,0.0.bdd1,0.0.bdd2,layer2=1 \ rd.zfcp=0.0.5677,0x600606680g7f0056,0x034F000000000000
注意将参数文件中的所有选项写为一行,并确保您没有换行字符。
其他资源