- How do I use unattended installations (Kickstart, jumpstart, preseed)?
- How does Foreman manages TFTP?
- Whats inside the Kickstart / jumpstart /preseed ?
- Modifying the unattended template
How do I use unattended installations (Kickstart, jumpstart, preseed)?¶
Foreman automates network boot processes using PXEboot (or native Solaris net:dhcp)
At this time, Foreman does not support DHCP and DNS alteration, you would need to do those steps manually.
Foreman has currently limited support for TFTP- that means it require the TFTP server to be accessible via the local file system.
future versions of Foreman would allow remote TFTP servers as well.
make sure you add into your config/settings.yml
replace the value with your actual TFTP directory and ensure that the user which executes Foreman have write access.
How does Foreman manages TFTP?¶
When clicking on the Build button (in the host list), Foreman would generate a link which will be automatically read by pxelinux,
This link would point to a predefined syslinux(pxelinux) boot file which would be based on the Operating System used.
after a successful OS installation, that link will be removed, and your default PXE settings will be served.
The idea behind it is to set the boot order on each host to always boot from network, and then change the settings via Foreman.
This avoids the need to press F12 on each machine just to reinstall it, Clicking on Build in Foreman will trigger a host re-installation upon the next server reboot if default boot order is PXE
an example of a such a file for CentOS 5 32bit:
default linux label linux kernel boot/centos-5-32.vmlinuz append initrd=boot/centos-5-32.initrd.img ks=http://foremanhost/unattended/kickstart ksdevice=eth0 network kssendmac
and another example for Ubuntu 9.04 32bit
default preseed label preseed kernel boot/ubuntu-9.04-32.linux append initrd=boot/ubuntu-9.04-32.initrd.gz ramdisk_size=10800 root=/dev/rd/0 rw auto preseed/url=http://foremanhost/unattended/preseed console-keymaps-at/keymap=us locale=en_US interface=eth0 DEBCONF_PRIORITY=critical netcfg/dhcp_timeout=60 --
Foreman will enable host autosign during provisioning time, that means, the user which executes Foreman must have:
1. write access to /etc/puppet/autosign.conf
2. sudo access to run puppetca
Once a host (which is enabled for build) is requesting a kickstart/jumpstart etc than an entry would be created in the autosign.conf file.
Each operating system will run puppetd after the OS installation but before the first reboot, this will acquire the puppet certificate, then the host will notify Foreman that it has finished the installation, and Foreman will remove the entry from the autosign file automatically.
Whats inside the Kickstart / jumpstart /preseed ?¶
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.
- if you are using passenger please remove the ":3000" from the URL.
Modifying the unattended template¶
You probably want to do minor teaks to your kickstart/jumpstart/preseed template (yeah the same kind puppet uses).
the template for can be found at:
RedHat based installation
and a finish script