[Puppet Users] Documenting an infrastructure with Puppet

2010-11-24 Thread Ryan Y. Coleman
Hello All, 

I've been thinking recently about how one could use Puppet to aid in the 
process of documenting infrastructure for other administrators, managers and so 
forth. 

Puppetdoc gets me somewhat close, since I can add content above my class 
definitions and have that content associated with nodes. It seems to me though 
that Puppetdoc's strength is in creating the relationships between classes and 
nodes, not in the documenting of what occurs to a system. 

Would it seem feasible to anyone if in the future puppetdoc would additionally 
parse resources within a class and create some human-readable documentation 
from them? 

For example, let's suppose I have a class which has a file resource.

# This is the foo-file class that provides a file. 
class foo-file {
   file { '/etc/foo-file': ensure = present, }
}

Puppetdoc will currently (if I understand its capabilities right) associate the 
commented line with the class when producing RDoc, text or whatever output. 

What I'm envisioning is for it to also look at the file resource and output 
something similar to The foo-file class ensures a file named /etc/foo-file is 
present on the system. This could mean that simply by writing Puppet 
manifests, puppetdoc would produce documentation describing exactly what a 
class would implement on your machine. 


Does this seem useful to anyone else but me? If we can get a discussion going 
about this and there's interested, I'd be happy to write-up the feature request 
with our consensus. 

Thanks for reading, --Ryan


 

-- 
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.



Re: [Puppet Users] Run Stages

2010-10-08 Thread Ryan Y. Coleman
I wrote up a blog post the other day of what I'm using at Penn State. Once I'm 
more comfortable with stages, my plan is to help enhance the existing stage 
documentation. They're great! 

Hope this helps.. --Ryan

http://www.personal.psu.edu/ryc108/blogs/puppetmaster/2010/10/automating-shibboleth-idp-builds-using-stages.html

