Hi, I''m trying to gather some information for how other people manage this. Currently I have a nodes.pp with entries like: node "test1.law.harvard.edu'' { include baseclass network::ip { "eth0": ip => "10.241.200.219", netmask => "255.255.255.0", network => "10.241.200.0", broadcast => "10.241.200.255", gateway => " 10.241.200.1", hostname => "hlstestper1.law.harvard.edu", enabled => "yes" } } What I wanted to do was move towards using LDAP for all nodes, but I can''t find a clean way to resolve this network::ip define that I have. Originally I defined something like: interface: 10.241.200.219 interface: 255.255.255.0 In LDAP, and attempted to address this as an array. Luke says this can''t be done and puppet would need extending. This makes me feel I''m on the wrong track, how do other people handle node specific information after moving to an external node database? 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 -~----------~----~----~----~------~----~------~--~---
Blake Barnett
2008-Mar-27 20:54 UTC
[Puppet Users] Re: LDAP and node specific configuration.
On Mar 27, 2008, at 8:26 AM, Ashley Penney wrote:> Hi, > > I''m trying to gather some information for how other people manage > this. Currently I have a nodes.pp with entries like: > > node "test1.law.harvard.edu'' { > include baseclass > network::ip { "eth0": ip => "10.241.200.219", netmask => > "255.255.255.0", network => "10.241.200.0", broadcast => > "10.241.200.255", gateway => "10.241.200.1", hostname => > "hlstestper1.law.harvard.edu", enabled => "yes" } > } > > What I wanted to do was move towards using LDAP for all nodes, but I > can''t find a clean way to resolve this network::ip define that I > have. Originally I defined something like: > > interface: 10.241.200.219 > interface: 255.255.255.0 > > In LDAP, and attempted to address this as an array. Luke says this > can''t be done and puppet would need extending. This makes me feel > I''m on the wrong track, how do other people handle node specific > information after moving to an external node database? >Instead of relying directly on the LDAP structure, I think the key to is to use an external_node exec that returns the correct mappings to classes, and parameters. So in your case, the script or app would query LDAP (and any other sources of information) and spit out all the classes as well as variables such as: if_eth0 = "x.x.x.x", which your defines would then make use of. Here''s more info on it: http://reductivelabs.com/trac/puppet/wiki/ExternalNodes Also, if you''re thinking of using ruby for this script, I recommend ActiveLdap to access your information. -Blake --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ashley Penney
2008-Mar-27 23:34 UTC
[Puppet Users] Re: LDAP and node specific configuration.
Ahhh, thanks for this. That makes sense. I would probably (attempt) to write the script in ruby as I want to learn the language and this is as good a reason as any. However, in the interests of speed, if anyone else wrote a ruby/ldap script for external nodes, I''d love to see it! On Thu, Mar 27, 2008 at 4:54 PM, Blake Barnett <shadoi@gmail.com> wrote:> On Mar 27, 2008, at 8:26 AM, Ashley Penney wrote: > > Hi, > I''m trying to gather some information for how other people manage this. > Currently I have a nodes.pp with entries like: > > node "test1.law.harvard.edu'' { > include baseclass > network::ip { "eth0": ip => "10.241.200.219", netmask => "255.255.255.0", > network => "10.241.200.0", broadcast => "10.241.200.255", gateway => " > 10.241.200.1", hostname => "hlstestper1.law.harvard.edu", enabled => "yes" > } > } > > What I wanted to do was move towards using LDAP for all nodes, but I can''t > find a clean way to resolve this network::ip define that I have. Originally > I defined something like: > > interface: 10.241.200.219 > interface: 255.255.255.0 > > In LDAP, and attempted to address this as an array. Luke says this can''t > be done and puppet would need extending. This makes me feel I''m on the > wrong track, how do other people handle node specific information after > moving to an external node database? > > > Instead of relying directly on the LDAP structure, I think the key to is > to use an external_node exec that returns the correct mappings to classes, > and parameters. So in your case, the script or app would query LDAP (and > any other sources of information) and spit out all the classes as well as > variables such as: if_eth0 = "x.x.x.x", which your defines would then make > use of. > > Here''s more info on it: > http://reductivelabs.com/trac/puppet/wiki/ExternalNodes > Also, if you''re thinking of using ruby for this script, I recommend > ActiveLdap to access your information. > > -Blake > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---