« Previous - Version 27/54 (diff) - Next » - Current version
Ohad Levy, 06/26/2011 02:13 am


How do I use unattended installations (Kickstart, jumpstart, preseed)?

Foreman manages the host creation process by controlling a host's DHCP, DNS, TFTP boot files, Puppet CA and node classification. This is whole process is handled in the core foreman program and in several satellite proxies running at various locations within the organization. More details can be found on the Foreman_Architecture page.

Foreman automates network boot processes using PXEboot, gPXE, (or native Solaris net:dhcp).

You probably want to look into installing the Smart Proxy (which could be on the same machine as well).
a nice summary about the process can be found in the following blog post

Whats inside the provisioning templates (Kickstart / jumpstart /preseed, pxelinux etc) ?

These files are all generated dynamically based on the setting of each host in Foreman, things like partition tables and root password can be unique per server.

if you want to see the kickstart/preseed etc you may use the spoof parameter, just point your browser to:

http://foreman/unattended/unattended?spoof=123.321.123.321
  • 123.321.123.321 is the hosts IP Address (the one you want to build).
  • usually you want to see the page source, the browser might display the file in html which will result in hard to read output.

Modifying/Creating the template

See TemplateWriting

Template association to hosts

The guiding principle within Foreman is that we don't want to associate templates with hosts directly.
There are 4 ways to associate a template with a host

  1. Though a host group.
  2. Though an environment.
  3. Though a combination of a host group and an environment (such as web servers in development mode).
  4. Though an operating system.

Therefore, there are few steps which are required in order to relate hosts and templates.

  1. Make sure you define at least one operating systems.
  2. Create each template and associate the valid operating systems to it.
  3. Optionally, associate the template with hostgroups and/or environments.
  4. Edit the relevant operating system and define a default/fallback template for each relevant template type.

A special type of a template is called "PXE Default File" which is the default PXE template.
The included example will setup PXE menus for each configured host group (allowing you to deploy hosts without puppet if you require that functionality).

Dynamic disk partitioning

It is possible to use a script (e.g a kickstart post script) instead of a static partition table.
see Dynamic disk partioning

Note Kickstart requires that Foreman port would be 80, therefor you should probably configure foreman using passenger or alternative technologies.
(Examples could be found in our reference Foreman Puppet module

Solaris

Media notes

A Solaris distribution should be declared in the same form as a Linux distribution. There should be an http based access URL, (the path variable,) so that the smart-proxy can
download the required components for the build. As the Solaris jumpstart process is performed via NFS rather than TFTP the distribution media must also be made available for
ReadOnly mounting on the clients. The fields describing this alternative access naming scheme are revealed on the Media page when a Solaris operating system is selected. The
Solaris build can proceed via a conventional package build, where the packages selected are the SUWNCreq minimal install, or a flash build. The flash archives are located under
the distribution directory by default but can be located anywhere that can be accessed via NFS.

jumpstart files

The Solaris jumpstart process is occurs in two phases; a diskless client is first booted and then in phase two, the host mounts its build media and configuration files from an NFS location and proceeds with the build. Foreman provides a skeleton configuration directory structure suitable for NFS mounting on the host. In this structure are files that are customised to forward configuration requests to the Foreman instance. This directory tree, located at .../foreman/extra/jumpstart, should be NFS shared to the subnet that contains any potential Solaris clients. Some customization of this directory tree may be required. See Solaris_jumpstart_directory

Model consolidation

When Foreman imports a host that has not been configured and built by Foremen it will attempt to determine the model of that machine by analyzing the facts that are associated with the host. This can often result in many badly named models all referring to what should be a single manufacturers model. A rake task has been provided that attempts to consolidate all these duplicate malformed names into a single sensible model together with the appropriate Solaris vendor class and Solaris hardware model. See rake models::consolidate

Also available in: HTML TXT