- How do I use unattended installations (Kickstart, jumpstart, preseed)?
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).
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:
- 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¶
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
- Though a host group.
- Though an environment.
- Though a combination of a host group and an environment (such as web servers in development mode).
- Though an operating system.
Therefore, there are few steps which are required in order to relate hosts and templates.
- Make sure you define at least one operating systems.
- Create each template and associate the valid operating systems to it.
- Optionally, associate the template with hostgroups and/or environments.
- 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
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.
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
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