Introduction to Provisioning

Provisioning Methods

There are multiple ways to provision a host: image based, network based, boot disk based, and discovery based. The optimal host provisioning method depends on the type of host, the availability of DHCP; and whether it is to be cloned from an existing VM template.

For a better understanding of provisioning hosts using orcharhino, see our glossary for terminology and key terms. Key terms include deployment, compute resource, provisioning template, and virtualization.

This results in the following decision tree:

Provisioning guide decision tree

The starting point is the question of which type of host you want to provision:

cloud instances
  • choose image based host deployment.

virtual machines
  • choose image based installation if you want to clone the VM from a template/golden image.

  • depending on your network configuration, either

    • choose boot disk based installation if your hosts have static IP addresses;

    • or select network based installation if the network of the host provides DHCP.

bare metal hosts
  • choose discovery based installation.

  • or choose network based installation depending on the network configuration, either

    • choose boot disk based installation for hosts with static IP addresses;

    • or select network based installation if the network of the host provides DHCP.

The following graphic displays the steps of each provisioning method:

Provisioning guide methods
Network Based Provisioning
  1. Depending on whether it is a virtual machine or bare metal host, orcharhino either

    • instructs the compute resource provider to create a virtual machine,

    • or a bare metal host has to be started manually, that is by hand or via a lights out management tool. For bare metal hosts, the MAC address of the new host must be submitted to orcharhino.

  2. The host boots over the network and automatically searches for a DHCP server, which in turn assigns an IP address and configures the network. The DHCP server provides a PXE/iPXE file, which is a type of provisioning template.

    We recommend having the orcharhino configure and manage the DHCP server or even take over its duties to the orcharhino or orcharhino proxy.

  3. The new host fetches the AutoYaST/Kickstart/Preseed files from orcharhino or orcharhino proxy via TFTP and starts the unattended installation and initial configuration of the operating system.

  4. The new host reports back to orcharhino after finishing the installation and with that the status in orcharhino is switched to installed.

Boot Disk Based Provisioning
  1. The boot_disk.iso image contains the network configuration of the new host, that is it replaces the network configuration via DHCP in contrast to network based provisioning. There are four different kinds of boot disk images:

    • the per-host image is the default image and does not require DHCP. It only contains the network configuration and then points to the orcharhino for the iPXE template followed by the provisioning template, that is an AutoYaST, Kickstart, or Preseed provisioning template.

    • the full-host image contains the network configuration, the kernel, the iPXE file, and the provisioning template. The image is operating system specific.

    • the generic image is a reusable image which works for any host registered on orcharhino and requires DHCP.

    • the subnet-generic image requires DHCP and chainloads the installation media from an orcharhino proxy assigned to the subnet of the host.

  2. Both a bare metal host or a virtual machine require the boot_disk.iso to be attached.

    • Virtual machines running on VMware vSphere will automatically receive the image and attach it to the new host. For other compute resource providers, you will need to attach the image by hand.

    • Bare metal host always need to receive the image manually. The same applies if you want to boot from a different boot_disk.iso image, other than the one provided by orcharhino. For bare metal hosts, the MAC address of the new host must be submitted to orcharhino.

  3. The new host reports back to orcharhino after finishing the installation and with that the status in orcharhino is switched to installed.

Image Based Provisioning (PXE-less provisioning)

Depending on how you want to configure your image, this can be done either

  • with a finish provisioning template via SSH only, in which case you require the network configuration to be provided via DHCP;

  • or via cloud-init with a userdata provisioning template, in which case the image needs to point to your orcharhino or orcharhino proxy and have built-in support for cloud-init. The exact configuration depends on your compute resource provider.

We currently only recommend using image based provisioning for hosts that have access to a DHCP server.

  1. orcharhino instructs the compute resource provider to create a virtual machine based on an existing VM template, that is by cloning a golden image.

  2. Depending on whether a DHCP server is available,

    • the new virtual machine either receives its IP address and network configuration from the DHCP server,

    • or a cloud-init provisioning template is used to set up the network configuration. This can be used with and without DHCP.

      Alternatively, orcharhino finishes the provisioning process based on provisioning templates via SSH.

  3. If the compute resource is a cloud provider and the image is capable of user_data, the new host does not need to be reachable by orcharhino or orcharhino proxy via SSH but can itself notify orcharhino or orcharhino proxy when it is ready.

