Is there a puppet module supporting remote resource? For example, service { "my_service": ensure => "stopped" require => RemoteService["remote_service"] } If a service on a remote host is done, then stop "my_service" on this host. -- 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.
Hi, No, puppet is about setting desired state of your nodes rather than current state. That is: ''the service be started on this node''. ''this directory should not exist''. It''s not really about ''that other nodes service should be up, but if it''s not there right now, don''t do this either''. Now if you want something to take action based on a current state, like stop a service based on some other service, you could look at MCollective or eventhandlers in something like Nagios. Cheers, Den On 21/10/2011, at 16:01, Benyi Wang <bewang.tech@gmail.com> wrote:> Is there a puppet module supporting remote resource? For example, > > service { "my_service": > ensure => "stopped" > require => RemoteService["remote_service"] > } > > If a service on a remote host is done, then stop "my_service" on this host. > -- > 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 Thu, Oct 20, 2011 at 11:23 PM, Denmat <tu2bgone@gmail.com> wrote:> Hi, > > No, puppet is about setting desired state of your nodes rather than current > state. That is: > ''the service be started on this node''. > ''this directory should not exist''. > > If the nodes work independently, it is always true.> It''s not really about ''that other nodes service should be up, but if it''s > not there right now, don''t do this either''. > > I don''t agree with this because some times different nodes of a cluster mayneed to work together, such as Hadoop cluster. A Hadoop cluster has namenode, jobtracker, datanodes and tasktrackers. If you want to bring the whole cluster down, you need to turn off the services running on different nodes in the order. Hadoop provides a script to stop all services on different nodes using ssh, but it is sequential, especially for a large cluster which has thousands datanodes. But if puppet can provides remote resource I asked, puppet can easily coordinate the start and stop of the whole cluster. Now if you want something to take action based on a current state, like stop> a service based on some other service, you could look at MCollective or > eventhandlers in something like Nagios. > > Cheers, > Den > > > On 21/10/2011, at 16:01, Benyi Wang <bewang.tech@gmail.com> wrote: > > Is there a puppet module supporting remote resource? For example, > > service { "my_service": > ensure => "stopped" > require => RemoteService["remote_service"] > } > > If a service on a remote host is done, then stop "my_service" on this host. > > -- > 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.
MCollective seems what I want. Thanks a lot. On Fri, Oct 21, 2011 at 9:43 AM, Benyi Wang <bewang.tech@gmail.com> wrote:> On Thu, Oct 20, 2011 at 11:23 PM, Denmat <tu2bgone@gmail.com> wrote: > >> Hi, >> >> No, puppet is about setting desired state of your nodes rather than >> current state. That is: >> ''the service be started on this node''. >> ''this directory should not exist''. >> >> If the nodes work independently, it is always true. > > >> It''s not really about ''that other nodes service should be up, but if >> it''s not there right now, don''t do this either''. >> >> I don''t agree with this because some times different nodes of a cluster > may need to work together, such as Hadoop cluster. A Hadoop cluster has > namenode, jobtracker, datanodes and tasktrackers. If you want to bring the > whole cluster down, you need to turn off the services running on different > nodes in the order. > > Hadoop provides a script to stop all services on different nodes using ssh, > but it is sequential, especially for a large cluster which has thousands > datanodes. But if puppet can provides remote resource I asked, puppet can > easily coordinate the start and stop of the whole cluster. > > Now if you want something to take action based on a current state, like >> stop a service based on some other service, you could look at MCollective or >> eventhandlers in something like Nagios. >> >> Cheers, >> Den >> >> >> On 21/10/2011, at 16:01, Benyi Wang <bewang.tech@gmail.com> wrote: >> >> Is there a puppet module supporting remote resource? For example, >> >> service { "my_service": >> ensure => "stopped" >> require => RemoteService["remote_service"] >> } >> >> If a service on a remote host is done, then stop "my_service" on this >> host. >> >> -- >> 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.