yevgenko / cookbook-php-fpm

Installs/Configures php-fpm
http://community.opscode.com/cookbooks/php-fpm
Apache License 2.0
68 stars 117 forks source link

Can disable package installation #42

Closed odolbeau closed 10 years ago

odolbeau commented 10 years ago

Fixed #16

I have the same need as describe in the issue but I just don't want dotdeb packages on my server.

With this new attribute it's easy to skip the repository installation.

odolbeau commented 10 years ago

Replace if by unless done. :)

ghost commented 10 years ago

I like where you're going with this. I think the more ideal way would be to split the package into 3 recipes: default (empty), install, and setup/configure. Having an empty recipe would make it easy to include the cookbook externally to access the attributes (i.e. wrapper cookbooks). Splitting install versus configure seems like the more cheffy way of doing things as you could then just say to configure a node or more easily write a wrapper to install you're own way but use the existing configure code.

ameir commented 10 years ago

I have a local fork of this cookbook where I do exactly this. Much of this can be achieved by simply removing include_recipe "php-fpm" on line https://github.com/yevgenko/cookbook-php-fpm/blob/master/definitions/php_fpm_pool.rb#L24 . So long as you install the package prior, you can then call the definition. To have this cookbook do the installation, simply include_recipe "php-fpm" in your own cookbook.

odolbeau commented 10 years ago

What do you think about this @yevgenko ? Should I move the configuration in a separate recipe ?

yevgenko commented 10 years ago

@odolbeau I think this makes sense @stoltan thank you for proposing concept

odolbeau commented 10 years ago

Split done. I keep the repository recipe but it's probably not so useful so I can merge it with the install one if you prefer.

yevgenko commented 10 years ago

sorry for the late reply guys, I been a little bit busy with relocation and then with my job... but now looking forward to merge it soon :)

yevgenko commented 10 years ago

@odolbeau please see my comments, I'm also thinking that we might need to update README file

yevgenko commented 10 years ago

anyway I believe we are good to go, since it backward compatible and I don't really want to delay it anymore, so, going to test and will merge if no serious problems ;)

odolbeau commented 10 years ago

Seems fine for me. :) What do you think about it @stoltan ? @ameir ?

yevgenko commented 10 years ago

meet php-fpm v0.6.9 release with all above changes http://community.opscode.com/cookbooks/php-fpm

Thank you everyone! :+1:

odolbeau commented 10 years ago

Thank you ! :D