Zachary Loeber

The personal website of Zachary Loeber.

CentOS/Redhat 5.x Kickstart Deployment

Not too long ago I was tasked with deploying a decent number of CentOS 5.3 and Redhat servers to BL490 blades and VMs in our datacenter (part of a massive environment deployment with HP C7000 enclosures, virtual connect, and a lot of patience). I hate manual configuration so I figured now is as good of time as any to get on the kickstart bandwagon. Here is how I did it:

First you want to make your source install disc and kickstart config files available on the network (more on a good kickstart config file a bit later. There are a number of ways to do this and I actually used both windows and linux for different locations on our network. Essentially you need to make a directory browsable read-only web site on a server that your kickstart configuration can reach from the source host.

The windows configuration is easy so I’ll leave that exercise to the reader to figure out…. Ok, the linux part is easy too but requires less bandwidth to explain as I don’t need screenshots 🙂

In linux-land you create another apache site with a configuration like the following. Note that I used /opt/kickstart/ as my configuration file location and my cdrom as the source disc location:

$sudo nano /etc/apache2/sites-available/kickstart
Alias /kickstart "/opt/kickstart/"
Alias /cdrom "/media/cdrom/"
<Directory "/opt/kickstart/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Directory "/media/cdrom/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
$a2ensite kickstart
$/etc/init.d/apache2 restart

If all is well then you have two directories on your server that can be reached over the local network and the files can be browsed.

Next create something like the kickstart file attached to this post for /opt/kickstart/ks-network.txt

Note that the name of the file is arbitrary, it is what will be called when you boot to the inital setup screen on your server and instead of pressing enter to continue with the Linux install you enter in linux ks=http:///kickstart/ks-network.txt

I actually have several kickstart files for different situations. The server you will be installing to must be on a subnet with a dhcp address available or you can comment out the url in the file and uncomment the cdrom line to do the install from the local cdrom if you like.

The included kickstart file is a very slimmed down and unforgiving install that will wipe /dev/sda and do a fresh install. There is very little running on the system after this completes.

ks-network

comments powered by Disqus