Host Install Tools host install tools page

  • At this point, we really need to bring in more automated OS installation.
  • VM templates are fine in a VM environment, but Debian preseed files (example) (or equivalents, like Redhat Kickstart) work everywhere.
  • Could just make a basic preseed file similar to router-preseed.txt, or working from Mike's CAE one from 2007 and later.
  • Would be nice if every preseeded system automatically downloaded and installed the puppet bootstrap script (or equivalent).

How much do we want a totally hands-off OS installation?

  • If we use the unmodified puppet bootstrap script, it pauses waiting for its key to be signed on the puppetmaster.
    • If we sign the key during the OS install, does a node definition on puppet try to install too many things at once, delaying the install time?
    • If we don't pause for key signing, the OS install completes quickly, but we have to remember to go back and sign the system's key. (more like what Mike did normally)
  • Learning preseed files is a bit of an art form. But if we limit ourselves to making a bare system installation, it's easier.

Of course, now that puppetlabs has an apt repository, maybe we just avoid the bootstrap script in its entirety, and adapt the preseed file to do the same thing. Checklist of functions normally run in bootstrap:

  • remove_cdrom_repositories: not needed on a PXE install, since we never used a CD
  • add_network_mirror: taken care of in preseed (
  • add_puppet_repository: taken care of in preseed by adding additional repository
  • install_puppet: taken care of
  • configure_puppet: can be taken care of in late_command
  • test_puppet_client: probably unneeded
  • prompt_for_key_sign: unneeded if we want to go totally hands-off, and not technically possible unless we use the actual bootstrap script
  • test_puppet_client: probably unneeded
  • restart_puppet: unneeded, since we'll just reboot after the install

Preseed file for one-drive systems (see comments for things to be tested, and all-caps parts for things to be edited before students can use):

d-i debian-installer/locale string en_US
d-i console-tools/archs select at
d-i console-keymaps-at/keymap select American English
d-i debian-installer/keymap string us
d-i netcfg/choose_interface select eth0
d-i netcfg/dhcp_timeout string 60
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_hostname seen true
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/get_domain seen true
d-i netcfg/dhcp_options select Retry network autoconfiguration
d-i mirror/codename string squeeze
d-i mirror/country string enter information manually
d-i mirror/http/countries select enter information manually
d-i mirror/http/directory string /debian/
d-i mirror/http/hostname string
d-i mirror/http/proxy string

# Untested second repository. Probably works ok, though.
d-i apt-setup/local0/repository string squeeze main
d-i apt-setup/local0/key string
d-i apt-setup/local0/comment string Puppetlabs

d-i clock-setup/utc boolean false
d-i time/zone string US/Central
d-i apt-setup/security_host string

# May not need to allow unauthenticated repositories any more.
# d-i debian-installer/allow_unauthenticated string true

d-i passwd/make-user boolean false

# Grab crypted password from /etc/shadow on candidate system
d-i passwd/root-password-crypted password $1$__THIS_IS_NOT_A_VALID_CRYPTED_PASSWORD__

tasksel tasksel/first multiselect standard
d-i pkgsel/include string openssh-server puppet puppetlabs-release
d-i finish-install/reboot_in_progress note
popularity-contest popularity-contest/participate boolean false
d-i partman-auto/disk string /dev/discs/disc0/disc
d-i partman-auto/method string regular
d-i partman-auto/init_automatically_partition \
	select Guided - use entire disk
d-i partman-auto/choose_recipe \
	select All files in one partition (recommended for new users)
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition \
	select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true

# Untested late_command
d-i preseed/late_command string wget -O /target/etc/puppet/puppet.conf URL_TO_YOUR_PUPPET.CONF; cp /var/log/syslog /target/root

Things to deal with

  • hiera to store common configuration information
    • root password hash (for preseed file)
    • secret folder (for debian_installer module and preseed file)
    • hostname for Debian mirror (for preseed file, maybe also for apt module)
Last modified 7 years ago Last modified on Apr 28, 2013, 8:58:41 PM