Re: [Puppet Users] Puppet under HA Environment

2013-09-05 Thread Rich Burroughs
One of my former co-workers did a talk about Mcollective at PuppetConf.
People involved in this thread might find it useful :) He gives some
examples about doing rolling restarts, you could do something very similar
with orchestrating agent runs.

http://puppetlabs.com/presentations/intro-systems-orchestration-mcollective


On Tue, Sep 3, 2013 at 10:13 AM, Brad darkero...@gmail.com wrote:

 Stuart,

 If I'm understanding your needs correctly, this may be what you're looking
 for:


 http://www.devco.net/archives/2010/03/17/scheduling_puppet_with_mcollective.php


 On Monday, September 2, 2013 11:01:46 AM UTC-5, Stuart Cracraft wrote:

 How can this be randomized within a range?

 I believe someone mentioned splay ?

 My fear is that all the boxes will request at a similar some day, by
 chance
 and send a tidal wave over to the master.

 On Sep 1, 2013, at 10:27 PM, Rahul Khengare rahul...@gmail.com wrote:

 You can use different *runinterval *for each client.
 This can be done using editing of /etc/puppet/puppet.conf on each
 client machine.
 Set the following (add a new line if it's not already present)
 in the [agent] section of the file:

 runinterval=XXX

 where, XXX is the time in seconds(default is 180),

 Thanks and Regards,
 Rahul Khengare,
 NTT DATA OSS Center, Pune, India.


 On Friday, August 30, 2013 2:20:36 AM UTC+5:30, rjbu...@gmail.com wrote:

 How do I avoid a situation where all of my Linux servers execute a
 service restart at the same time upon receiving a new configuration change
 via Puppet?  I am trying to avoid any possibility that the service would be
 unavailable for any length of time.  The servers are behind a load
 balancer.  At least one node needs to remain available.  Any idea how I
 might configure Puppet to work in this HA environment?

 Thank you for your feedback!



 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users...@**googlegroups.com.
 To post to this group, send email to puppet...@googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/puppet-usershttp://groups.google.com/group/puppet-users
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet under HA Environment

2013-09-04 Thread Garrett Honeycutt
On Monday, September 2, 2013 12:01:46 PM UTC-4, Stuart Cracraft wrote:

 How can this be randomized within a range?

 I believe someone mentioned splay ?

 My fear is that all the boxes will request at a similar some day, by chance
 and send a tidal wave over to the master.

 On Sep 1, 2013, at 10:27 PM, Rahul Khengare rahul...@gmail.comjavascript: 
 wrote:

 You can use different *runinterval *for each client.
 This can be done using editing of /etc/puppet/puppet.conf on each 
 client machine.
 Set the following (add a new line if it's not already present) 
 in the [agent] section of the file:

 runinterval=XXX

 where, XXX is the time in seconds(default is 180),

 Thanks and Regards,
 Rahul Khengare,
 NTT DATA OSS Center, Pune, India.


 On Friday, August 30, 2013 2:20:36 AM UTC+5:30, rjbu...@gmail.com wrote:

 How do I avoid a situation where all of my Linux servers execute a 
 service restart at the same time upon receiving a new configuration change 
 via Puppet?  I am trying to avoid any possibility that the service would be 
 unavailable for any length of time.  The servers are behind a load 
 balancer.  At least one node needs to remain available.  Any idea how I 
 might configure Puppet to work in this HA environment?

 Thank you for your feedback!


It is pretty common to run the puppet agent from cron as opposed to daemon 
mode. From there you can randomize when the agent runs using the fqdn as a 
seed with the fqdn_rand[1] function. Here is an example[2] of this in a 
manifest.

[1] - http://docs.puppetlabs.com/references/latest/function.html#fqdnrand
[2] - 
https://github.com/ghoneycutt/puppet-module-puppet/blob/master/manifests/agent.pp#L57

Best regards,
-g

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet under HA Environment

2013-09-03 Thread Matthew Burgess
On 2 September 2013 17:01, Stuart Cracraft smcracr...@me.com wrote:

 How can this be randomized within a range?
 


I don't think it can; it suffers from the same issue as splay does, which
I explained in some detail last week.



 My fear is that all the boxes will request at a similar some day, by chance
 and send a tidal wave over to the master.


I think the only way to allay that fear is to maintain strict control over
when each client (or group of clients) checks in, either using cron or
mcollective.  Or you could set up multiple masters in a load balanced
configuration so that your puppet masters can cope with the maximum
possible load that can be thrown at them.

Regards,

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet under HA Environment

2013-09-03 Thread Brad
Stuart,

If I'm understanding your needs correctly, this may be what you're looking 
for:

http://www.devco.net/archives/2010/03/17/scheduling_puppet_with_mcollective.php

On Monday, September 2, 2013 11:01:46 AM UTC-5, Stuart Cracraft wrote:

 How can this be randomized within a range?

 I believe someone mentioned splay ?

 My fear is that all the boxes will request at a similar some day, by chance
 and send a tidal wave over to the master.

 On Sep 1, 2013, at 10:27 PM, Rahul Khengare rahul...@gmail.comjavascript: 
 wrote:

 You can use different *runinterval *for each client.
 This can be done using editing of /etc/puppet/puppet.conf on each 
 client machine.
 Set the following (add a new line if it's not already present) 
 in the [agent] section of the file:

 runinterval=XXX

 where, XXX is the time in seconds(default is 180),

 Thanks and Regards,
 Rahul Khengare,
 NTT DATA OSS Center, Pune, India.


 On Friday, August 30, 2013 2:20:36 AM UTC+5:30, rjbu...@gmail.com wrote:

 How do I avoid a situation where all of my Linux servers execute a 
 service restart at the same time upon receiving a new configuration change 
 via Puppet?  I am trying to avoid any possibility that the service would be 
 unavailable for any length of time.  The servers are behind a load 
 balancer.  At least one node needs to remain available.  Any idea how I 
 might configure Puppet to work in this HA environment?

 Thank you for your feedback!



 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to puppet-users...@googlegroups.com javascript:.
 To post to this group, send email to puppet...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet under HA Environment

2013-09-02 Thread Stuart Cracraft
How can this be randomized within a range?

I believe someone mentioned splay ?

My fear is that all the boxes will request at a similar some day, by chance
and send a tidal wave over to the master.

On Sep 1, 2013, at 10:27 PM, Rahul Khengare rahulk1...@gmail.com wrote:

 You can use different runinterval for each client.
 This can be done using editing of /etc/puppet/puppet.conf on each client 
 machine.
 Set the following (add a new line if it's not already present) 
 in the [agent] section of the file:
 
 runinterval=XXX
 
 where, XXX is the time in seconds(default is 180),
 
 Thanks and Regards,
 Rahul Khengare,
 NTT DATA OSS Center, Pune, India.
 
 
 On Friday, August 30, 2013 2:20:36 AM UTC+5:30, rjbu...@gmail.com wrote:
 How do I avoid a situation where all of my Linux servers execute a service 
 restart at the same time upon receiving a new configuration change via 
 Puppet?  I am trying to avoid any possibility that the service would be 
 unavailable for any length of time.  The servers are behind a load balancer.  
 At least one node needs to remain available.  Any idea how I might configure 
 Puppet to work in this HA environment?
 
 Thank you for your feedback!
 
 
 
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to puppet-users+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet under HA Environment

2013-08-30 Thread Matthew Burgess
In your situation, I'd be tempted to not run the puppet agent in daemon
mode at all so that you can retain full control of when the agents will
check in.  I can't see how the splay option will help avoid concurrent
checkins:

Imagine HA node 1 is rebooted for whatever reason and comes back up at
12:00 at which point the puppet agent checks in due to its boot script
running.  Its splay parameter is set to true, its runinterval is the
default 30m and its psuedo-random splay time is 5 mins.  It will therefore
next check in at 12:35.

Now, HA node 2 just so happens to have checked in last at 11:55 and its
pseudo-random splay time is 10 mins, so it's going to next check in at
12:35.  As you, by definition, cannot control the pseudo-random delay time
you cannot guarantee the availability of services managed by Puppet.

So, instead of running puppet in daemon mode, I'd look to use something
like mcollective to control when the agents check in with the master.

Kind Regards,

Matt.


On 29 August 2013 21:50, rjbutl...@gmail.com wrote:

 How do I avoid a situation where all of my Linux servers execute a service
 restart at the same time upon receiving a new configuration change via
 Puppet?  I am trying to avoid any possibility that the service would be
 unavailable for any length of time.  The servers are behind a load
 balancer.  At least one node needs to remain available.  Any idea how I
 might configure Puppet to work in this HA environment?

 Thank you for your feedback!


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet under HA Environment

2013-08-30 Thread Matthew Burgess
On 30 August 2013 10:42, Matthew Burgess matthew.2.burg...@gmail.comwrote:


 So, instead of running puppet in daemon mode, I'd look to use something
 like mcollective to control when the agents check in with the master.


You could of course just set up a cron job on each host, ensuring they
check in at different times.

Kind Regards,

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet under HA Environment

2013-08-29 Thread rjbutler3


How do I avoid a situation where all of my Linux servers execute a service 
restart at the same time upon receiving a new configuration change via 
Puppet?  I am trying to avoid any possibility that the service would be 
unavailable for any length of time.  The servers are behind a load 
balancer.  At least one node needs to remain available.  Any idea how I 
might configure Puppet to work in this HA environment?

Thank you for your feedback!


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.