Closed nitinmohan87 closed 7 years ago
According to the README, I created the config Mash as follows
{"global"=> {"maxconn"=>4096, "user"=>"haproxy", "group"=>"haproxy", "daemon"=>true, "quiet"=>true,}, "defaults"=> {"timeout"=>{"client"=>"10s", "server"=>"10s", "connect"=>"10s"}, "log"=>"global", "mode"=>"http"}, "frontend"=> {"all_requests"=>{"bind"=>"10.0.0.1:80", "default_backend"=>"app1"}}, "backend"=> {"default"=> {"mode"=>"http"}, "app1"=> {"mode"=>"http", "balance"=>"roundrobin"}
This is the haproxy.cfg file the template created
haproxy.cfg
global maxconn 4096 user haproxy group haproxy daemon quiet defaults timeout client 10s timeout server 10s timeout connect 10s log global mode http frontend all_requests bind 10.0.0.1:80 all_requests default_backend app3 backend default mode http app1 mode http app1 balance roundrobin
As you can notice the frontend and backend section don't look quite right. It should be generated in this format
frontend all_requests bind 10.0.0.1:80 default_backend app1 backend default mode http backend app1 mode http balance roundrobin
The template and config generator needs to be modified to provide a syntactically correct haproxy.cfg - https://github.com/hw-cookbooks/haproxy/blob/master/templates/default/haproxy.dynamic.cfg.erb#L1-L4
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
According to the README, I created the config Mash as follows
This is the
haproxy.cfg
file the template createdAs you can notice the frontend and backend section don't look quite right. It should be generated in this format
The template and config generator needs to be modified to provide a syntactically correct haproxy.cfg - https://github.com/hw-cookbooks/haproxy/blob/master/templates/default/haproxy.dynamic.cfg.erb#L1-L4