[noctool-devel] compact configurations for identical machines

Ingvar ingvar at hexapodia.net
Thu Jun 5 17:53:42 UTC 2008


Jim writes:
> > Does this look at least vaguely sane?
> > (cluster ("rtr-~3,'0d" 1 10)
> >   (machine name linux-host
> >      (user "testuser")))
> 
> I've been thinking more about this.  It seems to me that we need something 
> a little more general that what you're proposing.  One example is that I 
> probably want to have an IP range as well.
> 
> I'm thinking syntax like this might work:
> 
> (my-cluster
>  12                          ;; system count
>  ((name (trucha-name-func))  ;; variable elements
>   (ip (trucha-ip-func)))
>  (machine                    ;; machine template
>   name
>   linux-host
>   (user "download")
>   (ip ip)
>   (disks
>    (disk "/dev/hda1" 80 95))))
> 
> where trucha-name-func and trucha-ip-func basically are generators, each 
> time they are called, they produce a new result.
> 
> With this particular cluster, we have an interesting problem.  The IP 
> space is 129.24.244.21 - 129.24.244.30 and 129.24.244.43 - 129.24.244.44.  
> There are a total of 12 IPs, but they are not in a contiguous block. 
> (this is a legacy issue :P )
> 
> I realize that the above syntax still leaves something to be desired.  It 
> is, IMO, too general for what most users need.  I think we could probably 
> make a couple of convienance macros that would expand into the above.
> 
> I'm not sure yet if I like the idea of using "generators" here, or if each 
> function should be given an argument of which machine it is.

Something that MIGHT work is having a "template mechanism" of some sort. The 
cluster config should do what you need, as long as there's DNS (at least I 
think so, the general thought was "use hostname, unless IP is provided").

Another option would be to declare a cluster-host class, with suitable 
defaults for disks and the like, but that MIGHT get hairier.

>From the feedback I've seen, most other systems deal wit htis by having the 
admin generate teh config in full, one way or another (either by clever editor 
tricks or by writing some code to generate config stanzas).

//Ingvar




More information about the Noctool-devel mailing list