Hello joey,
I would like to know your opinion, on the best way to install from scratch a cluster of at least 20 machines all identical, with propellor. I saw the FAI project, but I am wondering if this can be achieved with propellor only. The installation should be done remotly without human intervention except the propellor config and Indeed power on the cluster
Fred
Don't know that I have an answer to this question. I've never done that.
I think it breaks down into several independant questions, although due to lack of experience I could be missing some.
Initial installation
I'm working on getting propellor to be able to generate bootable disk images. http://joeyh.name/blog/entry/then_and_now/ Once that works, it might provide a way to generate images to install machines in a cluster. But, any method for installing the base system and propellor could work too, and there are probably many cluster-specific OS installation tools.
Expressing the cluster in a propellor config file
Propellor's config is a list of hosts, and
defaultMain
looks at the hostname to determine which host it is provisioning. A cluster might have many hosts that are very similar or identical, and you probably want it to be easy to add more.So, you'll probably want a way to generate a Host from a HostName with the desired Properties you want nodes in the cluster to have:
Then you could feed a list of hostnames to defaultMain to finish the config file:
Or, you could even look up the current hostname, and feed defaultMain a Host containing that hostname; so this single propellor configuration could be used on any number of hosts:
Triggering propellor on nodes
When you change your propellor config.hs, you need a way to trigger the nodes to update. Propellor has a couple of different ways to do this; you could just use Propellor.Property.Cron.runPropellor to run it periodically from cron on all the nodes. (With a central git repository holding the propellor configuration, naturally.)
Or you could run propellor --spin against all the hosts in the cluster to push out a change. (It would be a nice enhancement to make propellor be able to --spin multiple hosts concurrently; there's nothing really preventing it but the output would be a mess.)
There's certianly room for improvement here. Also you'll probably want some monitoring, which propellor doesn't provide in itself, etc.