- Description
- Setup - The basics of getting started with blackfire
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Puppet module for installing, configuring and managing Blackfire PHP profiler.
- The module adds blackfire repository and overwrites blackfire configuration file.
- It does not restart any service, you have to do it manually.
Make sure blackfire is installed after PHP.
The module includes a single public class blackfire
.
You need to provide at least server_id
and server_token
parameters.
Also you might want to subscribe your service to be restarted when configuration has changed:
class { 'blackfire':
server_id => 'b54114a9-df8a-563b-8ba3-e5457155010e',
server_token => '7315b1cf617bf51575ba463e813156ed97c85d8ca5c5691db37bbfe36a622a4f',
notify => Service['php5-fpm']
}
You can get these parameters on https://blackfire.io/account/credentials.
If you want to provide additional parameters to Agent or PHP extension:
class { 'blackfire':
server_id => 'b54114a9-df8a-563b-8ba3-e5457155010e',
server_token => '7315b1cf617bf51575ba463e813156ed97c85d8ca5c5691db37bbfe36a622a4f',
agent => {
log_level => 2
},
php => {
log_level => 3
}
}
blackfire
: Main class
blackfire::agent
: Manages the Agentblackfire::agent::install
: Handles the packages.blackfire::agent::config
: Handles the configuration file.blackfire::agent::service
: Handles the service.blackfire::php
: Manages the PHP extension (Probe)blackfire::php::install
: Handles the packages.blackfire::php::config
: Handles the configuration file.blackfire::repo
: Handles the repository.
agent
- Configuration for Blackfire Agentca_cert
- PEM encoded certicatescollector
- URL of Blackfire's data collector. Default is https://blackfire.iohttp_proxy
- Http proxy to usehttps_proxy
- Https proxy to uselog_file
- The path of the log file. Use "stderr" to log to stderr. Default is stderrlog_level
- Log verbosity level (4: debug, 3: info, 2: warning, 1: error). Default is 1manage
- Manage Agent. Default is truemanage_service
- Manage Agent service. Default is trueservice_ensure
- Default is runningsocket
- The socket the agent will listen to. Default is unix:///var/run/blackfire/agent.sockspec
- The path to the json specifications fileversion
- Which version of the agent to install. Default is latest
manage_repo
- Manage Blackfire repository. Default is truephp
- Configuration for Blackfire PHP extensionagent_socket
- The agent socket. Default is unix:///var/run/blackfire/agent.sockagent_timeout
- The agent timeout. Default 0.25log_file
- The path of the log file.log_level
- Log verbosity level (4: debug, 3: info, 2: warning, 1: error). Default is 1manage
- Manage PHP extension. Default is trueversion
- Which version of the probe to install. Default is latestini_path
- Path of the blackfire.ini file to be generated. If not set, will try find out the path by installed PHP Version. Default is empty
server_id
- Server ID to use for the agent (See https://blackfire.io/account/credentials)server_token
- Server Token to use for the agent (See https://blackfire.io/account/credentials)
This module is currently tested on:
- Ubuntu (16.04, 14.04, 12.04, 10.04)
- Centos (7.0, 6.6)
- Debian (8.0, 7.8, 6.0)
It may work on other distros.
bundle exec rake validate
- Check syntax of Ruby files and call :syntax and :metadata / Validate manifests, templates, and ruby filesbundle exec rake lint
- Check puppet manifests with puppet-lint / Run puppet-lintbundle exec rake spec
- Run spec tests in a clean fixtures directory (using spec_helper)
bundle exec rake beaker_nodes
- List available beaker nodesetsBLACKFIRE_SERVER_ID=... BLACKFIRE_SERVER_TOKEN=... bundle exec rake beaker
- Run beaker acceptance tests (default nodeset)BEAKER_set=centos-70-x64 BLACKFIRE_SERVER_ID=... BLACKFIRE_SERVER_TOKEN=... bundle exec rake beaker
- Run beaker acceptance tests for the nodeset