6.12. 在 IBM Z 或 IBM LinuxONE 环境中使用静态 IP 配置 NBDE
在 IBM Z® 或 IBM® LinuxONE 环境中启用 NBDE 磁盘加密需要额外的步骤,本节中详细介绍。
先决条件
- 您已设置了外部 Tang 服务器。具体步骤请查看 网络绑定磁盘加密。
-
您已安装了 with
ane实用程序。 - 您已查看如何使用 Butane 创建机器配置的说明。
流程
为 control plane 和计算节点创建 Butane 配置文件。
以下 control plane 节点的 Butane 配置示例为磁盘加密创建一个名为
master-storage.bu的文件:variant: openshift version: 4.16.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/root2 label: luks-root name: root wipe_volume: true filesystems: - device: /dev/mapper/root format: xfs label: root wipe_filesystem: true openshift: fips: true3 运行以下命令,创建自定义 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 机器的内核参数文件示例
cio_ignore=all,!condev rd.neednet=1 \ console=ttysclp0 \ coreos.inst.install_dev=/dev/<block_device> \1 ignition.firstboot ignition.platform.id=metal \ coreos.inst.ignition_url=http://<http_server>/master.ign \2 coreos.live.rootfs_url=http://<http_server>/rhcos-<version>-live-rootfs.<architecture>.img \3 ip=<ip>::<gateway>:<netmask>:<hostname>::none nameserver=<dns> \ rd.znet=qeth,0.0.bdd0,0.0.bdd1,0.0.bdd2,layer2=1 \ rd.zfcp=0.0.5677,0x600606680g7f0056,0x034F000000000000 \4 zfcp.allow_lun_scan=0注意将参数文件中的所有选项写为一行,并确保您没有换行字符。