Hi all,
I'm attempting to use exported resources to dynamically generate an nginx
config file. What I'd like to do if have all my web servers export their
hostname inside a file resource, and have these collected by my
loadbalancer and used in the config file, restarting nginx if anything has
On 25 September 2012 12:03, Jon Ward jghw...@gmail.com wrote:
Hi all,
I'm attempting to use exported resources to dynamically generate an nginx
config file. What I'd like to do if have all my web servers export their
hostname inside a file resource, and have these collected by my loadbalancer
Hi Greg,
Yeah that's what I'd hoped - my balancer.conf.erb template had this:
upstream %= balancer_name %_balancer {
include /etc/nginx/conf.d.upstream_servers/*.conf;
}
However when I try to start nginx I get:
Starting nginx: [emerg]: include directive is not allowed here
A bit of googling
Hi Jon,
I have seen something similar done with Puppet Labs' haproxy module:
https://github.com/puppetlabs/puppetlabs-haproxy
Essentially the balancer members export information about themselves
(hostname, port, listening service, etc) which is collected by a
balancer server. The configuration
Thanks Bill - looks like concat provides a potential solution, will give
that a go.
Jon
On Tuesday, September 25, 2012 1:50:39 PM UTC+1, Bill Fraser wrote:
Hi Jon,
I have seen something similar done with Puppet Labs' haproxy module:
https://github.com/puppetlabs/puppetlabs-haproxy