[Puppet Users] Re: Looking for a way to balance the contents of services (like DNS, LDAP, NIS)

2012-10-11 Thread trevman

I'll check out the library and the fdqn_rotate function. 

Thanks. 


On Wednesday, October 10, 2012 12:55:21 PM UTC-7, jcbollinger wrote:



 On Wednesday, October 10, 2012 11:10:32 AM UTC-5, trevman wrote:

 I'm looking for a way to balance out services when insuring the content 
 of configuration files.

 Example is how to do this with /etc/yp.conf:
 ##
 domain example.com server 192.168.1.2
 domain example.com server 192.168.1.3
 domain example.com server 192.168.1.4
 ##

 I'd like to *change the order of the entries *in a random or rotating 
 fashion so that multiple machines would get a *different *order so that 
 we can scale the services without having to invest in a load balancer.

 Obviously, we wouldn't want the contents to continually change on every 
 machine, so the tests would need to be appropriate.

 Any ideas?


 There are lots of ways you could do this, but the the ready-built 
 fqdn_rotate() function in Puppetlabs's add-in stdlib module (
 https://github.com/puppetlabs/puppetlabs-stdlib) would probably serve as 
 a good foundation.  Put the NIS server IPs in an array, shuffle it with 
 fqdn_rand(), and read the results out into your yp.conf template.  Each 
 node will have a consistent order as long as its FQDN does not change.


 John



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/XieYuut56GoJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Looking for a way to balance the contents of services (like DNS, LDAP, NIS)

2012-10-10 Thread trevman
I'm looking for a way to balance out services when insuring the content of 
configuration files.

Example is how to do this with /etc/yp.conf:
##
domain example.com server 192.168.1.2
domain example.com server 192.168.1.3
domain example.com server 192.168.1.4
##

I'd like to *change the order of the entries *in a random or rotating 
fashion so that multiple machines would get a *different *order so that we 
can scale the services without having to invest in a load balancer.

Obviously, we wouldn't want the contents to continually change on every 
machine, so the tests would need to be appropriate.

Any ideas?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/4GzGrjJgRtQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.