-
Notifications
You must be signed in to change notification settings - Fork 0
Kickstart_SL
When managing many nodes it quickly becomes time consuming to install the nodes one at a time. Instead, it is usually recommended to use Kickstart. Kickstart allows us to boot a node off of TFTP and pass in a configuration file of all the settings we need set at installation time. To configure the DNSMasq TFTP server see here.
To find more information about Kickstart and all of the options you can pass to it, visit the (Fedora Wiki Page)[https://fedoraproject.org/wiki/Anaconda/Kickstart].
# The following kickstart file is everything we need for this example cluster.
# You at the very minimum need to change the following items:
# Verify your Architecture: i386 or x86_64
# The location of your http.cluster.domain repo server.
# Your root password
# Your GRUB password
# Your timezone
# Your language / keyboard
#
# Firewall configuration
firewall --enabled --ssh --port=2049:tcp
#
# Telling kickstart to install (vs an upgrade)
install
#
# This section is all of our repositories. Please see the section on creating repos for more information.
url --url="http://http.cluster.domain/scientificlinux/6.4/x86_64/os"
repo --name="Scientific Linux 6 - x86_64" --baseurl=http://http.cluster.domain/scientificlinux/6.4/x86_64/os/ --cost=1000
repo --name="Scientific Linux 6 - Security" --baseurl=http://http.cluster.domain/scientificlinux/6.4/x86_64/updates/security/ --cost=1000
repo --name="Scientific Linux 6 - Fastbugs" --baseurl=http://http.cluster.domain/scientificlinux/6.4/x86_64/updates/fastbugs/ --cost=1000
repo --name="Cluster_Repo" --baseurl=http://http.cluster.domain/Cluster_Repo --cost=2000
#
# Root password
# To create an encrypted root passwd run this script on the command line
# and paste the result exactly. Don't delete anything else!
# Replace PASSWORDHERE with your password.
# Replace SALTHERE with your salt (pick a random string of characters; like this: _^Rb0657G)*&^T).
#
# perl -e 'print crypt("PASSWORDHERE", "$6$SALTHERE$") . "\n"'
#
# The output: $6$SALTHERE$SlwDifdi5O/taqyDPbuF6gtyPxx3f7H9awNkMe4N/1TLgxxeUtXyIdhi3cp.T/a8HLH2C4IXaXvkLE0ecJxD.0
rootpw --iscrypted $6$SALTHERE$SlwDifdi5O/taqyDPbuF6gtyPxx3f7H9awNkMe4N/1TLgxxeUtXyIdhi3cp.T/a8HLH2C4IXaXvkLE0ecJxD.0
#
# System authorization information
auth --useshadow --passalgo=sha512
#
# Use text mode install
text
#
# System keyboard
keyboard us
# System language
lang en_US
#
# SELinux configuration
selinux --enforcing
#
# Do not configure the X Window System
skipx
#
# Installation logging level
logging --level=info
#
# Reboot after installation
reboot
#
# System timezone
timezone --isUtc America/Chicago
#
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
#
# System bootloader configuration
# To generate a md5 password for grub, run the grub-md5-crypt utility.
# The utility will output what you need to pass. For the uber-curious
# or those who just cut-n-paste the password below is 'PickAPassword'.
bootloader --location=mbr --md5pass="$1$E9th71$0ZWwTr5JLzhxO/AupUb5M/"
#
# Clear the Master Boot Record
zerombr
#
# Partition clearing information
clearpart --all --initlabel
#
# Disk partitioning information
# This is the very minimal setup that you need.
part / --asprimary --fstype="ext4" --ondisk=sda --size=10240
part swap --asprimary --fstype="swap" --ondisk=sda --size=4096
part /localscratch --asprimary --fstype="ext4" --grow --ondisk=sda --size=1
# This is a more advanced version for those with need of many paritions.
# LVM info coming soon.
#
# Installing a bare minimum system along with a few useful tools in case a pxeboot goes wonky.
%packages --nobase
openssh-clients
wget
acpid
dbus
nfs-utils
epel-release
%end
#
# After the installation is complete, there is some clean up we want to run
# as well as some configuration updates through puppet.
%post --interpreter=/bin/bash
rm /etc/yum.repos.d/sl.repo
rm /etc/yum.repos.d/sl6x.repo
rm /etc/yum.repos.d/sl-other.repo
rm /etc/yum.repos.d/epel.repo
wget http://http.cluster.domain/repo_files/sl.repo -O /etc/yum.repos.d/sl.repo
wget http://http.cluster.domain/repo_files/sl-other.repo -O /etc/yum.repos.d/sl-other.repo
wget http://http.cluster.domain/repo_files/epel.repo -O /etc/yum.repos.d/epel.repo
yum install -y --nogpgcheck http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm
yum install -y puppet
puppet agent -t --waitforcert 60
chkconfig puppet on
%end
Now that a kickstart file has been generated, add it to the webserver.
`[http.cluster.domain] $ sudo vi /var/www/html/ks/sl64_node.cfg