Installing Blackfire with Chef
Blackfire fully supports Chef to ease the installation of Blackfire.
At Blackfire, we want to make profiling easier and simpler, even in production!
Blackfire’s stack is safe to be used in production, but you probably don’t want to install everything by hand on your production infrastructure, neither do we!
To help anyone setup Blackfire in a production environment, we’ve just open-sourced our internal Chef cookbook used to provision Blackfire.
As an added bonus, the cookbook automatically updates Blackfire packages to the latest versions when needed.
To use it, just install the
blackfire cookbook as you do for every other cookbook using
librarian-chef and include
blackfire in your node’s run_list:
And define your server credentials as attributes (you can retrieve them in your account page):
node['blackfire']['agent']['server_id'] = 'my_server_id'
node['blackfire']['agent']['server_token'] = 'my_server_token'
You can also only install the agent using the
blackfire::agent recipe or only the probe using the
Note: Our cookbook (as our packages) makes no assumptions about the webserver you are using, therefore you need to write a wrapper to reload your webserver accordingly, you can read our README for more information.
We would like to thank Olivier Dolbeau for maintaining the previous version of the cookbook while we were preparing to open source our version.
Happy production profiling!