我正在尝试创建 Terraform/Ansible/Cloud-init Hybrid,以便在 Proxmox 上创建 Openshift 和 OKD 集群。由于 CoreOS 不支持 cloudinit,而是支持 ignition,因此只有几个可用选项。Netboot 是“更简单”的选项。因此,我针对此主题尝试了许多不同的方法,我认为总体思路是使用 DHCP 服务器 + TFTP 服务器进行引导 + http 服务器进行 ignition。我主要尝试执行此人的设置版本。我已经设置了所有这些,但仍然无法使用 pxe 启动 RHCOS 或 FCOS。
我尝试使用不同的 Linux 发行版(CentOS 8/9、Alma 8/9、RHEL 8/9、Debian12、Ubuntu 22/24)作为 TFTP,但它们都提供相同的结果:
这是我的配置:
DHCP (!important: we don't use dhcp in the company, this server is specifically created for this purpose - that's why the range is very small.)
subnet 10.11.0.0 netmask 255.255.0.0 {
range 10.11.223.2 10.11.223.40;
option routers 10.11.111.100;
option domain-name-servers 10.11.2.71;
option broadcast-address 10.11.255.255;
allow booting;
allow bootp;
allow-unknown-clients;
default-lease-time 600;
max-lease-time 7200;
next-server 10.11.223.1; # TFTP server IP
filename "pxelinux.0"; # PXE boot file
}
Bootconfig (for bootstrap node):
default menu.c32
prompt 1
timeout 9
ONTIMEOUT 1
menu title OKD installation
label 1
menu label ^1) Bootstrap node
menu default
kernel fcos/kernel
append initrd=fcos/initramfs.img nomodeset rd.neednet=1 console=tty0 console=ttyS0 ip=dhcp coreos.inst=yes coreos.inst.install_dev=/dev/sda coreos.live.rootfs_url=http://{{ service.ip }}:8080/okd4/rootfs.img coreos.inst.ignition_url=http://{{ service.ip }}:8080/okd4/bootstrap.ign
TFTP 文件夹结构,其中包括 CoreOS、pxelinux.0、ldlinux.c32 的图像以及 pxelinux.cfg 下的启动配置
基本上,此时此刻,我恳求大家提供如何继续的意见。我尝试了各种配置变化、不同版本等。非常感谢大家的任何建议。
此外,很高兴听到有人争论为什么采用另一种方式 coreos-install 并修改图像是更好的选择(甚至可能更简单)。如果有人有完全不同的解决方案在 Proxmox 上运行 OpenShift,我也会很高兴。