Using boot disks to provision hosts
Some hardware does not provide a PXE boot interface or your environment may not support network boot. In orcharhino, you can provision a host without PXE boot. This is also known as PXE-less provisioning and involves generating a boot ISO that hosts can use. Using this ISO, the host can boot the installation media, connect to orcharhino Proxy, and install the operating system.
orcharhino also provides a PXE-less discovery service that operates without PXE-based services, such as DHCP and TFTP. For more information, see Discovery in pxeless mode.
Boot disk workflow
Using a boot disk to provision a host involves the following steps:
-
Create a host entry in orcharhino.
-
Generate a boot disk ISO image.
-
Boot your host from the ISO image.
-
The host connects to Templates orcharhino Proxy and starts installing the operating system.
-
When the installation completes, the host registers to orcharhino Server by using an activation key, performs necessary configuration, and installs management tools from the orcharhino Client for CentOS Stream repository.
Boot disk types
You can generate the following types of boot disks:
- Full host image
-
A boot ISO that contains the installer kernel and initial RAM disk image for a specific host. The boot loader on this image chain loads the installer directly from the image. This image is useful if the host fails to chain load from orcharhino Server or orcharhino Proxy Server correctly. The provisioning template still downloads from orcharhino Server.
This image is based on SYSLINUX and GRUB and works with most network cards.
This image contains a provisioning security token, therefore the generated image has a limited lifespan. For more information about configuring the security token, see Configuring the security token validity duration.
- Subnet image
-
A boot ISO that is not associated with a specific host. You can use this image if you have an environment with multiple subnets, where hosts do not have access to orcharhino Server but can access orcharhino Proxy in the particular subnet. You can use this image to boot multiple hosts on the same subnet. The boot loader on this image chain loads the installer from the TFTP orcharhino Proxy of the host.
The ISO sends the MAC address of the host to orcharhino Proxy, which matches the MAC address against the host entry. The image does not store IP address details and requires access to a DHCP server on the network to bootstrap. This image is generic to all hosts with a provisioning NIC on the same subnet.
This image is based on iPXE boot firmware. Only a limited number of network cards is supported. For more information, see supported hardware drivers at ipxe.org.
- Generic image
-
A boot ISO that is not associated with a specific host. The boot loader on this image chain loads the installer from orcharhino Server.
The ISO sends the MAC address of the host to orcharhino Proxy, which matches the MAC address against the host entry. The image does not store IP address details and requires access to a DHCP server on the network to bootstrap.
This image is based on iPXE boot firmware. Only a limited number of network cards is supported. For more information, see supported hardware drivers at ipxe.org.
This image does not support UEFI systems.
- Host image
-
A boot ISO for a specific host. This image contains only the boot files that are necessary to access the installation media on orcharhino Server. You define the subnet data in orcharhino and the image is created with static networking.
This image is based on iPXE boot firmware. Only a limited number of network cards is supported. For more information, see supported hardware drivers at ipxe.org.
This image contains a provisioning security token, therefore the generated image has a limited lifespan. For more information about configuring the security token, see Configuring the security token validity duration.
This image does not support UEFI systems.
Enabling Bootdisk plugin
Enable the Bootdisk plugin to perform boot disk-based host provisioning. The plugin must be enabled before you can generate a boot disk on your orcharhino to provision hosts.
-
Enable the Bootdisk plugin on your orcharhino Server:
$ orcharhino-installer --enable-foreman-plugin-bootdisk -
Optional: Install the Bootdisk plugin for Hammer CLI on your orcharhino Server:
$ orcharhino-installer --enable-foreman-cli-bootdisk
-
In the orcharhino management UI, navigate to Administer > About.
-
On the System Status card, select the Plugins tab to verify that the Bootdisk plugin is installed.
-
Continue with generating a boot disk on your orcharhino to provision hosts.
Generating a full host boot disk
You can generate a full boot disk for a specific host.
To use the CLI instead of the orcharhino management UI, see the CLI procedure.
-
Ensure that the operating system has PXELinux and PXEGrub2 templates associated. For more information, see Associating templates with operating systems.
-
An activation key must be available for your host. For more information, see Managing Activation Keys in Managing Content.
-
orcharhino Client for CentOS Stream repository for the operating system version of the host is synchronized on orcharhino Server and enabled in the activation key you use.
-
In the orcharhino management UI, navigate to Hosts > Create Host.
-
In the Name field, enter a name for the host.
-
Optional: Click the Organization tab and change the organization context to match your requirement.
-
Optional: Click the Location tab and change the location context to match your requirement.
-
From the Host Group list, select a host group that you want to assign your host to. That host group will populate the form.
-
Click the Interfaces tab, and on the interface of the host, click Edit.
-
Verify that the fields are populated with values. Note in particular:
-
orcharhino automatically assigns an IP address for the new host.
-
The Name from the Host tab becomes the DNS name.
-
Ensure that orcharhino 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.
For more information about network interfaces, see Configuring network interfaces in Managing Hosts.
-
Click the Operating System tab. Verify that all fields contain correct values.
-
Click Resolve in Provisioning Templates to check the new host can identify the right provisioning templates to use.
For more information about associating provisioning templates, see Associating templates with operating systems.
-
On the Parameters tab, click Add parameter. Add a parameter named
kt_activation_keys, select the string type, and enter the name of the activation key as the value. The activation key has to belong to the same organization as your host. You can also enter a comma-separated list of multiple activation keys. -
Click Submit to save the host details. This creates a host entry and the host details page appears.
-
Download the boot disk from orcharhino Server. On the host details page, click the vertical ellipsis and select Full host 'My_Host_Name' image.
-
Create a host:
$ hammer host create \ --build true \ --enabled true \ --hostgroup "My_Host_Group" \ --location "My_Location" \ --mac "My_MAC_Address" \ --managed true \ --name "My_Host_Name" \ --organization "My_Organization" -
Configure the network interface of your host:
$ hammer host interface update \ --host "My_Host_Name" \ --managed true \ --primary true \ --provision true -
Download the Full host image boot disk from orcharhino Server:
$ hammer bootdisk host \ --full true \ --host My_Host_Name
Generating a subnet boot disk
You can generate a subnet boot disk.
To use the CLI instead of the orcharhino management UI, see the CLI procedure.
-
Ensure that the
ipxe-bootimgspackage is installed on your orcharhino Proxy.
-
In the orcharhino management UI, navigate to Infrastructure > Subnets.
-
Click the dropdown menu in the Actions column of the required subnet.
-
Select Subnet generic image.
-
Generate the Subnet image boot disk:
$ hammer bootdisk subnet --subnet My_Subnet_Name
Generating a generic boot disk
You can generate a generic boot disk.
To use the CLI instead of the orcharhino management UI, see the CLI procedure.
This image is also available from the /disks/generic URL path on your orcharhino Server, for example, https://orcharhino.example.com/disks/generic.
-
Ensure that the
ipxe-bootimgspackage is installed on your orcharhino Server.
-
In the orcharhino management UI, navigate to Infrastructure > Subnets.
-
Click the dropdown menu in the Actions column of the required subnet.
-
Select Generic image.
-
Generate the Generic image boot disk:
$ hammer bootdisk generic
Generating a host boot disk
You can generate a boot disk for a specific host.
To use the CLI instead of the orcharhino management UI, see the CLI procedure.
-
An activation key must be available for your host. For more information, see Managing Activation Keys in Managing Content.
-
orcharhino Client for CentOS Stream repository for the operating system version of the host is synchronized on orcharhino Server and enabled in the activation key you use.
-
In the orcharhino management UI, navigate to Hosts > Create Host.
-
In the Name field, enter a name for the host.
-
Optional: Click the Organization tab and change the organization context to match your requirement.
-
Optional: Click the Location tab and change the location context to match your requirement.
-
From the Host Group list, select a host group that you want to assign your host to. That host group will populate the form.
-
Click the Interfaces tab, and on the interface of the host, click Edit.
-
Verify that the fields are populated with values. Note in particular:
-
orcharhino automatically assigns an IP address for the new host.
-
The Name from the Host tab becomes the DNS name.
-
Ensure that orcharhino 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.
For more information about network interfaces, see Configuring network interfaces in Managing Hosts.
-
Click the Operating System tab. Verify that all fields contain correct values.
-
Click Resolve in Provisioning Templates to check the new host can identify the right provisioning templates to use.
For more information about associating provisioning templates, see Associating templates with operating systems.
-
On the Parameters tab, click Add parameter. Add a parameter named
kt_activation_keys, select the string type, and enter the name of the activation key as the value. The activation key has to belong to the same organization as your host. You can also enter a comma-separated list of multiple activation keys. -
Click Submit to save the host details. This creates a host entry and the host details page appears.
-
Download the boot disk from orcharhino Server. On the host details page, click the vertical ellipsis and select Host 'My_Host_Name' image.
-
Create a host:
$ hammer host create \ --build true \ --enabled true \ --hostgroup "My_Host_Group" \ --location "My_Location" \ --mac "My_MAC_Address" \ --managed true \ --name "My_Host_Name" \ --organization "My_Organization" -
Configure the network interface of your host:
$ hammer host interface update \ --host "My_Host_Name" \ --managed true \ --primary true \ --provision true -
Download the Host image boot disk from orcharhino Server:
$ hammer bootdisk host --host My_Host_Name
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 orcharhino.
-
In the orcharhino management UI, navigate to Hosts > Templates > Provisioning Templates.
-
Create a provisioning template, or clone and edit an existing template.
-
In the template, click the Template tab.
-
In the Template editor field, add the
create_userssnippet to the%postsection:<%= snippet('create_users') %> -
Select the Default checkbox.
-
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 operating system associated with the modified template. For more information, see Creating a Host in Managing Hosts.
The SSH keys of the Owned by user are added automatically when the
create_userssnippet 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.
|
The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution Share Alike 4.0 International ("CC BY-SA 4.0") license. This page also contains text from the official Foreman documentation which uses the same license ("CC BY-SA 4.0"). |