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

RSS

blackfire (9) Versions 2.1.0

Installs and configures Blackfire.io stack

Berkshelf/Librarian
Policyfile
Knife
cookbook 'blackfire', '~> 2.1.0'
cookbook 'blackfire', '~> 2.1.0', :supermarket
knife cookbook site install blackfire
knife cookbook site download blackfire
README
Dependencies
Changelog
Quality 78%

Blackfire Cookbook

This cookbook installs and configures the blackfire stack.

Requirements

Platform

  • Ubuntu (10.04/11.04/12.04/13.04/14.04)
  • Debian (6.0/7.0)
  • RedHat Based (CentOS 6.4 and Fedora 20 tested, others should work)

cookbooks

  • apt
  • yum

Attributes

The following attributes are available to affect the installation/configuration of the Backfire stack

blackfire::default

  • node['blackfire']['agent']['version'] - Sets which version of the agent to install. Default last version.
  • node['blackfire']['agent']['server_id'] - Sets the Server ID to use for the agent (See https://blackfire.io/account/agents)
  • node['blackfire']['agent']['server_token'] - Sets the Server Token to use for the agent (See https://blackfire.io/account/agents)
  • node['blackfire']['agent']['log_level'] - Sets the logging level for the agent. Default 1
  • node['blackfire']['agent']['log_file'] - Sets where the agent write logs. Default "stderr"
  • node['blackfire']['agent']['socket'] - Sets where the socket the agent will listen to. Default "unix:///var/run/blackfire/agent.sock"

blackfire::php

  • node['blackfire']['php']['version'] - Sets which version of the PHP extension will be installed. Default last version.
  • node['blackfire']['php']['agent_timeout'] - Sets the PHP extension timeout when communicating with the agent. Default '0.25'
  • node['blackfire']['php']['log_level'] - Sets the logging level for the PHP extension.
  • node['blackfire']['php']['log_file'] - Sets where the PHP extension write logs.
  • node['blackfire']['php']['ini_path'] - Sets where the PHP configuration will be written.
  • node['blackfire']['php']['server_id'] - Sets the Server ID to use for probe fine-grained configuration (See https://blackfire.io/doc/configuration#probe-configuration)
  • node['blackfire']['php']['server_token'] - Sets the Server Token to use for probe fine-grained configuration (See https://blackfire.io/doc/configuration#probe-configuration)

Usage

blackfire::default

Add agent Server ID and token and include blackfire in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[blackfire]"
  ],
  "blackfire": {
    "agent": {
      "server_id": "my-agent-server-id",
      "server_token": "my-agent-server-token"
    }
  }
}

blackfire::agent

Used if you wish to install only the agent.

blackfire::php

Used if you wish to install only the PHP extension.

Note about blackfire::php

This cookbook makes no assumption about the webserver you use.

Therefore this is your responsability to write a wrapper and notify your webserver (ie. Apache or php5-fpm) for reload/restart or subscribe the good resources.

You can obtain futher informations on wrapper cookbooks here: https://www.getchef.com/blog/2013/12/03/doing-wrapper-cookbooks-right/

One way to do that (maybe the best to avoid disturbing logs messages):

include_recipe "blackfire"

begin
  r = resources(:ruby_block => "blackfire-php-restart-webserver")
  r.block do
  end
  r.notifies :reload, "service[php5-fpm]"
rescue Chef::Exceptions::ResourceNotFound
  Chef::Log.warn 'could not find resource "ruby_block[blackfire-php-restart-webserver]" to override!'
end

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

Tests

Three test suites exist:

  • two using kitchen.ci (meant to be run localy by contributors)
  • one using rspec (meant to be run by travis, not localy).

These test suites can be launched by using rake integration:vagrant or rake integration:docker for the kitchen.ci one and rake travis for rspec.

Supermarket share

You need stove to publish the cookbook on supermarket. Once it's done use rake publish

License and Authors

Copyright:: 2014-2016 Blackfire.io

See LICENSE file

Dependent cookbooks

yum >= 0.0.0
apt >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

CHANGELOG for blackfire cookbook

This file is used to list changes made in each version of blackfire cookbook.

2.1.0:

  • Add support for Amazon Linux

2.0.2:

  • Prevent agent restart when no server credentials are provided
  • Fix typo in generated agent configuration
  • Fix PHP server token documentation

2.0.1:

  • Fix missing probe credentials config
  • Force Blackfire repositories update on run

2.0.0:

  • Initial open-source release of blackfire cookbook
  • Added tests
  • Use Blackfire.io's API to retrieve versions
  • Added support for redhat based distributions

Collaborator Number Metric
            

2.1.0 passed this metric

Contributing File Metric
            

2.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

2.1.0 passed this metric

License Metric
            

2.1.0 passed this metric

No Binaries Metric
            

2.1.0 passed this metric

Publish Metric
            

2.1.0 passed this metric

Supported Platforms Metric
            

2.1.0 passed this metric

Testing File Metric
            

2.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

2.1.0 passed this metric