Name: blackfire-cookbook
Owner: Blackfire
Description: Chef cookbook for Blackfire
Created: 2015-02-11 15:09:38.0
Updated: 2017-09-22 13:45:43.0
Pushed: 2017-08-18 13:56:54.0
Homepage: https://blackfire.io/
Size: 26
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This cookbook installs and configures the blackfire stack.
The following attributes are available to affect the installation/configuration of the Backfire stack
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 1node['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”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)Add agent Server ID and token and include blackfire
in your node's run_list
:
ame":"my_node",
un_list": [
"recipe[blackfire]"
lackfire": {
"agent": {
"server_id": "my-agent-server-id",
"server_token": "my-agent-server-token"
}
Used if you wish to install only the agent.
Used if you wish to install only the PHP extension.
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):
ude_recipe "blackfire"
n
= resources(:ruby_block => "blackfire-php-restart-webserver")
block do
d
notifies :reload, "service[php5-fpm]"
ue Chef::Exceptions::ResourceNotFound
ef::Log.warn 'could not find resource "ruby_block[blackfire-php-restart-webserver]" to override!'
add_component_x
)Three test suites exist:
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.
You need stove to publish the cookbook on
supermarket. Once it's done use rake publish
right:: 2014-2016 Blackfire.io
LICENSE file