Skip to content

Commit

Permalink
Allow non-integer instance counts.
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpm committed Nov 24, 2014
1 parent 1868591 commit ccd5a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plone_buildout/templates/default/haproxy.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ backend plone_instances
option forceclose
option httpchk <%= node[:haproxy][:health_check_method] %> <%= node[:haproxy][:health_check_url] %>
<% node[:opsworks][:layers]["plone_instances"][:instances].each do |name, backend| -%>
<% 1.upto((backend[:backends].to_i*node["plone_instances"]["per_cpu"].to_i/8.0).round) do |n| %>
<% 1.upto((backend[:backends].to_i*node["plone_instances"]["per_cpu"].to_f/8.0).round) do |n| %>
server <%= "#{name}-#{n}"%> <%= backend['private_dns_name'] %>:<%=8080 + n%> <% if node["plone_instances"]["sticky_sessions"]%>cookie p<%=n%><%end%> check inter <%= node[:haproxy][:check_interval] %> fastinter <%= node[:haproxy][:check_interval]/10 %> downinter <%= node[:haproxy][:check_interval]/2 %> maxconn <%=node["plone_instances"]["zserver_threads"] || 2 %> rise 1 fall 5
<% end %>
<% end -%>
Expand Down

0 comments on commit ccd5a83

Please sign in to comment.