Douglas Garstang
2011-Feb-28 20:07 UTC
[Puppet Users] Where to put External Nodes in Multiple Environments?
All, For those that are using external nodes (as local files) and multiple environments, where do you put the external node files? Ie, do you put them down in the environment itself /etc/puppet/env/env1/manifests/extdata/nodes /etc/puppet/env/env.../manifests/extdata/nodes /etc/puppet/env/envN/manifests/extdata/nodes OR, up above the environments? /etc/puppet/manifests/extdata/nodes Which makes more sense? Btw, I don''t think we''re using environments in quite the way they were intended. We''re using environments to cater for the old legacy configuration, and the new configuration, rather than dev, qa, stage and prod. 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.
Alan Barrett
2011-Feb-28 20:44 UTC
Re: [Puppet Users] Where to put External Nodes in Multiple Environments?
On Mon, 28 Feb 2011, Douglas Garstang wrote:> For those that are using external nodes (as local files) and > multiple environments, where do you put the external node files?How is it possible to use external nodes as local files? I was under the impression that node_terminus=exec or node_terminus=ldap were the only ways of using external nodes.> Ie, do you put them down in the environment itself > /etc/puppet/env/env1/manifests/extdata/nodes > /etc/puppet/env/env.../manifests/extdata/nodes > /etc/puppet/env/envN/manifests/extdata/nodes > > OR, up above the environments? > /etc/puppet/manifests/extdata/nodesI don''t do this, obviously, because I didn''t know it was possible. However, I''d probably be inclined to store the data in an environment-specific directory. --apb (Alan Barrett) -- 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.
Douglas Garstang
2011-Feb-28 21:01 UTC
Re: [Puppet Users] Where to put External Nodes in Multiple Environments?
On Mon, Feb 28, 2011 at 12:44 PM, Alan Barrett <apb@cequrux.com> wrote:> On Mon, 28 Feb 2011, Douglas Garstang wrote: > >> For those that are using external nodes (as local files) and multiple >> environments, where do you put the external node files? >> > > How is it possible to use external nodes as local files? I was under the > impression that node_terminus=exec or node_terminus=ldap were the only ways > of using external nodes. > >Really? That might be because everyone seems to be on the LDAP external node bandwagon. You can put a "external_nodes = <script>" in your puppet.conf file, where <script> is a script that does whatever it needs to read the local files and dump the output in YAML format. We use files because they can be revision controlled, which is really important for us.> Ie, do you put them down in the environment itself >> /etc/puppet/env/env1/manifests/extdata/nodes >> /etc/puppet/env/env.../manifests/extdata/nodes >> /etc/puppet/env/envN/manifests/extdata/nodes >> >> OR, up above the environments? >> /etc/puppet/manifests/extdata/nodes >> > > I don''t do this, obviously, because I didn''t know it was possible. > However, I''d probably be inclined to store the data in an > environment-specific directory. >Yeah, but then you have the problem of not knowing what environment the node is in, and you have to go digging around for it. The more environments you have, the more places you have to dig. 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.
Alan Barrett
2011-Feb-28 21:17 UTC
Re: [Puppet Users] Where to put External Nodes in Multiple Environments?
On Mon, 28 Feb 2011, Douglas Garstang wrote:>> How is it possible to use external nodes as local files? I was >> under the impression that node_terminus=exec or node_terminus=ldap >> were the only ways of using external nodes. > > Really? That might be because everyone seems to be on the LDAP > external node bandwagon. You can put a "external_nodes = <script>" > in your puppet.conf file, where <script> is a script that does > whatever it needs to read the local files and dump the output in > YAML format.Oh, so you are using an external node classifier script in the usual way, with node_terminus = exec; you are just using unusual terminology to describe it. Puppet knows nothing about "external nodes as local files"; all it knows is that you have an external node classifier script. The question about where to put the data files used by your script still stands, of course, and I would still probably put them under an environment-specific directory.> Yeah, but then you have the problem of not knowing what environment > the node is in, and you have to go digging around for it. The more > environments you have, the more places you have to dig.I have an external node classifier script whose sole task is to go digging in multiple environment-specific directories to figure out which environment a client node belongs to. --apb (Alan Barrett) -- 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.
Douglas Garstang
2011-Mar-01 00:43 UTC
Re: [Puppet Users] Where to put External Nodes in Multiple Environments?
On Mon, Feb 28, 2011 at 1:17 PM, Alan Barrett <apb@cequrux.com> wrote:> On Mon, 28 Feb 2011, Douglas Garstang wrote: > >> How is it possible to use external nodes as local files? I was under the >>> impression that node_terminus=exec or node_terminus=ldap were the only ways >>> of using external nodes. >>> >> >> Really? That might be because everyone seems to be on the LDAP external >> node bandwagon. You can put a "external_nodes = <script>" in your >> puppet.conf file, where <script> is a script that does whatever it needs to >> read the local files and dump the output in YAML format. >> > > Oh, so you are using an external node classifier script in the usual way, > with node_terminus = exec; you are just using unusual terminology to > describe it. Puppet knows nothing about "external nodes as local files"; > all it knows is that you have an external node classifier script. > >I felt I had to explicitly say I was using files, since it was relevant to the understanding of my problem, and I seem to be about the only person who uses files, as I need to revision control them.> The question about where to put the data files used by your script still > stands, of course, and I would still probably put them under an > environment-specific directory. > > > Yeah, but then you have the problem of not knowing what environment the >> node is in, and you have to go digging around for it. The more environments >> you have, the more places you have to dig. >> > > I have an external node classifier script whose sole task is to go digging > in multiple environment-specific directories to figure out which environment > a client node belongs to.Yes, but I, as a human, have to do digging through the directories too, to find where to edit the file. I guess I could write a script that does the searching and returns the full path to the file. That would save some time. 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.
Brian Gallew
2011-Mar-01 03:34 UTC
Re: [Puppet Users] Where to put External Nodes in Multiple Environments?
Doug, there''s a command-line tool called "ack" which is an enhanced grep replacement. It will probably do what you wat with finding your nodes. On Mon, Feb 28, 2011 at 4:43 PM, Douglas Garstang <doug.garstang@gmail.com>wrote:> > > On Mon, Feb 28, 2011 at 1:17 PM, Alan Barrett <apb@cequrux.com> wrote: > >> On Mon, 28 Feb 2011, Douglas Garstang wrote: >> >>> How is it possible to use external nodes as local files? I was under the >>>> impression that node_terminus=exec or node_terminus=ldap were the only ways >>>> of using external nodes. >>>> >>> >>> Really? That might be because everyone seems to be on the LDAP external >>> node bandwagon. You can put a "external_nodes = <script>" in your >>> puppet.conf file, where <script> is a script that does whatever it needs to >>> read the local files and dump the output in YAML format. >>> >> >> Oh, so you are using an external node classifier script in the usual way, >> with node_terminus = exec; you are just using unusual terminology to >> describe it. Puppet knows nothing about "external nodes as local files"; >> all it knows is that you have an external node classifier script. >> >> > I felt I had to explicitly say I was using files, since it was relevant to > the understanding of my problem, and I seem to be about the only person who > uses files, as I need to revision control them. > > >> The question about where to put the data files used by your script still >> stands, of course, and I would still probably put them under an >> environment-specific directory. >> >> >> Yeah, but then you have the problem of not knowing what environment the >>> node is in, and you have to go digging around for it. The more environments >>> you have, the more places you have to dig. >>> >> >> I have an external node classifier script whose sole task is to go digging >> in multiple environment-specific directories to figure out which environment >> a client node belongs to. > > > Yes, but I, as a human, have to do digging through the directories too, to > find where to edit the file. I guess I could write a script that does the > searching and returns the full path to the file. That would save some time. > > 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.
Brian Gupta
2011-Mar-01 03:49 UTC
Re: [Puppet Users] Where to put External Nodes in Multiple Environments?
Second vote for "ack", it is awesome for "grepping" through source code trees. Details here: http://betterthangrep.com/ (Note that it is available as an OS packages for many OSes/distros). -Brian On Mon, Feb 28, 2011 at 10:34 PM, Brian Gallew <geek@gallew.org> wrote:> Doug, there''s a command-line tool called "ack" which is an enhanced grep > replacement. It will probably do what you wat with finding your nodes. > > On Mon, Feb 28, 2011 at 4:43 PM, Douglas Garstang <doug.garstang@gmail.com> > wrote: >> >> >> On Mon, Feb 28, 2011 at 1:17 PM, Alan Barrett <apb@cequrux.com> wrote: >>> >>> On Mon, 28 Feb 2011, Douglas Garstang wrote: >>>>> >>>>> How is it possible to use external nodes as local files? I was under >>>>> the impression that node_terminus=exec or node_terminus=ldap were the only >>>>> ways of using external nodes. >>>> >>>> Really? That might be because everyone seems to be on the LDAP external >>>> node bandwagon. You can put a "external_nodes = <script>" in your >>>> puppet.conf file, where <script> is a script that does whatever it needs to >>>> read the local files and dump the output in YAML format. >>> >>> Oh, so you are using an external node classifier script in the usual way, >>> with node_terminus = exec; you are just using unusual terminology to >>> describe it. Puppet knows nothing about "external nodes as local files"; >>> all it knows is that you have an external node classifier script. >>> >> >> I felt I had to explicitly say I was using files, since it was relevant to >> the understanding of my problem, and I seem to be about the only person who >> uses files, as I need to revision control them. >> >>> >>> The question about where to put the data files used by your script still >>> stands, of course, and I would still probably put them under an >>> environment-specific directory. >>> >>>> Yeah, but then you have the problem of not knowing what environment the >>>> node is in, and you have to go digging around for it. The more environments >>>> you have, the more places you have to dig. >>> >>> I have an external node classifier script whose sole task is to go >>> digging in multiple environment-specific directories to figure out which >>> environment a client node belongs to. >> >> Yes, but I, as a human, have to do digging through the directories too, to >> find where to edit the file. I guess I could write a script that does the >> searching and returns the full path to the file. That would save some time. >> >> 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. >-- 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.
Ben Hughes
2011-Mar-01 04:18 UTC
Re: [Puppet Users] Where to put External Nodes in Multiple Environments?
On Mon, Feb 28, 2011 at 07:34:21PM -0800, Brian Gallew wrote:> Doug, there''s a command-line tool called "ack" which is an enhanced grep > replacement. It will probably do what you wat with finding your nodes.Yes, just make sure to add the following to your .ackrc for Puppet. [ben@Paresthesia:~]% cat ~/.ackrc --type-set=puppet=.pp -- Ben Hughes || http://www.puppetlabs.com/ -- 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.
Reasonably Related Threads
- puppetca and /etc/puppet/ssl
- Variable Scoping = Root Canal
- trouble w/ Foreman as ENC, agents and environments
- Warning: Local environment: "42A" doesn't match server specified node environment "production", switching agent to "production"
- Foreman / External Nodes -- Node Not found