Suscríbase al feed

Team, today I'm going to share something simple, but it helped a lot to avoid unnecessary work during the installation of Openshift 4.6 via PXE in bare metal.

According to the link on how to install the Openshift Environment via PXE, we need to edit the default file in the following path /var/lib/tftpboot/pxelinux.cfg/, in this file we need to determine the ignition file that will be loaded during the boot server, we must do this by editing ignition for the following servers: bootstrap, master and workers, once this modification is made, we start the respective servers.

In order to improve this process and make it easier, I created the boot menu below, where I already specify the 3 server profiles, through an interactive menu I can select which server it is and perform the installation.

Obs.: In this procedure, we will not cover the installation and configuration of PXE, only the menu.

So, let's start..

First, let's copy the file vesamenu.c32 to the tftp path:

cp /usr/share/syslinux/vesamenu.c32 /var/lib/tftpboot/

Download the bg-ocp.png image from the link below and save it to the /var/lib/tftpboot/ directory

$ wget https://raw.githubusercontent.com/leoaaraujo/openshift_pxe_boot_menu/main/files/bg-ocp.png -O /var/lib/tftpboot/bg-ocp.png

After that, we will edit or create the file with the entry menu of pxe boot, in my case it is /var/lib/tftpboot/pxelinux.cfg/default, add the lines below: 

UI vesamenu.c32
MENU BACKGROUND        bg-ocp.png   (1)
MENU COLOR sel         4  #ffffff std   (2)
MENU COLOR title       1  #ffffff    (3)
TIMEOUT 120
PROMPT 0
MENU TITLE OPENSHIFT 4.x INSTALL BARE METAL PXE MENU  (4)
LABEL INSTALL BOOTSTRAP    (5)
KERNEL http://{{ HTTP SERVER }}/rhcos-live-kernel-x86_64
APPEND initrd=http://{{ HTTP SERVER }}/rhcos-live-initramfs.x86_64.img coreos.live.rootfs_url=http://{{ HTTP SERVER }}/rhcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://{{ HTTP SERVER }}/bootstrap.ign
LABEL INSTALL MASTER       (5)
KERNEL http://{{ HTTP SERVER }}/rhcos-live-kernel-x86_64
APPEND initrd=http://{{ HTTP SERVER }}/rhcos-live-initramfs.x86_64.img coreos.live.rootfs_url=http://{{ HTTP SERVER }}/rhcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://{{ HTTP SERVER }}/master.ign
LABEL INSTALL WORKER       (5)
KERNEL http://{{ HTTP SERVER }}/rhcos-live-kernel-x86_64
APPEND initrd=http://{{ HTTP SERVER }}/rhcos-live-initramfs.x86_64.img coreos.live.rootfs_url=http://{{ HTTP SERVER }}/rhcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://{{ HTTP SERVER }}/worker.ign
  1. Set the image downloaded previously, this image is optional, not mandatory and can be replaced
  2. Set the color in the selection menu
  3. Set the color in Title menu
  4. Define title for menu
  5. Define the name of item in menu

Obs.:  Adjust the HTTP/HTTPS call, informing the IP or FQDN of your HTTP Server, where the img and ign files are stored

 

After the above steps have been successfully executed, start your server and identify if it already starts with the custom boot menu

Open the Web Console to interact

After press tab to edit, we can see the options Git Repository: https://github.com/leoaaraujo/openshift_pxe_boot_menu

References

For more customization options of the pxe menu, click here.

For more customization options for CoreOS during pxe boot, see here


Sobre el autor

UI_Icon-Red_Hat-Close-A-Black-RGB

Navegar por canal

automation icon

Automatización

Las últimas novedades en la automatización de la TI para los equipos, la tecnología y los entornos

AI icon

Inteligencia artificial

Descubra las actualizaciones en las plataformas que permiten a los clientes ejecutar cargas de trabajo de inteligecia artificial en cualquier lugar

open hybrid cloud icon

Nube híbrida abierta

Vea como construimos un futuro flexible con la nube híbrida

security icon

Seguridad

Vea las últimas novedades sobre cómo reducimos los riesgos en entornos y tecnologías

edge icon

Edge computing

Conozca las actualizaciones en las plataformas que simplifican las operaciones en el edge

Infrastructure icon

Infraestructura

Vea las últimas novedades sobre la plataforma Linux empresarial líder en el mundo

application development icon

Aplicaciones

Conozca nuestras soluciones para abordar los desafíos más complejos de las aplicaciones

Original series icon

Programas originales

Vea historias divertidas de creadores y líderes en tecnología empresarial