Chapter 6. Using PXE to Provision Hosts
There are four main ways to provision bare metal instances with Red Hat Satellite 6.10:
- Unattended Provisioning
- New hosts are identified by a MAC address and Satellite Server provisions the host using a PXE boot process.
- Unattended Provisioning with Discovery
- New hosts use PXE boot to load the Satellite Discovery service. This service identifies hardware information about the host and lists it as an available host to provision. For more information, see Chapter 7, Configuring the Discovery Service.
- PXE-less Provisioning with Discovery
- New hosts use an ISO boot disk that loads the Satellite Discovery service. This service identifies hardware information about the host and lists it as an available host to provision. For more information, see Section 7.7, “Implementing PXE-less Discovery”.
BIOS and UEFI Support
With Red Hat Satellite, you can perform both BIOS and UEFI based PXE provisioning.
Both BIOS and UEFI interfaces work as interpreters between the computer’s operating system and firmware, initializing the hardware components and starting the operating system at boot time.
For information about supported workflows, see Supported architectures and provisioning scenarios.
In Satellite provisioning, the PXE loader option defines the DHCP filename
option to use during provisioning. For BIOS systems, use the PXELinux BIOS option to enable a provisioned node to download the pxelinux.0
file over TFTP. For UEFI systems, use the PXEGrub2 UEFI option to enable a TFTP client to download grub2/grubx64.efi
file.
For BIOS provisioning, you must associate a PXELinux template with the operating system.
For UEFI provisioning, you must associate a PXEGrub2 template with the operating system.
If you associate both PXELinux and PXEGrub2 templates, Satellite 6 can deploy configuration files for both on a TFTP server, so that you can switch between PXE loaders easily.
6.1. Prerequisites for Bare Metal Provisioning
The requirements for bare metal provisioning include:
A Capsule Server managing the network for bare metal hosts. For unattended provisioning and discovery-based provisioning, Satellite Server requires PXE server settings.
For more information about networking requirements, see Chapter 3, Configuring Networking.
For more information about the Discovery service, Chapter 7, Configuring the Discovery Service.
- A bare metal host or a blank VM.
- Synchronized content repositories for Red Hat Enterprise Linux. For more information, see Syncing Repositories in the Content Management Guide.
- An activation key for host registration. For more information, see Creating An Activation Key in the Content Management guide.
6.2. Configuring the Security Token Validity Duration
To adjust the token’s duration of validity, in the Satellite web UI, navigate to Administer > Settings, and click the Provisioning tab. Find the Token duration option, and click the edit icon and edit the duration, or enter 0
to disable token generation.
If token generation is disabled, an attacker can spoof client IP address and download kickstart from Satellite Server, including the encrypted root password.
6.3. Creating Hosts with Unattended Provisioning
Unattended provisioning is the simplest form of host provisioning. You enter the host details on Satellite Server and boot your host. Satellite Server automatically manages the PXE configuration, organizes networking services, and provides the operating system and configuration for the host.
This method of provisioning hosts uses minimal interaction during the process.
To use the CLI instead of the web UI, see the CLI procedure.
Procedure
- In the Satellite web UI, navigate to Hosts > Create Host.
- In the Name field, enter a name for the host.
- Click the Organization and Location tabs and change the context to match your requirements.
- From the Host Group list, select a host group that you want to use to populate the form.
- Click the Interface tab, and on the host’s interface, click Edit.
Verify that the fields are populated with values. Note in particular:
- The Name from the Host tab becomes the DNS name.
- Satellite Server automatically assigns an IP address for the new host.
- In the MAC address field, enter a MAC address for the host. This ensures the identification of the host during the PXE boot process.
- Ensure that Satellite Server automatically selects the Managed, Primary, and Provision options for the first interface on the host. If not, select them.
- In the MAC address field, enter a MAC address of the host’s provisioning interface. This ensures the identification of the host during the PXE boot process.
- Click OK to save. To add another interface, click Add Interface. You can select only one interface for Provision and Primary.
- Click the Operating System tab, and verify that all fields contain values. Confirm each aspect of the operating system.
Optional: Click Resolve in Provisioning template to check the new host can identify the right provisioning templates to use.
For more information about associating provisioning templates, see Section 2.11, “Provisioning Templates”.
- Click the Parameters tab, and ensure that a parameter exists that provides an activation key. If not, add an activation key.
Click Submit to save the host details.
For more information about network interfaces, see Adding network interfaces.
This creates the host entry and the relevant provisioning settings. This also includes creating the necessary directories and files for PXE booting the bare metal host. If you start the physical host and set its boot mode to PXE, the host detects the DHCP service of Satellite Server’s integrated Capsule, receives HTTP endpoint of the Kickstart tree and installs the operating system.
When the installation completes, the host also registers to Satellite Server using the activation key and installs the necessary configuration and management tools from the Satellite Tools 6.10 repository.
CLI procedure
Create the host with the
hammer host create
command.# hammer host create --name "My_Unattended_Host" --organization "My_Organization" \ --location "My_Location" --hostgroup "My_Host_Group" --mac "aa:aa:aa:aa:aa:aa" \ --build true --enabled true --managed true
Ensure the network interface options are set using the
hammer host interface update
command.# hammer host interface update --host "test1" --managed true \ --primary true --provision true
6.4. Creating Hosts with UEFI HTTP Boot Provisioning
You can provision hosts from Satellite using the UEFI HTTP Boot. This is the only method with which you can provision hosts in IPv6 network.
To use the CLI instead of the web UI, see the CLI procedure.
Prerequisites
- Ensure that you meet the requirements for HTTP booting. For more information, see HTTP Booting Requirements in Planning for Satellite.
Procedure
On Capsule that you use for provisioning, update the
grub2-efi
package to the latest version:# satellite-maintain packages install grub2-efi
Enable
foreman-proxy-http
,foreman-proxy-httpboot
, andforeman-proxy-tftp
features.# satellite-installer --scenario satellite \ --foreman-proxy-httpboot true \ --foreman-proxy-http true \ --foreman-proxy-tftp true
- In the Satellite web UI, navigate to Hosts > Create Host.
- In the Name field, enter a name for the host.
- Click the Organization and Location tabs and change the context to match your requirements.
- From the Host Group list, select a host group that you want to use to populate the form.
- Click the Interface tab, and on the host’s interface, click Edit.
Verify that the fields are populated with values. Note in particular:
- The Name from the Host tab becomes the DNS name.
- Satellite Server automatically assigns an IP address for the new host.
- In the MAC address field, enter a MAC address of the host’s provisioning interface. This ensures the identification of the host during the PXE boot process.
- Ensure that Satellite Server automatically selects the Managed, Primary, and Provision options for the first interface on the host. If not, select them.
- Click OK to save. To add another interface, click Add Interface. You can select only one interface for Provision and Primary.
- Click the Operating System tab, and verify that all fields contain values. Confirm each aspect of the operating system.
- From the PXE Loader list, select Grub2 UEFI HTTP.
Optional: Click Resolve in Provisioning template to check the new host can identify the right provisioning templates to use.
For more information about associating provisioning templates, see Section 2.13, “Creating Provisioning Templates”.
- Click the Parameters tab, and ensure that a parameter exists that provides an activation key. If not, add an activation key.
Click Submit to save the host details.
For more information about network interfaces, see Adding network interfaces.
- Set the host to boot in UEFI mode from network.
- Start the host.
- From the boot menu, select Kickstart default PXEGrub2.
This creates the host entry and the relevant provisioning settings. This also includes creating the necessary directories and files for UEFI booting the bare metal host. When you start the physical host and set its boot mode to UEFI HTTP, the host detects the defined DHCP service, receives HTTP endpoint of Capsule with the Kickstart tree and installs the operating system.
When the installation completes, the host also registers to Satellite Server using the activation key and installs the necessary configuration and management tools from the Satellite Tools 6.10 repository.
CLI procedure
On Capsule that you use for provisioning, update the
grub2-efi
package to the latest version:# satellite-maintain packages install grub2-efi
Enable
foreman-proxy-http
,foreman-proxy-httpboot
, andforeman-proxy-tftp true
features.# satellite-installer --scenario satellite \ --foreman-proxy-httpboot true \ --foreman-proxy-http true \ --foreman-proxy-tftp true
Create the host with the
hammer host create
command.# hammer host create --name "My_Host" \ --organization "My_Organization" \ --location "My_Location" \ --hostgroup "My_Host_Group" \ --mac "aa:aa:aa:aa:aa:aa" \ --build true \ --enabled true \ --managed true \ --pxe-loader "Grub2 UEFI HTTP"
Ensure the network interface options are set using the
hammer host interface update
command.# hammer host interface update --host "My_Host" \ --managed true \ --primary true \ --provision true
- Set the host to boot in UEFI mode from network.
- Start the host.
- From the boot menu, select Kickstart default PXEGrub2.
This creates the host entry and the relevant provisioning settings. This also includes creating the necessary directories and files for UEFI booting the bare metal host. When you start the physical host and set its boot mode to UEFI HTTP, the host detects the defined DHCP service, receives HTTP endpoint of Capsule with the Kickstart tree and installs the operating system.
When the installation completes, the host also registers to Satellite Server using the activation key and installs the necessary configuration and management tools from the Satellite Tools 6.10 repository.
6.5. Deploying SSH Keys during Provisioning
Use this procedure to deploy SSH keys added to a user during provisioning. For information on adding SSH keys to a user, see Managing SSH Keys for a User in Administering Red Hat Satellite.
Procedure
To deploy SSH keys during provisioning, complete the following steps:
- In the Satellite web UI, navigate to Hosts > Provisioning Templates.
- Create a provisioning template, or clone and edit an existing template. For more information, see Section 2.13, “Creating Provisioning Templates”.
- In the template, click the Template tab.
In the Template editor field, add the
create_users
snippet to the%post
section:<%= snippet('create_users') %>
- Select the Default check box.
- Click the Association tab.
- From the Application Operating Systems list, select an operating system.
- Click Submit to save the provisioning template.
Create a host that is associated with the provisioning template or rebuild a host using the OS associated with the modified template. For more information, see Creating a Host in the Managing Hosts guide.
The SSH keys of the Owned by user are added automatically when the
create_users
snippet is executed during the provisioning process. You can set Owned by to an individual user or a user group. If you set Owned by to a user group, the SSH keys of all users in the user group are added automatically.