Daniel Pittman
2008-Jul-08 05:57 UTC
[Puppet Users] Managing resources that span multiple nodes.
G''day. I have been playing around with puppet, trying to get it to work for various of the systems management issues I have dealt with. One of the problems I have faced in the past is managing resources that span nodes, or where they refer to other nodes, when building configurations. An example is managing an "active/passive" cluster system such as heartbeat or DRBD, where the configuration on each machine in a cluster should draw information from all the machines. What I would like to do for managing this is declare the high level relationship in my node definition, and then use that in templates that generate the appropriate configuration files, such as: sample.pp: cluster ha01 { node node01 node node02 } node node01 { file { "/etc/drbd.conf": content => template("drbd.conf.erb") } } drbd.conf.erb: <% cluster.nodes.each do |node| %> on <% node.hostname %> { address <% node.ipaddress %> } <% end %> As far as I can tell there is nothing in Puppet to support this sort of grouping or node relationship management at this stage; is that correct? If not, is this because I have grabbed the wrong end of the stick -- is there a better way to manage this sort of relationship between nodes, and configuring services that span multiple systems? Regards, Daniel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Evan Hisey
2008-Jul-08 14:44 UTC
[Puppet Users] Re: Managing resources that span multiple nodes.
On Tue, Jul 8, 2008 at 12:57 AM, Daniel Pittman <daniel@rimspace.net> wrote:> > G''day. I have been playing around with puppet, trying to get it to work > for various of the systems management issues I have dealt with. > > One of the problems I have faced in the past is managing resources that > span nodes, or where they refer to other nodes, when building > configurations. > > An example is managing an "active/passive" cluster system such as > heartbeat or DRBD, where the configuration on each machine in a cluster > should draw information from all the machines. > > > What I would like to do for managing this is declare the high level > relationship in my node definition, and then use that in templates that > generate the appropriate configuration files, such as: > > > sample.pp: > > cluster ha01 { > node node01 > node node02 > } > > node node01 { > file { "/etc/drbd.conf": > content => template("drbd.conf.erb") > } > } > > drbd.conf.erb: > > <% cluster.nodes.each do |node| %> > on <% node.hostname %> { > address <% node.ipaddress %> > } > <% end %> > > > As far as I can tell there is nothing in Puppet to support this sort of > grouping or node relationship management at this stage; is that correct? > > If not, is this because I have grabbed the wrong end of the stick -- is > there a better way to manage this sort of relationship between nodes, > and configuring services that span multiple systems? >Two things to look at. First is external nodes description setups with LDAP. The second is stored configurations,which lets you store node information on the puppet maaster so that other nodes can access it. You can''t actually use a cluster declaration like you have, but you could use a module that is included in each member of the cluster. I am using that approach to setup the RHEL storage clustering. that way the module knows all about the cluster, and all Ihave to do is pass a few variables from the node definition to the module to tell teh module which member of the cluster the node is. Evan --~--~---------~--~----~------------~-------~--~----~ 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, any progress so far? If yes, would you share your findings? On Jul 8, 7:57 am, Daniel Pittman <dan...@rimspace.net> wrote:> G''day. I have been playing around with puppet, trying to get it to work > for various of the systems management issues I have dealt with. > > One of the problems I have faced in the past is managing resources that > span nodes, or where they refer to other nodes, when building > configurations. > > An example is managing an "active/passive"clustersystem such as > heartbeat or DRBD, where the configuration on each machine in acluster > should draw information from all the machines. > > What I would like to do for managing this is declare the high level > relationship in my node definition, and then use that in templates that > generate the appropriate configuration files, such as: > > sample.pp: > > clusterha01 { > node node01 > node node02 > > } > > node node01 { > file { "/etc/drbd.conf": > content => template("drbd.conf.erb") > } > > } > > drbd.conf.erb: > > <%cluster.nodes.each do |node| %> > on <% node.hostname %> { > address <% node.ipaddress %>} > > <% end %> > > As far as I can tell there is nothing in Puppet to support this sort of > grouping or node relationship management at this stage; is that correct? > > If not, is this because I have grabbed the wrong end of the stick -- is > there a better way to manage this sort of relationship between nodes, > and configuring services that span multiple systems? > > Regards, > Daniel--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Adam Jacob
2008-Jul-17 04:40 UTC
[Puppet Users] Re: Managing resources that span multiple nodes.
On Mon, Jul 7, 2008 at 10:57 PM, Daniel Pittman <daniel@rimspace.net> wrote:> > As far as I can tell there is nothing in Puppet to support this sort of > grouping or node relationship management at this stage; is that correct? > > If not, is this because I have grabbed the wrong end of the stick -- is > there a better way to manage this sort of relationship between nodes, > and configuring services that span multiple systems? >At the moment, you have a few choices: 1. Export/Collect. Export a definition that gets realized on your various hosts, and which make up your configuration for DRBD. 2. iClassify. Use full text search queries to render a template. This is how HJK handles these sorts of things. 3. Use the language itself. This is what we did pre-iClassify. If you choose the option 3, you''ll wind up with something like: $database_cluster_servers = [ "db1.example.com", "db2.example.com" ] <% database_cluster_servers.each do |s| -%> <%= s %> <% end -%> We have an older architecture that does everything this way, including Nagios, LVS, and other similar services that require a full-infrastructure viewpoint. It absolutely can be made to work, and it''s not *that* bad to maintain. (Better than nothing, certainly.) Regards, Adam -- HJK Solutions - We Launch Startups - http://www.hjksolutions.com Adam Jacob, Senior Partner T: (206) 508-4759 E: adam@hjksolutions.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 -~----------~----~----~----~------~----~------~--~---
Daniel Pittman
2008-Jul-18 12:07 UTC
[Puppet Users] Re: Managing resources that span multiple nodes.
pc2 <bela.pesics@gmail.com> writes:> On Jul 8, 7:57 am, Daniel Pittman <daniel@rimspace.net> wrote: > >> G''day. I have been playing around with puppet, trying to get it to >> work for various of the systems management issues I have dealt with. >> >> One of the problems I have faced in the past is managing resources that >> span nodes, or where they refer to other nodes, when building >> configurations.[...]>> As far as I can tell there is nothing in Puppet to support this sort of >> grouping or node relationship management at this stage; is that correct? >> >> If not, is this because I have grabbed the wrong end of the stick -- is >> there a better way to manage this sort of relationship between nodes, >> and configuring services that span multiple systems? > > Daniel, any progress so far? If yes, would you share your findings?Nothing substantial yet: I have gotten caught up with scope related bugs in the Puppet template engine, though I vaguely intend to look at this again. I have identified that it is difficult, at present, to use the export and collect facility to manage this in any case where you need a single configuration file containing details from multiple nodes. This is because /something /needs/ to build that configuration from parts, and puppet currently provides nothing.[1] Regards, Daniel Footnotes: [1] The "complete configuration" example does include support for this, but I suspect I will be building or extending the file type in the near future to handle that natively. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---