About Archive Tags RSS Feed


See if you can spot this one?

25 May 2006 21:50

Xen-tools now correctly installs CentOS4 installations, complete with OpenSSH access.

I've not fiddled around with rpmstrap enough to cache intelligently, but otherwise it works. (What this means is that each new installation re-fetches each .rpm package from the network, rather than caching them locally.)

This new work does bring my "design decision" into focus though. Originally xen-create-image was a simple system which did two things:

  1. Install a clean version of sid/sarge/etch using debootstrap.
  2. Run a series of shell scripts aftwarwards to customize the new environment install networking, and install openssh. The "hook scripts".

Hooks were implemented as a directory of shell scripts run in order, much like you'd expect from run-parts.

Simple? Neat? Yes. And no.

Because each script was based around the idea of tweaking Debian they had a lot of Debian-specific knowlege in them, and so they didn't do the right thing for CentOS4.

There are two (or more!) solutions to this problem:

  1. Have per-distribution hooks: hook.d/debian, hook.d/centos4, etc.
  2. Have each script decide which environment it has and do the right thing.

The first has the advantage that it is simple to understand and adding additional distributions becomes simpler to approach.

The second avoids proliferation, and seems neater to me. Anyway the decision is made for the moment to use this approach. I could be swayed the other direction when it comes to time to setup SuSE, Mandriva, etc. However in all honesty I don't actually expect to do that work myself. If you need those distros you can help, capishe?

Now to backport rpmstrap to Sarge, and make a new releaseā€¦

| No comments