Unattended installations
Version 2 (Ohad Levy, 09/08/2009 05:34 am)
| 1 | 1 | h1. How do I use unattended installations (Kickstart, jumpstart, preseed)? |
|
|---|---|---|---|
| 2 | 1 | ||
| 3 | 1 | Torque automates network boot processes using PXEboot (or native Solaris net:dhcp) |
|
| 4 | 1 | ||
| 5 | 1 | At this time, Torque does not support DHCP and DNS alteration, you would need to do those steps manually. |
|
| 6 | 1 | ||
| 7 | 1 | h2. TFTP |
|
| 8 | 1 | ||
| 9 | 1 | Torque has currently limited support for TFTP- that means it require the TFTP server to be accessible via the local file system. |
|
| 10 | 1 | future versions of Torque would allow remote TFTP servers as well. |
|
| 11 | 1 | ||
| 12 | 1 | make sure you add into your config/settings.yml |
|
| 13 | 1 | <pre> :tftppath: /var/lib/tftpboot/pxelinux.cfg</pre> |
|
| 14 | 1 | replace the value with your actual TFTP directory and ensure that the *user which executes Torque have write access*. |
|
| 15 | 1 | ||
| 16 | 1 | ||
| 17 | 1 | h3. How does Torque manages TFTP? |
|
| 18 | 1 | ||
| 19 | 1 | When clicking on the Build button (in the host list), Torque would generate a link which will be automatically read by pxelinux, |
|
| 20 | 1 | This link would point to a predefined syslinux(pxelinux) boot file which would be based on the Operating System used. |
|
| 21 | 1 | ||
| 22 | 1 | after a successful OS installation, that link will be removed, and your default PXE settings will be served. |
|
| 23 | 1 | The idea behind it is to set the boot order on each host to always boot from network, and then change the settings via Torque. |
|
| 24 | 1 | ||
| 25 | 1 | This avoids the need to press F12 on each machine just to reinstall it, Clicking on Build in Torque will trigger a host re-installation upon the next server reboot if default boot order is PXE |
|
| 26 | 1 | ||
| 27 | 1 | an example of a such a file for CentOS 5 32bit: |
|
| 28 | 1 | <pre>default linux |
|
| 29 | 1 | label linux |
|
| 30 | 1 | kernel boot/centos-5-32.vmlinuz |
|
| 31 | 2 | Ohad Levy | append initrd=boot/centos-5-32.initrd.img ks=http://torquehost/unattended/kickstart ksdevice=eth0 network kssendmac |
| 32 | 1 | </pre> |
|
| 33 | 1 | ||
| 34 | 1 | and another example for Ubuntu 9.04 32bit |
|
| 35 | 1 | <pre>default preseed |
|
| 36 | 1 | label preseed |
|
| 37 | 1 | kernel boot/ubuntu-9.04-32.linux |
|
| 38 | 2 | Ohad Levy | append initrd=boot/ubuntu-9.04-32.initrd.gz ramdisk_size=10800 root=/dev/rd/0 rw auto preseed/url=http://torquehost/unattended/preseed console-keymaps-at/keymap=us locale=en_US interface=eth0 DEBCONF_PRIORITY=critical netcfg/dhcp_timeout=60 -- |
| 39 | 1 | </pre> |
|
| 40 | 1 | ||
| 41 | 1 | h2. Whats inside the Kickstart / jumpstart /preseed ? |
|
| 42 | 1 | ||
| 43 | 1 | These files are all generated dynamically based on the setting of each host in Torque, things like partition tables and root password can be unique per server. |
|
| 44 | 1 | ||
| 45 | 1 | if you want to see the kickstart/preseed etc you may use the spoof parameter, just point your browser to: |
|
| 46 | 1 | ||
| 47 | 1 | <pre>http://Torquehost:3000/unattended/kickstart?spoof=123.321.123.321</pre> |
|
| 48 | 1 | ||
| 49 | 1 | * 123.321.123.321 is the hosts IP Address (the one you want to build). |
|
| 50 | 1 | * usually you want to see the page source, the browser might display the file in html which will result in hard to read output. |
|
| 51 | 1 | * if you are using passenger please remove the ":3000" from the URL. |
|
| 52 | 1 | ||
| 53 | 1 | h2. Modifying the unattended template |
|
| 54 | 1 | ||
| 55 | 1 | You probably want to do minor teaks to your kickstart/jumpstart/preseed template (yeah the same kind puppet uses). |
|
| 56 | 1 | the template for can be found at: |
|
| 57 | 1 | RedHat based installation |
|
| 58 | 1 | <pre>app/view/unattended/kickstart.rhtml</pre> |
|
| 59 | 1 | Debian/Ubuntu installations |
|
| 60 | 1 | <pre>app/view/unattended/preseed.rhtml</pre> |
|
| 61 | 1 | and a finish script |
|
| 62 | 1 | <pre>app/view/unattended/preseed_finish.rhtml</pre> |
