# foreman_bootdisk Foreman's network provisioning model is usually based on PXE, which requires DHCP and TFTP services. However many users don't have these available, so foreman_bootdisk provides both a per-host and generic boot disks to enable deployments in datacentres without these capabilities. Boot images are written as hybrid ISO images (usable as ISOs or USB disks), and booted either from physical media or virtual disk/CDROM (via a lights out management device). # Installation Please see the Foreman wiki for appropriate instructions: * [Foreman: How to Install a Plugin](http://projects.theforeman.org/projects/foreman/wiki/How_to_Install_a_Plugin) The gem name is "foreman_bootdisk". Run `foreman-rake db:migrate`, `foreman-rake db:seed` after installation. RPM users can install the "ruby193-rubygem-foreman_bootdisk" or "rubygem-foreman_bootdisk" packages. Debian users can install the "ruby-foreman-bootdisk" package. ## Dependencies * iPXE images are required * syslinux is required * genisoimage/mkisofs and isohybrid are required gPXE images are unsupported due to lack of initrd support. ## Compatibility | Foreman Version | Plugin Version | | --------------- | --------------:| | <= 1.3 | ~> 1.0 | | >= 1.4 | ~> 2.0 | # Usage ## Configuration With all image types, hosts have to be registered to Foreman prior to booting the image. Hosts will be identified by their MAC or IP address to provide the correct provisioning template if the host is in build mode. For per-host images, ensure host IP addresses and subnets are populated, and the subnet's gateway, subnet mask and DNS resolver(s) are correctly configured under Infrastructure>Subnets in Foreman. To permit access to images for non-admin users, add the "Boot disk access" role to a user or the "download_bootdisk" permission to an existing role. ## Templates An OS iPXE provisioning template is required, see the list below for the name. Ensure the OSes are ticked under the Associations tab and that the iPXE template is selected under the Templates tab on the OS. * Kickstart (EL/Fedora) OSes, use "Kickstart default iPXE" * Preseed (Debian/Ubuntu) OSes, use "Preseed default iPXE" Standard templates for the kickstart/preseed and optionally finish script still need to be associated, as bootdisk only handles bootstrapping. * EL clones or Fedora should use "Kickstart default" as the "provision" template * RHEL should use "Kickstart RHEL default" as the "provision" template * Preseed (Debian/Ubuntu) OSes, use "Preseed default" as the "provision" template and "Preseed default finish" as the "finish" template If you're not using Foreman's default kickstart or preseed provisioning templates, then ensure your versions provide the static IP details required to configure the OS. For a kickstart file, the following configuration will do this: network --bootproto <%= @static ? "static" : "dhcp" %> --hostname <%= @host %> <%= "--ip=#{@host.ip} --netmask=#{@host.subnet.mask} --gateway=#{@host.subnet.gateway} --nameserver=#{@host.subnet.dns_primary},#{@host.subnet.dns_secondary}" if @static %> Foreman's default kickstart and preseed files are ready to use. ### Customising boot disk templates The templates used on the boot disks themselves are read-only so they can be updated in new versions of the plugin. To customise, copy the contents to a new template and set the name in Administer>Settings>Bootdisk. * `bootdisk_host_template` is the name of the per-host boot disk template * `bootdisk_generic_host_template` is the name of the generic boot disk template These templates are baked into the downloaded ISO files and generally don't need to be modified. ## Settings Some more advanced settings are available under Administer>Settings>Bootdisk in the Foreman UI. * `bootdisk_ipxe_dir` points to the directory containing ipxe.lkrn * `bootdisk_syslinux_dir` points to the directory containing syslinux images * `bootdisk_mkiso_command` is the name of genisoimage/mkisofs on your OS ## Available images The image types have trade-offs, but are all meant for environments without total control over the network infrastructure - so no DHCP reservations or TFTP settings are needed.
Type | Generic | DHCP required | DHCP reservation | Pre-register host |
---|---|---|---|---|
Per-host image | No | No | No | Yes |
Generic image | Yes | Yes | No | Yes |