sous-chefs / haproxy

Development repository for the haproxy cookbook
https://supermarket.chef.io/cookbooks/haproxy
Apache License 2.0
158 stars 248 forks source link

Including `haproxy::app_lb` in run list doesn't write proper haproxy.cfg #109

Closed ianrossi closed 7 years ago

ianrossi commented 9 years ago

@slyness This is an issue only in master. In develop, I'm able to put haproxy::app_lb in my run list with the following role and /etc/haproxy.cfg is written properly. If I do this same thing with the master branch of this cookbook, /etc/haproxy.cfg remains unchanged as the default file installed with the haproxy package. This is on Centos 6.5. Can I help out?

p.s. Whazzup?!

name 'haproxy_lb'
default_attributes(
  :haproxy => {
    :app_server_role => 'fit_api_server',
    :enable_default_http => false
  }
)
run_list 'recipe[haproxy::app_lb]'
alxndrmlr commented 9 years ago

@ianrossi were you able to resolve this. I'm running into this as well.

ianrossi commented 9 years ago

@alxndrmlr I worked around this by using the develop branch. I'm using librarian-chef for cookbook dependency management, so I put the following in my Cheffile:

cookbook 'haproxy', :git => 'git@github.com:hw-cookbooks/haproxy.git', :ref => 'develop'

Then, I install all cookbooks in the Cheffile by doing:

librarian-chef install

Then I upload the haproxy cookbook to my Chef Server.

Hope that helps.

mlavi commented 9 years ago

I have also encountered this on CentOS 6.5 on master. :~( With the above tip, I accomplished this with Berkshelf:

source "https://supermarket.chef.io"
#metadata
#https://github.com/hw-cookbooks/haproxy/issues/109
cookbook "haproxy", github: "hw-cookbooks/haproxy", branch: "develop"

Which resulted in a haproxy.conf file update when executed by Chef.

alxndrmlr commented 9 years ago

Got it working off the dev branch as well.

michaelschlies commented 8 years ago

I am working with organizations that need to pull from supermarket, pulling from branches via GIT isn't a viable solution. Is there anyway the haproxy_config LWRP can be merged into master?

elijah commented 8 years ago

This does indeed deserve to be merged and version bumped... please.

ianrossi commented 8 years ago

@elijah Are you asking for the develop branch to be merged to master?

elijah commented 8 years ago

It would certainly save me from a bunch of extra work hacking together a sketchy version-bumped copy to upload to a very large organization's supermarket. :-) [I'm not altogether certain that merely telling Berkshelf to pull from the develop branch on github will work -- some limitations on what I can force people to allow our pipeline to do.]

It would be appreciated :)

I found a few other weird things this afternoon, too - using an EPEL copy of haproxy on fairly old AMI. Had to create user and group for haproxy by hand in my recipe, because the RPM failed to do so... was going to PR that and a few other things this evening, if I get a few moments.

--e

On Tue, Nov 8, 2016 at 4:58 PM, Ian D. Rossi notifications@github.com wrote:

@elijah https://github.com/elijah Are you asking for the develop branch to be merged to master?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chef-brigade/haproxy/issues/109#issuecomment-259286341, or mute the thread https://github.com/notifications/unsubscribe-auth/AACokznmdvbx5iqN5Y2epwT0YOUuT8Y4ks5q8P6jgaJpZM4FGdgd .

tas50 commented 8 years ago

Develop branch will go away soon

ianrossi commented 8 years ago

@elijah I didn't do a diff or anything but this a branch I had working that fixed a problem with the source install. I think this might have been merged, though. But has been working for me in production. https://github.com/aimtheory/haproxy/tree/fix/install_source

rshade commented 7 years ago

@ianrossi can you see if this works on the latest version?

damacus commented 7 years ago

@ianrossi I'm going to close this issue now as we've significantly changed the way to cookbook configures things. We'll not be doing any patches to v3.

If v4 does not work in some way please open a ticket.

Thanks!

lock[bot] commented 6 years ago

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.