Archive for November 27th, 2010

Provisioning & management

When I first found Kickstart, I had great joy in customizing my install files. I now have a set of PHP scripts that will create a customized Kickstart file for any install based on parameters passed in the URL. Now, looking into management of VMs (in terms of software), I’ve found that there are actually a number of systems that help with the install, and extend all the way into management of the individual VMs.

Cobbler –

Works with koan to provision VMs and customise the install.

Func –

Like puppet, but seems to be able to send individual commands to machines instead of depending on modules (and also has modules)

Puppet –

Extensive modules. Might end up going with Func just because func looks simpler.

Foreman –

WebUI for Puppet. I saw the demo version of this at a Linux User Group (Singapore) meeting in April, it’s improved a lot since then.

Spacewalk –

Redhat’s opensource version of Satellite, their own provisioning system.

At this point, Cobbler + Func seems to be the easiest for me to use, so I’m looking forward to trying them.

No Comments

Mirroring Fedora 14 repos

Since I’m a Fedora/RH guy, I’ve been using Fedora 13 for most of my VMs. (The main exception is OpenIndiana, which I have for the ZFS support – It’s sharing my crucial stuff over the network.)

Since Fedora 14’s been released, I’m going to move to that to play around with my VM infrastructure. But, one thing that I’ve been neglecting is the fact that so far I’ve been downloading all the packages from a Fedora mirror. So, today I got around to fixing it, thanks to Google, a nice blog post, and some stack overflow help.

So, code first, followed by explanations.

# This script will create a local Fedora 14 mirror via Rsync using the riken mirror. If you're in Asia, this is one of the better mirrors, since it's got 10Gbps of bandwidth.

rsync="rsync -avvrt --progress"

for ver in $verlist
if [ ! -d "$local/$ver/" ];
then mkdir "$local/$ver/"
for arch in $archlist
if [ ! -d "$local/$ver/$arch/" ];
then mkdir "$local/$ver/$arch/"
for base in $baselist
if [ ! -d "$local/$ver/$arch/$base/" ];
then mkdir "$local/$ver/$arch/$base/"
$rsync $remote $local/$ver/$arch/$base/

Unfortunately, WordPress is massacring my nicely indented code. Anyway, it’s based off this code, with a dosage of good old bash trickery to automagically create the directories. Now you can completely skip the directory creation step, the script will take care of that automatically. What is nice is that when Fedora 15 comes out, I just have to add ’15’ in the verlist, and run it again.

(As a side note, this suggests that bash can use the double bracket ([[]]) instead of a single bracket ([]) for a faster comparison. But I never got it to work – I’d get an error before the script moved on automatically.)

No Comments