Hi all,
I'm doing this as an email rather than a blog post because it's very
half-baked and I'm not quite willing to stand behind it and make
promises. Still, it's useful and interesting, so I figure I should
spread the knowledge.
Some of you probably already know we've added a couple of new settings
to Puppet for 0.25.5 (and rowlf), one of which is 'catalog_terminus'.
Like 'node_terminus', this gives you some flexibility for creating new
places to store catalogs and lets you configure the master to do so.
I've got a proof of concept up that does a couple of interesting things:
http://github.com/lak/puppet/tree/features/0.25.x/degenerate_catalog_service
Basically, it caches the catalogs on the server in json, and then
provides a simple interface for RESTful clients to retrieve a dot-
formatted catalog.
It's a kind of mixture of two goals:
1) I want to build a memcached catalog terminus to store catalogs in.
This would allow the client-facing master to just serve files somewhat
plainly -- that is, it would just return catalogs from memcached, not
compile them -- and you'd have other compiler processes on the side
compiling catalogs and sticking them in memcached. (At least, that's
my idea - it could be done lots of ways.)f
2) I wanted to make it easy to get the dot output of a catalog. I
want this so we can visualize the catalogs in the dashboard.
So, the proof of concept does exactly this.
Start the master like this:
sbin/puppetmasterd --confdir /tmp/foo --vardir /tmp/foo --debug --
manifest ~/bin/test.pp --certname localhost --no-daemonize --
catalog_terminus=service_faker
Then run through the puppetd/puppetca stuff as necessary for certs,
with a certname of 'testing', (although you can probably skip this),
and then run puppet-test like this:
sudo ext/puppet-test --suite rest_stuff_for_dot --test dotconfig --
server localhost --confdir /tmp/bar --vardir /tmp/bar --certname
testing testing
You'll notice two things - first, the catalog is printed in dot format
on stdout. This can just about be piped directly to graphviz or
OmniGraffle. Second, the server caches the catalog in $vardir/
catalogs/$name.json.
Again, this is just a proof of concept, showing what kind of
flexibility the addition of this one parameter provides. Hopefully
Michael DeHaan will be doing a more realistic example using memcached
in the near future.
--
The most incomprehensible thing about the world is that it is at all
comprehensible. --Albert Einstein
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.