Operating System - Template Mapping
Operating System Provisioning Template

Alma Linux, CentOS, Oracle Linux, Red Hat Enterprise Linux, and Rocky Linux

Kickstart template

SUSE Linux Enterprise Server

AutoYaST template

Debian and Ubuntu

Preseed template

Discovery Based Provisioning

Discovery based provisioning is similar to boot disk based provisioning. It uses a discovery.iso image to boot the host into a minimal Linux system, reports it to orcharhino, and sends various facts including its MAC address to identify the host. The host is then listed on the discovered hosts page.

Discovery based provisioning requires the host discovery plugin to be installed on your orcharhino. For more information, see Configuring the Discovery Service.

  1. Depending on whether a DHCP server is available,

    • the host either manually receives its network configuration and discovery image and boots the discovery.iso image in an interactive way;

    • or the host automatically fetches its network configuration and discovery image from the DHCP server and boots the discovery.iso image in a non interactive way.

  2. The discovery.iso image contains the information to which orcharhino or orcharhino proxy the host must report to and collects facts about the host and sends it to orcharhino or orcharhino proxy.

    • If there are existing discovery rules, the host will automatically start a network based provisioning process based on discovery rules and host groups.

    • Else, the host appears on the list of discovered hosts. The then following process is very similar to creating a hew host.

      There are two ways to start the installation of the operating system:

      • the host is rebooted and then gets the network based provisioning template by the DHCP server;

      • or the host is not rebooted but the installation is started via kexec with the current network configuration.

If you want to provision hosts based on Ansible playbooks, have a look at the application centric deployment guide. ACD helps you deploy and configure multi host applications using an Ansible playbook and application definition.

Provisioning Overview

Provisioning is a process that starts with a bare physical or virtual machine and ends with a fully configured, ready-to-use operating system. Using orcharhino, you can define and automate fine-grained provisioning for a large number of hosts.

There are many provisioning methods. For example, you can use orcharhino Server’s integrated orcharhino Proxy or an external orcharhino Proxy to provision bare metal hosts using both PXE based and non-PXE based methods. You can also provision cloud instances from specific providers through their APIs. These provisioning methods are part of the orcharhino application life cycle to create, manage, and update hosts.

orcharhino has different methods for provisioning hosts:

Bare Metal Provisioning

orcharhino provisions bare metal hosts primarily through PXE boot and MAC address identification. You can create host entries and specify the MAC address of the physical host to provision. You can also boot blank hosts to use orcharhino’s discovery service, which creates a pool of ready-to-provision hosts. You can also boot and provision hosts through PXE-less methods.

Cloud Providers

orcharhino connects to private and public cloud providers to provision instances of hosts from images that are stored with the Cloud environment. This also includes selecting which hardware profile or flavor to use.

Virtualization Infrastructure

orcharhino connects to virtualization infrastructure services such as oVirt and VMware to provision virtual machines from virtual image templates or using the same PXE-based boot methods as bare metal providers.

For more information, see compute resources.

Network Boot Provisioning Workflow

For physical or virtual BIOS hosts:

  1. Set the first booting device as boot configuration with network.

  2. Set the second booting device as boot from hard drive. orcharhino manages TFTP boot configuration files so hosts can be easily provisioned just by rebooting.

For physical or virtual EFI hosts:

  1. Set the first booting device as boot configuration with network.

  2. Depending on the EFI firmware type and configuration, the OS installer typically configures the OS boot loader as the first entry.

  3. To reboot into installer again, use efibootmgr utility to switch back to boot from network.

