Puppet: System Administration Automated

Trying to simplify node configuration


This is a post from Luke's old blog; it is saved here statically for historical purposes, as of October 2008

I've been working for a while to try to simplify node configuration. The biggest problem right now is that it's difficult to do per-node overrides of cross-class attributes. For instance, the following doesn't work as you'd expect:

class test {
    notify { "got $value for value": }
}

node base {
    $value = base
    include test
}

node me inherits base {
    $value = "node" # node is a keyword, you have to quote it
}

The notify gets base for $value, because the class is evaluated while base is evaluated, which happens before me ever gets evaluated.

The problem here is that node inheritance has completely different semantics than class inheritance, and Puppet's inheritance is all set up based on how classes work.

I just did some toying around to see if I could fix things easily, but I couldn't (I wanted to see if making the node scope the top scope would make it work, but the above problem still occurs). The only real way to fix it is to make inheritance work completely differently from classes, which isn't a good idea in the current system.

Thus, it definitely makes sense to move forward with kinial, but in the meantime, I think I've figured enough of the problem out that I think I can make existing external node support work better. In particular, the external node tools need to be able to set node parameters, and they need access to the node facts. So, I'm thinking that I'll set all of the Facts in the environment, and then support setting node attributes in the return of the tool (probably through YAML). This shouldn't be much work at all, and it will allow me to start work on the tool without worrying about integrating it with Puppet at first, and only do the integration, once I've really got a tool.

add to del.icio.us Add to Blinkslist add to furl Digg it add to ma.gnolia Stumble It! add to simpy seed the vine TailRank post to facebook

Thu, 24 May 2007 | Tags: , , ,