Yushu Yao
2011-May-06 20:59 UTC
[Puppet Users] Generate "Compiled catalog"/yaml for a node?
Hi Experts, I remember we had this discussion before, but could find it. Can I run a command to generate a "Compiled catalog" for a specific node (on the master node)? And apply this on the client node? What are the limitations for doing this? Basically we have special handling for the webserver/CA part of puppet. Thank you very much! -Yushu +-------------------------------------------------+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | Mailstop 50B-6222 | 1 Cyclotron Road | Berkeley CA 94720-8147 - USA +-------------------------------------------------+ -- 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.
Nan Liu
2011-May-06 21:12 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
On Fri, May 6, 2011 at 8:59 PM, Yushu Yao <yao.yushu@gmail.com> wrote:> Hi Experts, > > I remember we had this discussion before, but could find it. > > Can I run a command to generate a "Compiled catalog" for a specific node (on > the master node)? And apply this on the client node? What are the > limitations for doing this?Compiling the catalog is straightfoward. The tricky issues are syncing facts, and uploading facts from agent to master, and you need to have means to distribute files out of band to the agent without it requesting via https from the master. (local mount nfs, rsync to local, probably some other creative ways I haven''t thought of.) Past threads: https://groups.google.com/group/puppet-users/browse_thread/thread/871d3e6f7dde759e/b63bdb45eaa71db6?lnk=gst&q=catalog+dmz#b63bdb45eaa71db6 Thanks, Nan -- 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.
Patrick
2011-May-06 21:22 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
On May 6, 2011, at 1:59 PM, Yushu Yao wrote:> Hi Experts, > > I remember we had this discussion before, but could find it. > > Can I run a command to generate a "Compiled catalog" for a specific node (on the master node)? And apply this on the client node? What are the limitations for doing this? > > Basically we have special handling for the webserver/CA part of puppet. > > Thank you very much! > > -Yushu1) You can generate the catalog using "puppet master --verbose --compile computer.name.domain_name" 2) Anything that uses "puppet:///whatever" won''t work, unless the client can connect to the master. -- 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.
Yushu Yao
2011-May-06 21:43 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
Thanks.> 1) You can generate the catalog using "puppet master --verbose --compile > computer.name.domain_name" > 2) Anything that uses "puppet:///whatever" won''t work, unless the client > can connect to the master. >Does this mean the file templates will not work as well? Thanks.> > -- > 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.
Daniel Pittman
2011-May-06 21:48 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
On Fri, May 6, 2011 at 14:43, Yushu Yao <yyao@lbl.gov> wrote:>> 1) You can generate the catalog using "puppet master --verbose --compile >> computer.name.domain_name" >> 2) Anything that uses "puppet:///whatever" won''t work, unless the client >> can connect to the master. > > Does this mean the file templates will not work as well?They work fine; so does file ''content''; just ''source'' doesn''t work without communication to the master. You might also want to look at moonshine and shadow puppet, both built atop Puppet: https://github.com/railsmachine/moonshine/wiki/shadow-puppet-overview-and-examples Regards, Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <daniel@puppetlabs.com> ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 ♲ Made with 100 percent post-consumer electrons -- 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.
Yushu Yao
2011-May-07 05:50 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
Thanks Folks for the answers. Before I go into this direction, I just want to make sure one thing from the developers: Is this a feature that you think will stay inside puppet? (in 3.0, 4.0, etc) Or has there been any discussion to remove this feature? Feel safer if I know this feature will stay long. Thanks -Yushu +-------------------------------------------------+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | 1 Cyclotron Road | Berkeley CA 94720 - USA +-------------------------------------------------+ On Fri, May 6, 2011 at 2:48 PM, Daniel Pittman <daniel@puppetlabs.com>wrote:> On Fri, May 6, 2011 at 14:43, Yushu Yao <yyao@lbl.gov> wrote: > > >> 1) You can generate the catalog using "puppet master --verbose --compile > >> computer.name.domain_name" > >> 2) Anything that uses "puppet:///whatever" won''t work, unless the client > >> can connect to the master. > > > > Does this mean the file templates will not work as well? > > They work fine; so does file ''content''; just ''source'' doesn''t work > without communication to the master. > > You might also want to look at moonshine and shadow puppet, both built > atop Puppet: > https://github.com/railsmachine/moonshine/wiki/shadow-puppet-overview-and-examples > > Regards, > Daniel > -- > ⎋ Puppet Labs Developer – http://puppetlabs.com > ✉ Daniel Pittman <daniel@puppetlabs.com> > ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 > ♲ Made with 100 percent post-consumer electrons > > -- > 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.
Nigel Kersten
2011-May-07 16:00 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
On Sat, May 7, 2011 at 5:50 AM, Yushu Yao <yyao@lbl.gov> wrote:> Thanks Folks for the answers. > > Before I go into this direction, I just want to make sure one thing from > the developers: > > Is this a feature that you think will stay inside puppet? (in 3.0, 4.0, > etc) > > Or has there been any discussion to remove this feature? > > Feel safer if I know this feature will stay long. ThanksYou''re only going to see more flexible control over out of band catalog compilation like this Yushu, not less. We won''t be removing this feature, we''ll be improving it. -- Nigel Kersten Product, Puppet Labs @nigelkersten -- 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.
Yushu Yao
2011-May-23 23:21 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
One Follow up question: how do I apply the compiled catalog on the client? The yaml I get from puppet master --compile is like: cat mytest.yaml { "data": { "edges": [ { "target": "Class[main]", "source": "Stage[main]" .... ... } If I do on the client: puppet apply --test --debug mytest.yaml, I get Could not parse for environment production: Syntax error at ''{''; expected ''}'' at /root/mytest.yaml:1 on node 192.168.2.199 Am I missing anything? Thanks a lot! -Yushu +-------------------------------------------------+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | 1 Cyclotron Road | Berkeley CA 94720 - USA +-------------------------------------------------+ On Sat, May 7, 2011 at 9:00 AM, Nigel Kersten <nigel@puppetlabs.com> wrote:> > > On Sat, May 7, 2011 at 5:50 AM, Yushu Yao <yyao@lbl.gov> wrote: > >> Thanks Folks for the answers. >> >> Before I go into this direction, I just want to make sure one thing from >> the developers: >> >> Is this a feature that you think will stay inside puppet? (in 3.0, 4.0, >> etc) >> >> Or has there been any discussion to remove this feature? >> >> Feel safer if I know this feature will stay long. Thanks > > > > You''re only going to see more flexible control over out of band catalog > compilation like this Yushu, not less. > > We won''t be removing this feature, we''ll be improving it. > > > > -- > Nigel Kersten > Product, Puppet Labs > @nigelkersten > > -- > 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.
Nan Liu
2011-May-23 23:41 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
On Mon, May 23, 2011 at 4:21 PM, Yushu Yao <yyao@lbl.gov> wrote:> One Follow up question: > > how do I apply the compiled catalog on the client? > > The yaml I get from puppet master --compile is like: > cat mytest.yaml > { > "data": { > "edges": [ > { > "target": "Class[main]", > "source": "Stage[main]" > .... ... > } > > If I do on the client: puppet apply --test --debug mytest.yaml, I get > Could not parse for environment production: Syntax error at ''{''; expected > ''}'' at /root/mytest.yaml:1 on node 192.168.2.199Not the most intuitive thing, puppet apply -t -d --apply mytest.yaml. Most likely will get expired catalog, but that can either be updated by changing expire datetime in the catalog, or controlling expiration using --runinterval (it''s overloading the same option for two purpose). HTH, Nan -- 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.
Yushu Yao
2011-May-24 03:08 UTC
Re: [Puppet Users] Generate "Compiled catalog"/yaml for a node?
That works. Thanks a lot@ -yushu +-------------------------------------------------+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | 1 Cyclotron Road | Berkeley CA 94720 - USA +-------------------------------------------------+ On Mon, May 23, 2011 at 4:41 PM, Nan Liu <nan@puppetlabs.com> wrote:> On Mon, May 23, 2011 at 4:21 PM, Yushu Yao <yyao@lbl.gov> wrote: > > One Follow up question: > > > > how do I apply the compiled catalog on the client? > > > > The yaml I get from puppet master --compile is like: > > cat mytest.yaml > > { > > "data": { > > "edges": [ > > { > > "target": "Class[main]", > > "source": "Stage[main]" > > .... ... > > } > > > > If I do on the client: puppet apply --test --debug mytest.yaml, I get > > Could not parse for environment production: Syntax error at ''{''; expected > > ''}'' at /root/mytest.yaml:1 on node 192.168.2.199 > > Not the most intuitive thing, puppet apply -t -d --apply mytest.yaml. > Most likely will get expired catalog, but that can either be updated > by changing expire datetime in the catalog, or controlling expiration > using --runinterval (it''s overloading the same option for two > purpose). > > HTH, > > Nan > > -- > 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.