Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

php-fpm (39) Versions 0.7.3

Installs/Configures php-fpm

Policyfile
Berkshelf
Knife
cookbook 'php-fpm', '= 0.7.3', :supermarket
cookbook 'php-fpm', '= 0.7.3'
knife supermarket install php-fpm
knife supermarket download php-fpm
README
Dependencies
Quality 0%

Description

Installs and configures PHP-FPM (FastCGI Process Manager), an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. It's like the unicorn of the PHP world dawg.

Requirements

Platform

  • Debian, Ubuntu
  • CentOS, Red Hat, Fedora
  • Amazon Linux

Cookbooks

  • apt (leverages apt_repository LWRP)
  • yum (leverages yum_repository LWRP)

The apt_repository and yum_repository LWRPs are used from these cookbooks to create the proper repository entries so the php-fpm package downloaded and installed.

Description

Creates a PHP-FPM configuration file at the path specified. Meant to be deployed with a service init scheme/supervisor such as runit. Please see the application::php-fpm recipe for a complete working example. In depth information about PHP-FPM's configuration values can be found in the PHP-FPM documentation.

Usage

Simply include the recipe where you want PHP-FPM installed. Default pool www will be created. To disable pool creation set default['php-fpm']['pools'] to false.

To customize settings and pools you can override default attributes.

Usage in roles:

name "php-fpm"
description "php fpm role"
run_list "recipe[php-fpm]"
override_attributes "php-fpm" => {
    "pools" => {
        "default" => {
            :enable => true
        },
        "www" => {
            :enable => "true",
            :cookbook => "another-cookbook",
            :process_manager => "dynamic",
            :max_requests => 5000,
            :php_options => { 'php_admin_flag[log_errors]' => 'on', 'php_admin_value[memory_limit]' => '32M' }
        }
    }
}

Creating pools in recipes

Create PHP-FPM pool named 'www' with default settings:

php_fpm_pool "www"

Create PHP-FPM pool named 'www' with custom settings:

php_fpm_pool "www" do
  cookbook "another-cookbook" # get template from another cookbook
  process_manager "dynamic"
  max_requests 5000
  php_options 'php_admin_flag[log_errors]' => 'on', 'php_admin_value[memory_limit]' => '32M'
end

Delete PHP-FPM pool named 'www':

php_fpm_pool "www" do
  enable false
end

License and Author

Author:: Seth Chisamore (schisamo@opscode.com)

Copyright:: 2011, Opscode, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

apt >= 0.0.0
yum >= 3.0

Contingent cookbooks

aegir Applicable Versions
boxbilling Applicable Versions
kloudspeaker Applicable Versions
magento Applicable Versions
magento-ng Applicable Versions
magentostack Applicable Versions
moodle Applicable Versions
mw_php_fpm Applicable Versions
nagios Applicable Versions
owncloud Applicable Versions
paramount Applicable Versions
phabricator Applicable Versions
php-omnibus Applicable Versions
phpstack Applicable Versions
postfixadmin Applicable Versions
rackspace_apache_php Applicable Versions
rackspace_nginx_php Applicable Versions
roundcube Applicable Versions
symfony Applicable Versions
wordpress Applicable Versions
zabbix Applicable Versions
zabbix_lwrp Applicable Versions

Foodcritic Metric
            

0.7.3 failed this metric

FC015: Consider converting definition to a LWRP: /tmp/cook/cede5d6587bdfad749236126/php-fpm/definitions/php_fpm_pool.rb:1
FC019: Access node attributes in a consistent manner: /tmp/cook/cede5d6587bdfad749236126/php-fpm/attributes/default.rb:1
FC019: Access node attributes in a consistent manner: /tmp/cook/cede5d6587bdfad749236126/php-fpm/attributes/default.rb:14
FC019: Access node attributes in a consistent manner: /tmp/cook/cede5d6587bdfad749236126/php-fpm/recipes/repository.rb:41
FC019: Access node attributes in a consistent manner: /tmp/cook/cede5d6587bdfad749236126/php-fpm/recipes/repository.rb:49
FC023: Prefer conditional attributes: /tmp/cook/cede5d6587bdfad749236126/php-fpm/recipes/configure.rb:29
FC023: Prefer conditional attributes: /tmp/cook/cede5d6587bdfad749236126/php-fpm/recipes/repository.rb:75
FC024: Consider adding platform equivalents: /tmp/cook/cede5d6587bdfad749236126/php-fpm/recipes/repository.rb:74
FC024: Consider adding platform equivalents: /tmp/cook/cede5d6587bdfad749236126/php-fpm/recipes/repository.rb:75
FC031: Cookbook without metadata file: /tmp/cook/cede5d6587bdfad749236126/php-fpm/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/cede5d6587bdfad749236126/php-fpm/metadata.rb:1