The provisioning process follows a basic PXE workflow:

  1. You create a host and select a domain and subnet. orcharhino requests an available IP address from the DHCP orcharhino Proxy that is associated with the subnet or from the PostgreSQL database in orcharhino. orcharhino loads this IP address into the IP address field in the Create Host window. When you complete all the options for the new host, submit the new host request.

  2. Depending on the configuration specifications of the host and its domain and subnet, orcharhino creates the following settings:

    • A DHCP record on orcharhino Proxy that is associated with the subnet.

    • A forward DNS record on orcharhino Proxy that is associated with the domain.

    • A reverse DNS record on the DNS orcharhino Proxy that is associated with the subnet.

    • PXELinux, Grub, Grub2, and iPXE configuration files for the host in the TFTP orcharhino Proxy that is associated with the subnet.

    • A Puppet certificate on the associated Puppet server.

    • A realm on the associated identity server.

  3. The host is configured to boot from the network as the first device and HDD as the second device.

  4. The new host requests a DHCP reservation from the DHCP server.

  5. The DHCP server responds to the reservation request and returns TFTP next-server and filename options.

  6. The host requests the boot loader and menu from the TFTP server according to the PXELoader setting.

  7. A boot loader is returned over TFTP.

  8. The boot loader fetches configuration for the host through its provisioning interface MAC address.

  9. The boot loader fetches the operating system installer kernel, init RAM disk, and boot parameters.

  10. The installer requests the provisioning template from orcharhino.

  11. orcharhino renders the provision template and returns the result to the host.

  12. The installer performs installation of the operating system.

    • The installer registers the host to orcharhino using orcharhino client.

    • The installer installs management tools such as katello-agent and puppet.

    • The installer notifies orcharhino of a successful build in the postinstall script.

  13. The PXE configuration files revert to a local boot template.

  14. The host reboots.

  15. The new host requests a DHCP reservation from the DHCP server.

  16. The DHCP server responds to the reservation request and returns TFTP next-server and filename options.

  17. The host requests the bootloader and menu from the TFTP server according to the PXELoader setting.

  18. A boot loader is returned over TFTP.

  19. The boot loader fetches the configuration for the host through its provision interface MAC address.

  20. The boot loader initiates boot from the local drive.

  21. If you configured the host to use any Puppet classes, the host configures itself using the modules.

The fully provisioned host performs the following workflow:

  1. The host is configured to boot from the network as the first device and HDD as the second device.

  2. The new host requests a DHCP reservation from the DHCP server.

  3. The DHCP server responds to the reservation request and returns TFTP next-server and filename options.

  4. The host requests the boot loader and menu from the TFTP server according to the PXELoader setting.

  5. A boot loader is returned over TFTP.

  6. The boot loader fetches the configuration settings for the host through its provisioning interface MAC address.

  7. For BIOS hosts:

    • The boot loader returns non-bootable device so BIOS skips to the next device (boot from HDD).

  8. For EFI hosts:

    • The boot loader finds Grub2 on a ESP partition and chainboots it.

  9. If the host is unknown to orcharhino, a default bootloader configuration is provided. When Discovery service is enabled, it boots into discovery, otherwise it boots from HDD.

This workflow differs depending on custom options. For example:

Discovery

If you use the discovery service, orcharhino automatically detects the MAC address of the new host and restarts the host after you submit a request. Note that TCP port 8443 must be reachable by the orcharhino Proxy to which the host is attached for orcharhino to restart the host.

PXE-less Provisioning

After you submit a new host request, you must boot the specific host with the boot disk that you download from orcharhino and transfer using a USB port of the host.

Compute Resources

orcharhino creates the virtual machine and retrieves the MAC address and stores the MAC address in orcharhino. If you use image-based provisioning, the host does not follow the standard PXE boot and operating system installation. The compute resource creates a copy of the image for the host to use. Depending on image settings in orcharhino, seed data can be passed in for initial configuration, for example using cloud-init. orcharhino can connect using SSH to the host and execute a template to finish the customization.

By default, deleting the provisioned profile host from orcharhino does not destroy the actual VM on the external compute resource. To destroy the VM when deleting the host entry on orcharhino, navigate to Administer > Settings > Provisioning and configure this behavior using the destroy_vm_on_host_delete setting. If you do not destroy the associated VM and attempt to create a new VM with the same resource name later, it will fail because that VM name already exists in the external compute resource. You can still register the existing VM to orcharhino using the standard host registration workflow you would use for any already provisioned host.

The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution–Share Alike 3.0 Unported ("CC-BY-SA") license. This page also contains text from the official Foreman documentation which uses the same license ("CC-BY-SA").