Hi all, One of the major new features in the upcoming release is that Puppet now uses a graph library internally to handle resource relationships. The big benefit to all of you is that you can use this library to turn these graphs into images. The trick, right now, is adding --graph when you run puppetd. This creates .dot files, which can then be interpreted by the ''dot'' command (which, I believe, is part of ImageMagick) or by OmniGraffle (which, I believe, is Mac-only). I expect apps like Visio could also understand these. The graphs are created in $vardir/graphs. Three graphs are created: One for the configuration as sent by the server, one for all of the relationships as specified in the configuration, and an exploded relationship graph that shows the direct relationships (as opposed to relationships between containers). If you have a chance, please experiment with this a bit. I''ll be (hopefully!) releasing 0.22 tomorrow, and it will have this feature included. So, get your bug reports and feature requests in now (although at this point feature requests better include patches). -- Like frozen sentries of the serengeti, the century-old termite mounds had withstood all tests of time and foe - all tests, that is, except the one involving drunken aardvarks and a stolen wrecking ball." -- Gary Larson --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
I was wrong about a couple of things in my email. First, the graph dir is in $statedir, not $vardir, and second, ''dot'' is a part of graphviz, not ImageMagick. This command will create a graph of your configuration, as an example using dot: dot -Tpng /var/puppet/state/graphs/resources.dot -o /tmp/ configuration.png I highly recommend OmniGraffle, though; its graphs are far more readable. At some point, I might even have the whole parse tree in this kind of graph, so that the parse tree itself would be graphable. Wouldn''t that be nifty? :) -- Progress isn''t made by early risers. It''s made by lazy men trying to find easier ways to do something. --Robert Heinlein --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Jan 4, 2007, at 2:43 PM, Luke Kanies wrote:> I was wrong about a couple of things in my email. First, the graph > dir is in $statedir, not $vardir, and second, ''dot'' is a part of > graphviz, not ImageMagick. This command will create a graph of your > configuration, as an example using dot: > > dot -Tpng /var/puppet/state/graphs/resources.dot -o /tmp/ > configuration.png > > I highly recommend OmniGraffle, though; its graphs are far more > readable.Yeah, great app.> > At some point, I might even have the whole parse tree in this kind of > graph, so that the parse tree itself would be graphable. Wouldn''t > that be nifty? :)I''m definitely planning to have PuppetShow parse and display these graphs as well. -Blake
On Thu, 2007-01-04 at 16:21 -0600, Luke Kanies wrote:> One of the major new features in the upcoming release is that Puppet > now uses a graph library internally to handle resource > relationships. The big benefit to all of you is that you can use > this library to turn these graphs into images.Awesome !> The trick, right now, is adding --graph when you run puppetd. This > creates .dot files, which can then be interpreted by the ''dot'' > command (which, I believe, is part of ImageMagick)On RH-based distros, dot is in graphviz. David
I may be doing something wrong, but trying "puppetd --graph" gives me nothing in the mentioned directory. It exists (/var/puppet/state/graphs), but it remains empty. Thijs On 05/01/07, Blake Barnett <shadoi@nanovoid.com> wrote:> On Jan 4, 2007, at 2:43 PM, Luke Kanies wrote: > > > I was wrong about a couple of things in my email. First, the graph > > dir is in $statedir, not $vardir, and second, ''dot'' is a part of > > graphviz, not ImageMagick. This command will create a graph of your > > configuration, as an example using dot: > > > > dot -Tpng /var/puppet/state/graphs/resources.dot -o /tmp/ > > configuration.png > > > > I highly recommend OmniGraffle, though; its graphs are far more > > readable. > > Yeah, great app. > > > > > At some point, I might even have the whole parse tree in this kind of > > graph, so that the parse tree itself would be graphable. Wouldn''t > > that be nifty? :) > > I''m definitely planning to have PuppetShow parse and display these > graphs as well. > > -Blake > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >
On Jan 5, 2007, at 4:33 AM, Thijs Oppermann wrote:> I may be doing something wrong, but trying "puppetd --graph" gives me > nothing in the mentioned directory. It exists > (/var/puppet/state/graphs), but it remains empty.Hmm. You''re running out of SVN with your RUBYLIB set to the svn library dir? This support is built into the library and thus doesn''t require any extra executables, so it''d be weird if it didn''t work. You could try running the ''test_graph'' and ''test_created_graphs'' tests for transactions: cd test/other ./transactions.rb -n test_graph -n test_created_graphs If those pass, then everything is theoretically working. -- I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they''ve always worked for me. -- Hunter S. Thompson --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
result: 2 tests, 9 assertions, 0 failures, 0 errors But I am running from latest svn (well, few hours old). Version correctly states 0.20.1 when I run "puppetd --version", and RUBYLIB points to svn libs... Still, no graphs, and no error messages either... Thijs On 05/01/07, Luke Kanies <luke@madstop.com> wrote:> On Jan 5, 2007, at 4:33 AM, Thijs Oppermann wrote: > > > I may be doing something wrong, but trying "puppetd --graph" gives me > > nothing in the mentioned directory. It exists > > (/var/puppet/state/graphs), but it remains empty. > > Hmm. You''re running out of SVN with your RUBYLIB set to the svn > library dir? > > This support is built into the library and thus doesn''t require any > extra executables, so it''d be weird if it didn''t work. You could try > running the ''test_graph'' and ''test_created_graphs'' tests for > transactions: > > cd test/other > ./transactions.rb -n test_graph -n test_created_graphs > > If those pass, then everything is theoretically working. > > -- > I hate to advocate drugs, alcohol, violence, or insanity to anyone, > but > they''ve always worked for me. -- Hunter S. > Thompson > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >
result: 2 tests, 9 assertions, 0 failures, 0 errors But I am running from latest svn (well, few hours old). Version correctly states 0.20.1 when I run "puppetd --version", and RUBYLIB points to svn libs... Still, no graphs, and no error messages either... Thijs On 05/01/07, Luke Kanies <luke@madstop.com> wrote:> On Jan 5, 2007, at 4:33 AM, Thijs Oppermann wrote: > > > I may be doing something wrong, but trying "puppetd --graph" gives me > > nothing in the mentioned directory. It exists > > (/var/puppet/state/graphs), but it remains empty. > > Hmm. You''re running out of SVN with your RUBYLIB set to the svn > library dir? > > This support is built into the library and thus doesn''t require any > extra executables, so it''d be weird if it didn''t work. You could try > running the ''test_graph'' and ''test_created_graphs'' tests for > transactions: > > cd test/other > ./transactions.rb -n test_graph -n test_created_graphs > > If those pass, then everything is theoretically working. > > -- > I hate to advocate drugs, alcohol, violence, or insanity to anyone, > but > they''ve always worked for me. -- Hunter S. > Thompson > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >
On Jan 5, 2007, at 9:48 AM, Thijs Oppermann wrote:> result: > 2 tests, 9 assertions, 0 failures, 0 errors > > But I am running from latest svn (well, few hours old). Version > correctly states 0.20.1 when I run "puppetd --version", and RUBYLIB > points to svn libs... > > Still, no graphs, and no error messages either...That''s, um, odd. Could you do an svn update and then run the config again with a manual graphdir setting (the update''s important -- I just discovered a bug related to setting the graphdir)? I can''t imagine that would make a difference, but then, I can''t imagine why you''re not getting your dot files, so... I don''t suppose you get any useful output when running with --debug and --trace enabled? I''ve thrown up graphs from my attempts at reproducing your stack problems: http://luke.madstop.com/everything_graphs/ It''s a much-simplified version of your configuration, since I took out all of the packages and such, and the graphs are a bit difficult to read at first because the relationships aren''t always necessarily clear -- for instance, a definition like ''remotefile'' doesn''t have an explicit relationship with its contained objects in the normal ''relationships'' graph. You have to look in the expanded_relationships graph to see those. -- The hypothalamus is one of the most important parts of the brain, involved in many kinds of motivation, among other functions. The hypothalamus controls the "Four F''s": 1. fighting; 2. fleeing; 3. feeding; and 4. mating. -- Psychology professor in neuropsychology intro course --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Okay, my bad. I hadn''t looked at the puppetd.conf for a while and it seems my vardir setting is a bit weird: /var/lib/puppet As the /var/puppet dir also exists and seems to be used for other things, I totally missed the /var/lib/puppet dir. And there of course are my dot files... Thijs On 06/01/07, Luke Kanies <luke@madstop.com> wrote:> On Jan 5, 2007, at 9:48 AM, Thijs Oppermann wrote: > > > result: > > 2 tests, 9 assertions, 0 failures, 0 errors > > > > But I am running from latest svn (well, few hours old). Version > > correctly states 0.20.1 when I run "puppetd --version", and RUBYLIB > > points to svn libs... > > > > Still, no graphs, and no error messages either... > > That''s, um, odd. Could you do an svn update and then run the config > again with a manual graphdir setting (the update''s important -- I > just discovered a bug related to setting the graphdir)? I can''t > imagine that would make a difference, but then, I can''t imagine why > you''re not getting your dot files, so... I don''t suppose you get any > useful output when running with --debug and --trace enabled? > > I''ve thrown up graphs from my attempts at reproducing your stack > problems: > > http://luke.madstop.com/everything_graphs/ > > It''s a much-simplified version of your configuration, since I took > out all of the packages and such, and the graphs are a bit difficult > to read at first because the relationships aren''t always necessarily > clear -- for instance, a definition like ''remotefile'' doesn''t have an > explicit relationship with its contained objects in the normal > ''relationships'' graph. You have to look in the > expanded_relationships graph to see those. > > -- > The hypothalamus is one of the most important parts of the brain, > involved in many kinds of motivation, among other functions. The > hypothalamus controls the "Four F''s": 1. fighting; 2. fleeing; > 3. feeding; and 4. mating. > -- Psychology professor in neuropsychology intro > course > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >
On Sat, 2007-01-06 at 10:02 +0700, Thijs Oppermann wrote:> Okay, my bad. I hadn''t looked at the puppetd.conf for a while and it > seems my vardir setting is a bit weird: /var/lib/puppetNot weird at all, at least not if you are on Fedora (and that''s where the LSB says this should live, anyway ;) David
Reasonably Related Threads
- Aliases not working in a subclass ?
- error "Stack level too deep" on ''exec[ "perl Makefile.PL" ] ?
- How to conditionally run defines?
- Example module for central git repository via http (sort of like a subversion repo) [a bit RFC]
- munin module: manage clients and server''s config