Hi guys, I have a multi-site setup that I am configuring to manage via Puppet. At present there is only a single puppetmaster, but I''m about to set up a second one at another site for redundancy and to speed up requests by keeping the configuration at the one site. I want to set up Puppet clients to first attempt to connect to the puppetmaster at their local site and if that fails to try the puppetmaster at the alternate site. Obviously this requires the puppetmaster configurations to be identical - no problem. The problem is that I can only set one server name into the puppet.conf file, I can''t specify a list. I know some people have gotten around this (sort of) by using Apache and mod_proxy to load balance the configuration - that''s not what I''m after, its not a load issue, its a redundancy issue I''m trying to solve. All that putting in Apache or some other load balancer does is move the point of failure. Also, putting in multiple A records in DNS doesn''t help, as that gives a round-robin approach - I want the clients to favour the server for their particular site. Any thoughts on how to work this would be appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Either use a local proxy or load balancer or use a wrapper script that checks which pm is alive and then execute puppet with the correct --server option Ohad On 5/14/09, Greg <greg.boug@gmail.com> wrote:> > Hi guys, > > I have a multi-site setup that I am configuring to manage via Puppet. > At present > there is only a single puppetmaster, but I''m about to set up a second > one at > another site for redundancy and to speed up requests by keeping the > configuration > at the one site. > > I want to set up Puppet clients to first attempt to connect to the > puppetmaster > at their local site and if that fails to try the puppetmaster at the > alternate site. > Obviously this requires the puppetmaster configurations to be > identical - no problem. > The problem is that I can only set one server name into the > puppet.conf file, I can''t > specify a list. > > I know some people have gotten around this (sort of) by using Apache > and mod_proxy > to load balance the configuration - that''s not what I''m after, its not > a load issue, its a > redundancy issue I''m trying to solve. All that putting in Apache or > some other load > balancer does is move the point of failure. > > Also, putting in multiple A records in DNS doesn''t help, as that gives > a round-robin > approach - I want the clients to favour the server for their > particular site. > > Any thoughts on how to work this would be appreciated. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
one rather rough solution I''ve used for this before, is a separate monitoring daemon, that polls the primary server on a regular basis, if this falls over, the daemon then can use 1 of 2 approaches 1) Rewrite the IP for the hostname of the puppetmaster in the /etc/hosts file (really rough, but does the job) 2) either rewrite or copy over the puppet.conf file, and restart puppet - this is the solution I prefer, and I usually use the following setup 3 files puppet.conf puppet.conf.master puppet.conf.fail from here the daemon tracks change of state in the master server - if host is detected as down, cp puppet.conf.fail puppet.conf - when host back up, cp puppet.conf.master puppet.conf Cheer Tim -----Original Message----- From: Ohad Levy <ohadlevy@gmail.com> Reply-to: puppet-users@googlegroups.com To: puppet-users@googlegroups.com Subject: [Puppet Users] Re: "Failover" for puppetmasters Date: Thu, 14 May 2009 15:53:18 +0800 Either use a local proxy or load balancer or use a wrapper script that checks which pm is alive and then execute puppet with the correct --server option Ohad On 5/14/09, Greg <greg.boug@gmail.com> wrote:> > Hi guys, > > I have a multi-site setup that I am configuring to manage via Puppet. > At present > there is only a single puppetmaster, but I''m about to set up a second > one at > another site for redundancy and to speed up requests by keeping the > configuration > at the one site. > > I want to set up Puppet clients to first attempt to connect to the > puppetmaster > at their local site and if that fails to try the puppetmaster at the > alternate site. > Obviously this requires the puppetmaster configurations to be > identical - no problem. > The problem is that I can only set one server name into the > puppet.conf file, I can''t > specify a list. > > I know some people have gotten around this (sort of) by using Apache > and mod_proxy > to load balance the configuration - that''s not what I''m after, its not > a load issue, its a > redundancy issue I''m trying to solve. All that putting in Apache or > some other load > balancer does is move the point of failure. > > Also, putting in multiple A records in DNS doesn''t help, as that gives > a round-robin > approach - I want the clients to favour the server for their > particular site. > > Any thoughts on how to work this would be appreciated. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hrmmm... Local proxies on each client may introduce a fair amount of overhead, but may actually work. The only problem with scripting and then calling the right --server option is that it would require a restart of the client to fail the service over to the alternate puppetmaster - it wouldn''t happen automatically. Greg On May 14, 5:53 pm, Ohad Levy <ohadl...@gmail.com> wrote:> Either use a local proxy or load balancer or use a wrapper script that > checks which pm is alive and then execute puppet with the correct > --server option > > Ohad > > On 5/14/09, Greg <greg.b...@gmail.com> wrote: > > > > > Hi guys, > > > I have a multi-site setup that I am configuring to manage via Puppet. > > At present > > there is only a single puppetmaster, but I''m about to set up a second > > one at > > another site for redundancy and to speed up requests by keeping the > > configuration > > at the one site. > > > I want to set up Puppet clients to first attempt to connect to the > > puppetmaster > > at their local site and if that fails to try the puppetmaster at the > > alternate site. > > Obviously this requires the puppetmaster configurations to be > > identical - no problem. > > The problem is that I can only set one server name into the > > puppet.conf file, I can''t > > specify a list. > > > I know some people have gotten around this (sort of) by using Apache > > and mod_proxy > > to load balance the configuration - that''s not what I''m after, its not > > a load issue, its a > > redundancy issue I''m trying to solve. All that putting in Apache or > > some other load > > balancer does is move the point of failure. > > > Also, putting in multiple A records in DNS doesn''t help, as that gives > > a round-robin > > approach - I want the clients to favour the server for their > > particular site. > > > Any thoughts on how to work this would be appreciated.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---