- Original Message -
 From: Douglas Garstang doug.garst...@gmail.com
 To: Puppet Users puppet-users@googlegroups.com
 Sent: Friday, October 8, 2010 3:13:45 PM
 Subject: [Puppet Users] Run Stages
 Has anyone got an example of run stages they could post?
 
 
 As per the release notes at
 http://projects.puppetlabs.com/projects/1/wiki/Release_Notes , the
 description is _really_ unclear, and putting
 
 
 class yum { ... }
 class redhat {
 ...
 class { yum: stage = pre
 }
 
 
 in your code causes puppet to complain:
 
 
 Could not retrieve catalog from remote server: Error 400 on SERVER:
 Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid
 resource type class at ...
 
 
 Doug.
 
 
 
 --
 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.

-- 
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.



Re: [Puppet Users] puppet push mode

2010-10-07 Thread Ryan Y. Coleman


- Original Message -
 From: Felix Frank felix.fr...@alumni.tu-berlin.de
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 7, 2010 3:40:01 AM
 Subject: Re: [Puppet Users] puppet push mode
 On 10/07/2010 04:48 AM, Patrick wrote:

  I'm guessing that it will work if you run it with the -no-deamonize
  option.
 
  You really don't want to use --test. That will have other effects.
 
 Patrick,
 
 could you elaborate on that?

From the 2.6.1 man page:

test:   Enable the most common options used for testing.
These are +onetime+, +verbose+, +ignorecache,
+no-daemonize+, and +no-usecacheonfailure+.


 
 Because --test is what we are using constantly here. I believe it's a
 tip from Pulling strings with puppet.
 
 From what I gathered, it's the standard way to enforce a run while
 puppet is also running in daemon mode, which is quite exactly what
 Mohammed needs.
 
 So what are the catches to be wary of?

I would be wary of ignoring your catalog cache. Deploying this throughout the 
environment would be detrimental to performance. The individual flags are a 
better way to go. 

-- 
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.



Re: [Puppet Users] puppet push mode

2010-10-07 Thread Ryan Y. Coleman


  From the 2.6.1 man page:
 
  test: Enable the most common options used for testing.
  These are +onetime+, +verbose+, +ignorecache,
  +no-daemonize+, and +no-usecacheonfailure+.
 
 
 
  Because --test is what we are using constantly here. I believe it's
  a
  tip from Pulling strings with puppet.
 
  From what I gathered, it's the standard way to enforce a run while
  puppet is also running in daemon mode, which is quite exactly what
  Mohammed needs.
 
  So what are the catches to be wary of?
 
  I would be wary of ignoring your catalog cache. Deploying this
  throughout the environment would be detrimental to performance. The
  individual flags are a better way to go.
 
 
 Ah, misundersting.
 
 It is not used for general management. That is done by a plain old
 daemon process.
 
 When a newly changed manifest needs immediate running (e.g. when
 building a new manifest for a machine or changing something), that is
 when --test is used here.
 In such cases, you don't care about the cache, because when the
 manifest
 cannot be parsed or the catalogue contains errors, you don't want to
 apply the original catalogue. You only care to find the source of the
 errors.
 
 Since you put it that way, I think it will be safe for us to stick
 with
 --test. Even if the implied options will change, it will still be for
 testing, which is essentially what I (and Mohamed, I think) am looking
 for.

Ah, Sorry, I'm with you now. That makes sense and is similar to how I operate. 

FWIW, I'm interested in what you and Mohamed are too. Until we get the trust 
buy-in for Puppet throughout the environment, being able to have regular 
reports come in about what's out of sync and be able to kick off changes from 
the puppet master is ideal. 

--Ryan

 
 Thanks,
 Felix
 

-- 
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.



Re: [Puppet Users] Puppet 2.6.1rc2 does not honor agent's --tags option

2010-09-03 Thread Ryan Y. Coleman


- Original Message -
 From: Jason Koppe jason.robert.ko...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Friday, September 3, 2010 7:12:34 AM
 Subject: Re: [Puppet Users] Puppet 2.6.1rc2 does not honor agent's --tags 
 option
 Are automatic tags working for others in 2.6?

No, but see: http://projects.reductivelabs.com/issues/4631

 
 
 On Wed, Sep 1, 2010 at 6:54 AM, Jason Koppe 
 jason.robert.ko...@gmail.com  wrote:
 
 
 Automatic tags don't work for me but explicit tags do since moving to
 2.6.
 
 
 
 
 
 On Mon, Aug 30, 2010 at 1:47 PM, Todd Zullinger  t...@pobox.com 
 wrote:
 
 
 
 Jean-Baptiste Quenot wrote:
  After upgrading Puppet from 0.24.8 to 2.6.1rc2 at my company, I
  notice that puppet agent's --tags option is not honored anymore:
 
 Did you happen to file a ticket for this yet? I need to test more
 myself, but I believe I saw this the other day too, with rc3.
 
 --
 Todd OpenPGP - KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
 ~~
 Years ago fairy tales all began with Once upon a time..., now we
 know they all begin with, If I am elected...
 -- Carolyn Warner
 
 
 
 
 --
 Jason Koppe
 jason.robert.ko...@gmail.com
 Cell (210) 445-8242
 
 
 
 --
 Jason Koppe
 jason.robert.ko...@gmail.com
 Cell (210) 445-8242
 
 
 --
 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.

-- 
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.



[Puppet Users] Figuring out Stages

2010-07-29 Thread Ryan Y. Coleman
Hello All, I'm hoping to figure out how to use stages to reduce how many 
require statements are used in a particular module. 

I'm using the brief examples in the documentation as a reference but I can't 
grep how to implement the staging. 
http://docs.puppetlabs.com/references/2.6.0/metaparameter.html#stage

Let's say I have three classes that I've separated my content into...

class foo::pre {}
class foo::deploy {}
class foo::configure {}

I would like to stage them such that pre occurs first, followed by deploy, 
finished by configure. 


The documentation suggests you create new stages as resources. Does this mean 
that in each class I create the stage resource like this example?

class foo::pre {
stage {pre: }
}
class foo::deploy {
stage {deploy: }
}
class foo::configure {
stage {configure: }
}


The documentation also suggests you use class parameters to specify your stage. 
It gives the example of class { foo: stage = pre}. Does this mean you must 
create the stages in a different class then you use to specify the stage? 

I got to this point and confused myself so I'm hoping one of you can clear me 
up. Thanks!

--Ryan

-- 
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.



Re: [Puppet Users] Installing a module FIRST

2010-07-21 Thread Ryan Y. Coleman
I spent a few minutes playing with stages as well and they seem like a great 
solution to certain problems. Will there be more documentation made available 
about how to use stages after final release? All I'm familiar with is what's in 
the changelog. 

--Ryan

- Original Message -
 From: Douglas Garstang doug.garst...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Wednesday, July 21, 2010 7:47:46 PM
 Subject: Re: [Puppet Users] Installing a module FIRST
 On Wed, Jul 21, 2010 at 4:32 PM, Avi Miller avi.mil...@gmail.com
 wrote:
  Hey Douglas
 
  Douglas Garstang wrote:
 
  How can I guarantee that all components of the LDAP client module
  get
  installed before ANY components of any other module?
 
  Take a look at the new Run Stages[1] functionality in Puppet 2.6.
  Run stages
  would allow you to specify that the LDAP class has to run first
  before any
  other module is actioned.
 
 So... the release notes have an example:
 
 class yum { ... }
 class redhat {
 ...
 class { yum: stage = pre }
 }
 
 followed by the statement:
 Note that we’re using the new parameterized classes here – this is
 necessary because of the class-level limitations of Run Stages. These
 limitations are present because of the complication of trying to
 untangle resource dependencies across stage boundaries if we allowed
 arbitrary resources to specify stages.
 
 Any idea what that means?
 
 Doug.
 
 
 
 
 --
 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.

-- 
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.