On 5/26/2010 2:03 PM, Gonçalo wrote:
Hi there, im trying to set up puppet to manage a nginx server with
load balancing. To achieve this i need to add every machine ip to the
"upstream" conf of nginx. Doing this manually is easy, and all works
fine, the problem is that i would like to have every upstream machine
to "warn" the nginx to add that machine ip to the conf. This way i
would not need to change the conf manually everytime i add/remove a
machine.
To solve this problem i only found one solution (untested yet), that
would be have every upstream machine use Exported Resources to create
a file with its ip:port on a folder on the nginx server, and then have
a batch program creating the nginx conf, based on those files...
Is there any elegant way to do this?
I already posted this question on server fault (http://serverfault.com/
questions/145244/load-balancing-with-puppet), and at that time i was
thinking of just write an include directive inside the upstream on the
conf, but that is not accepted by nginx, so i only have the option
above left..and the one someone can possibly say here :-)
Thanks
Hi,
as I've answered on SF, I'd recommend [R.I.Pienaar's concat][1] module.
With this you can export/collect configuration file snippets and
concatenate them on the target into a single file.
Best Regards, David
[1]: http://github.com/ripienaar/puppet-concat
--
dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at
Klosterneuburg UID: ATU64260999
FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.