Version information
released Sep 9th 2021
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
- Puppet >=5.0.0 <7.0.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'pest-blackfire', '2.0.0'
Learn more about managing modules with a PuppetfileDocumentation
pest/blackfire — version 2.0.0 Sep 9th 2021
This module was forked from s12v-blackfire.
blackfire
Table of Contents
- 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
Description
Puppet module for installing, configuring and managing Blackfire PHP profiler.
Setup
What blackfire affects
- The module adds blackfire repository and overwrites blackfire configuration file.
- It does not restart any service, you have to do it manually.
Setup requirements
Make sure blackfire is installed after PHP.
Beginning with blackfire
The module includes a single public class blackfire
.
Minimal configuration
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.
Usage
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
}
}
Reference
Classes
Public classes
blackfire
: Main class
Private classes
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.
Parameters
Available parameters for blackfire class
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)
Limitations
This module is currently tested on:
- Debian (9, 10)
It may work on other distros.
Development
Module testing
pdk validate
- Check syntax of Ruby files and call :syntax and :metadata / Validate manifests, templates, and ruby filespdk test unit
- Run unit tests
2.0.0 (2021.09.09)
- Added datatypes and datatype checks
- Switch to blackfire v2 agent
- Minimal code cleanup
1.6.1 (2019.02.18)
- apt keys changed
1.6.0 (2016.09.04)
- Ubuntu 16.04 support
1.5.2 (2016.04.22)
- Fix for
manage
parameter forblackfire::php
(@Schnitzel)
1.5.1 (2016.03.08)
- Hotfix for
ini_path
(@Schnitzel)
1.5.0 (2016.03.07)
- Added new parameter
ini_path
(@Schnitzel)
1.4.2 (2016.03.03)
- Bound PE dependency
1.4.1 (2016.02.27)
- Update README and bound apt dependency
1.4.0 (2015.12.05)
- Puppet 4 compatibility
- Handle
log_level
passed as a string (@jtreminio) - Added apt to manifest as a dependency
1.3.0 (2015.06.01)
- Added support for puppetlabs-apt 2.0
- Added support for Debian 8
- CentOS bugfixes
1.2.2 (2015.04.08)
- Bugfixes
1.2.1 (2015.04.06)
- Fixed refreshes
- Debian 6 support
Dependencies
- puppetlabs/apt (>= 2.0.0 < 8.0.0)
- puppetlabs/inifile (>= 1.0.0 < 4.0.0)
- puppetlabs/stdlib (>= 4.18.0 < 7.0.0)
Copyright 2015 Sergey Novikov 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.