Kickstart

Overview

Kickstart provides a means of rapid, unattended deployment of the OS. The process briefly consists of:

  • Server is booted using PXE (network boot) to syslinux provided by tftp.
  • Desired image is selected from the menu screen presented to the user.
  • OS is deployed to server.
  • Post-installation script makes appropriate changes to configurations and installs any additional packages requried.
  • Build is complete.

Server Details

Kickstart is currently running on ops01.

Files can be browsed at http://192.168.123.45/ks

Directory Structure

Directory Description
/kickstart Base directory for all Kickstart related files
/kickstart/backup Contains backups and scripts
/kickstart/http All files published by http used by Kickstart clients
/kickstart/tftpboot PXE boot configs and files
/kickstart/http/cfg Kickstart Configuration Files
/kickstart/http/extra Additional scripts and packages
/kickstart/http/extra/scripts/ks_post_install Post-install scripts
/kickstart/http/os Repo/OS/Packages used for deployment
/kickstart/tftpboot/isolinux Kernel and initrd files
/kickstart/tftpboot/msgs Menus displayed once PXE is booted
/kickstart/tftpboot/isolinux Kernel and initrd files
/kickstart/tftpboot/pxelinux.0 File used to boot syslinux PXE
/kickstart/tftpboot/pxelinux.cfg Names boot labels used for booting after syslinux phase

The following files are worthy of note:

File Description
/kickstart/http/extra/scripts/ks_post_install/config_server.sh The main post-install script. Everything happens from here once the initial Kickstart build has completed and the OS is installed.
/kickstart/http/extra/scripts/ks_post_install/mac.db Used during post-build to match the MAC address of the server to apply the appropriate network settings.
/kickstart/http/extra/scripts/ks_post_install/update_tar.sh IMPORTANT!! If you make any changes to any files you MUST run this file to update the tar file the server retrieves to run all the post install scripts.

Post Install Scripts

After using the *.ks kickstart file to configure the server, at the bottom of the ks file is a command to wget and extract http://KS_SERVER/ks/ks_post_install.tar to /root/ks_post_install. config_server.sh is run. This is the main file containing all directives which makes the following changes: \\Note the variables at the top of the script.

  1. Sets timezone to UTC
  2. Syncs clock to internal NTP servers
  3. Set modprobe aliases for bnx2 and be2net NICs
  4. Set networking:
  5. Hostname
  6. IP Address, Netmask, Gateway
  7. Disable IPv6
  8. Hosts file (and additional entries only for DB servers)
  9. /etc/resolve.conf
  10. Create NIC bonding for eth0/1 (bond0) (mode=1)
  11. DB Only: create bond1 for eth2/3 (mode=0)
  12. Disable uncessary services (chkconfig off)
  13. Set permissions on some system dirs to tighten security
  14. RGS servers only: set some RGS specific OS parameters
  15. Create users and groups where applicable: wworks, nagios, gi-hpsim with consistent GIDs and UIDs
  16. Set .ssh dir such as SSH keys for wworks, nagios
  17. Configure server for LDAP authentication
  18. Set sudoers file
  19. Set PS1 prompt, using RED colour for root, green for non-root. (export PS1=“\u@\h \$ ”)
  20. Tighten sshd security and disable remote root login.
  21. Set login prompt (issue/banner)
  22. Set boot resolution to 1024×768
  23. Configure exim
  24. Set NTP sources
  25. Configure local yum repo
  26. Configure Spacewalk and register server
  27. Configure Syslog to gi-log01
  28. For servers with HBA, add recommended QLogic/HP modprobe.conf kernel options
  29. Configure multipath.conf with recommended HP parameters for EVA8400 or MSA P2000 G3
  30. DB Only: Retrieve and configure Oracle binaries, set some system parameters
  31. DB Only: Setup keyless SSH for Oracle between DB servers
  32. Install HP Support Pack RPMs
  33. Set VCA config and passwords (HP Version Control Agent) to gi-sma01
  34. Configure SNMP and set traps to gi-sma01 (HP SIM)
  35. Configure iLO:
    1. Set/update iLO Name (also appears as Blade name in Onboard Administrator GUI)
    2. Set/update iLO Hostname (gi-<server>i)
    3. Create/set usernames/passwords: gibtechops, uktechops, lvtechops
    4. Set SNMP traps to point to gi-sma01 (HP SIM)
    5. * Note: These run at first boot and you may lose access to iLO while it resets.
  36. Write all logs and output to /root/kickstart_logs
  37. Send email notification of server build
 
ks/kickstart.txt · Last modified: 08/03/2022 10:52 by andrew