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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
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.garstang@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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Fri, Oct 8, 2010 at 12:27 PM, Ryan Y. Coleman <dudeinpa@gmail.com> wrote:> 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 > >Thanks Ryan. I must be missing something pretty fundamental, because when I do: class { "yum::client": stage => repo } puppet complains: Duplicate definition: Class[Yum::Client] is already defined; cannot redefine which, really isn''t a surprise, because yum::client _IS_ already defined! Doug. ----- Original Message -----> > From: "Douglas Garstang" <doug.garstang@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-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@gmail.com Cell: +1-805-340-5627 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
----- Original Message -----> From: "Douglas Garstang" <doug.garstang@gmail.com> > To: puppet-users@googlegroups.com > Sent: Friday, October 8, 2010 3:35:52 PM > Subject: Re: [Puppet Users] Run Stages > > Thanks Ryan. I must be missing something pretty fundamental, because > when I do: > > > class { "yum::client": stage => repo }Are you setting this within your node definition? Like: node "foo.example.com" { include class-that-includes-stages class { "yum::client": stage => repo } }> > > puppet complains: > Duplicate definition: Class[Yum::Client] is already defined; cannot > redefine > > > which, really isn''t a surprise, because yum::client _IS_ already > defined! > > > Doug. > > > > > > > > ----- Original Message ----- > > From: "Douglas Garstang" < doug.garstang@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-users@googlegroups.com . > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@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-users@googlegroups.com . > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en . > > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 > > > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Fri, Oct 8, 2010 at 12:44 PM, Ryan Y. Coleman <dudeinpa@gmail.com> wrote:> > > ----- Original Message ----- > > From: "Douglas Garstang" <doug.garstang@gmail.com> > > To: puppet-users@googlegroups.com > > Sent: Friday, October 8, 2010 3:35:52 PM > > Subject: Re: [Puppet Users] Run Stages > > > > Thanks Ryan. I must be missing something pretty fundamental, because > > when I do: > > > > > > class { "yum::client": stage => repo } > > Are you setting this within your node definition? > > Like: > > node "foo.example.com" { > include class-that-includes-stages > class { "yum::client": stage => repo } > } > >Ryan, Got it working, thanks. However, something else is wrong. I have this: class runstages::common { stage { yum: before => Stage[main] } } class { "yum::common": stage => yum } and puppet just tried to install RPM''s right off the bat, before the yum::common class was implemented. It would seem that run stages are not working at all. 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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> ----- Original Message ----- > > From: "Douglas Garstang" < doug.garstang@gmail.com > > > > To: puppet-users@googlegroups.com > > Sent: Friday, October 8, 2010 3:35:52 PM > > Subject: Re: [Puppet Users] Run Stages > > > > Thanks Ryan. I must be missing something pretty fundamental, because > > when I do: > > > > > > class { "yum::client": stage => repo } > > Are you setting this within your node definition? > > Like: > > node " foo.example.com " { > include class-that-includes-stages > > > > class { "yum::client": stage => repo } > } > > > > > Ryan, > > > Got it working, thanks. > > > However, something else is wrong. I have this: > > > class runstages::common { > stage { yum: before => Stage[main] } > } > > > class { "yum::common": stage => yum } > > > and puppet just tried to install RPM''s right off the bat, before the > yum::common class was implemented. It would seem that run stages are > not working at all.It''s hard for me to help you when I don''t see the full picture of what you''re trying to implement. Take a look at my example again. I would suggest you create a dummy class that contains the stage resources you''d like for the node you''d like to be configured. Then, in your node definition, include the dummy class and then the class {} definitions that assign other clases to your stages. If that doesn''t work, please let us know what your node definition looks like as well as the dummy class containing you stage resources. I hope I''m not making this more confusing.. --Ryan> > > 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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
In case this helps: ( this is the only way I use stages, its probably possible to extend on this using normal manifests and include them, instead of using site.pp) *site.pp* import "nodes" stage {pre: before=>Stage["main"]} *nodes.pp* node "foo.com"{ class {aptupdate: stage=>pre} include webserver } *aptupdate/init.pp* class aptupdate { exec {"apt update": path => "/usr/bin:/usr/sbin:/bin:/sbin", command => "apt-get update", } } On Sat, Oct 9, 2010 at 3:40 AM, Ryan Y. Coleman <dudeinpa@gmail.com> wrote:> > > ----- Original Message ----- > > > From: "Douglas Garstang" < doug.garstang@gmail.com > > > > > > To: puppet-users@googlegroups.com > > > Sent: Friday, October 8, 2010 3:35:52 PM > > > Subject: Re: [Puppet Users] Run Stages > > > > > > Thanks Ryan. I must be missing something pretty fundamental, because > > > when I do: > > > > > > > > > class { "yum::client": stage => repo } > > > > Are you setting this within your node definition? > > > > Like: > > > > node " foo.example.com " { > > include class-that-includes-stages > > > > > > > > class { "yum::client": stage => repo } > > } > > > > > > > > > > Ryan, > > > > > > Got it working, thanks. > > > > > > However, something else is wrong. I have this: > > > > > > class runstages::common { > > stage { yum: before => Stage[main] } > > } > > > > > > class { "yum::common": stage => yum } > > > > > > and puppet just tried to install RPM''s right off the bat, before the > > yum::common class was implemented. It would seem that run stages are > > not working at all. > > It''s hard for me to help you when I don''t see the full picture of what > you''re trying to implement. > > Take a look at my example again. I would suggest you create a dummy class > that contains the stage resources you''d like for the node you''d like to be > configured. > > Then, in your node definition, include the dummy class and then the class > {} definitions that assign other clases to your stages. > > If that doesn''t work, please let us know what your node definition looks > like as well as the dummy class containing you stage resources. > > I hope I''m not making this more confusing.. > > --Ryan > > > > > > > > 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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.