[Puppet-dev] RFC: Move nodes out of puppet
Luke Kanies
luke at madstop.com
Wed Feb 7 16:27:31 CST 2007
So, I've been thinking about small tools, and thinking about the fact
that deciding which classes a node belongs in requires significantly
different functionality than defining those classes, and I'm thinking
that these two functions should be split. The language is already
almost entirely focused on defining what classes are, so we'd just
need to create a separate tool for defining the hostname to class
relationships.
I'm thinking this could be the first step towards building a stack of
tools on the server that result in the correct configuration; right
now the server is pretty much monolithic, which we can all probably
agree is usually a bad design.
One of the most immediate benefits of pushing the mapping into a
separate tool is that anyone else could use this information, and
puppetrun would be the first thing lined up at the door. Right now,
when you use puppetrun, you can either use an LDAP backend to store
all of your node/class mappings, or you can specify exactly which
hosts to contact. Puppetrun doesn't have the ability to extract the
mapping information out of the configuration.
On that note, the mapping tool would need to cache at least the
results, and possibly the inputs (it clearly would need the client
facts to do its job), because we can't go recompiling the outputs
every time someone asks about class membership.
Now that I think about it, it actually seems like we should have a
client fact tool that accepts the fact hash and stores it in some
way. Those facts would then be accessible to both the node mapping
tool and the puppet compiler, and whoever else was interested. The
puppet compiler shouldn't need to care how it gets its facts, it just
needs them, and we can just as easily feed the facts into the fact
tool and then pull them from there into the compiler. Yeah, it's a
bit of extra work, but writing decoupled tools is always more work.
The only real downside (other than a slight decrease in efficiency)
is that it might make bootstrapping a bit more complicated if done
poorly. Right now you can take a complete configuration on your
puppetmaster and apply it with 'puppet --use-nodes site.pp'; I'd want
to be sure that we kept that ability, but that shouldn't be all that
difficult.
Comments? Enthusiasm?
--
2. If 2 + 2 is 4 and 2 x 2 is also 4, what's the big deal
about multiplication anyway?
-- from the Dogbert's New Ruling Class quiz
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
More information about the Puppet-dev
mailing list