cookbook 'carbon-relay-ng', '~> 0.0.1'
carbon-relay-ng (1) Versions 0.0.1 Follow1
Installs/Configures carbon-relay-ng
cookbook 'carbon-relay-ng', '~> 0.0.1', :supermarket
knife supermarket install carbon-relay-ng
knife supermarket download carbon-relay-ng
Carbon-Relay-NG Cookbook
Chef coookbook to install and manage carbon-relay-ng.
Requirements
Depends on the cookbooks:
Platforms
- Centos 6+
- Amazon Linux
Usage
This is an attribute driven cookbook which means that the desired behaviour can be achieved by overriding attributes and including it as a recipe.
Attributes
default.rb
<table>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Description</th>
<th>Options</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['instance']</tt></td>
<td>String</td>
<td>carbon-relay-ng instance name</td>
<td>-</td>
<td><tt>'default'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['listen_addr']</tt></td>
<td>String</td>
<td>carbon-relay-ng listen address</td>
<td>-</td>
<td><tt>'0.0.0.0:2003'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['admin']['enabled']</tt></td>
<td>TrueClass/FalseClass</td>
<td>carbon-relay-ng admin interface enabled</td>
<td>true, false</td>
<td><tt>true</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['admin_addr']</tt></td>
<td>String</td>
<td>carbon-relay-ng admin address</td>
<td>-</td>
<td><tt>'0.0.0.0:2004'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['http_addr']['enabled']</tt></td>
<td>TrueClass/FalseClass</td>
<td>carbon-relay-ng http interface enabled</td>
<td>true, false</td>
<td><tt>true</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['http_addr']</tt></td>
<td>String</td>
<td>carbon-relay-ng http address</td>
<td>-</td>
<td><tt>'0.0.0.0:8081'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['bad_metrics_max_age']</tt></td>
<td>String</td>
<td>carbon-relay-ng bad metrics age</td>
<td>Time units 's', 'm', 'h' available</td>
<td><tt>'24h'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['log_level']</tt></td>
<td>String</td>
<td>carbon-relay-ng log level</td>
<td>'critical', 'error', 'warning', 'notice', 'info', 'debug'</td>
<td><tt>'warning'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['spool']['enabled']</tt></td>
<td>TrueClass/FalseClass</td>
<td>carbon-relay-ng spool enabled</td>
<td>true, false</td>
<td><tt>true</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['spool']['directory']</tt></td>
<td>String</td>
<td>carbon-relay-ng spool directory</td>
<td>-</td>
<td><tt>'/var/spool/carbon-relay-ng'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['config_dir']</tt></td>
<td>String</td>
<td>carbon-relay-ng configuration directory</td>
<td>-</td>
<td><tt>'/etc/carbon-relay-ng'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['log_dir']</tt></td>
<td>String</td>
<td>carbon-relay-ng log directory</td>
<td>-</td>
<td><tt>'/var/log/carbon'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['init']</tt></td>
<td>Array</td>
<td>carbon-relay-ng init rules</td>
<td>-</td>
<td><tt>['addBlack prefix collectd.localhost']</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['instrumentation']['graphite']['enabled']</tt></td>
<td>TrueClass/FalseClass</td>
<td>graphite reporting enabled</td>
<td>true, false</td>
<td><tt>false</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['instrumentation']['graphite_addr']</tt></td>
<td>String</td>
<td>graphite address</td>
<td>-</td>
<td><tt>nil</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['instrumentation']['graphite_interval']</tt></td>
<td>Integer</td>
<td>graphite reporting interval in ms</td>
<td>-</td>
<td><tt>1000</tt></td>
</tr>
</table>
supervisor.rb
<table>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Description</th>
<th>Options</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['supervisor']['process_name']</tt></td>
<td>String</td>
<td>-</td>
<td>-</td>
<td><tt>'carbon-relay-ng'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['supervisor']['stdout_logfile']</tt></td>
<td>String</td>
<td>-</td>
<td>-</td>
<td><tt>'#{node['carbon-relay-ng']['log_dir']}/carbon-relay-ng.log'</tt></td>
</tr>
<tr>
<td><tt>['carbon-relay-ng']['supervisor']['stderr_logfile']</tt></td>
<td>String</td>
<td>-</td>
<td>-</td>
<td><tt>'#{node['carbon-relay-ng']['log_dir']}/carbon-relay-ng.error.log'</tt></td>
</tr>
</table>
See the supervisor documentation for each attribute description.
go.rb
<table>
<tr>
<th>Attribute</th>
<th>Type</th>
<th>Description</th>
<th>Options</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['go']['bin']</tt></td>
<td>String</td>
<td>Go bin PATH</td>
<td>-</td>
<td><tt>'/opt/go/bin'</tt></td>
</tr>
<tr>
<td><tt>['go']['gopath']</tt></td>
<td>String</td>
<td>Go PATH</td>
<td>-</td>
<td><tt>'/opt/go'</tt></td>
</tr>
<tr>
<td><tt>['go']['owner']</tt></td>
<td>String</td>
<td>Go user</td>
<td>-</td>
<td><tt>'root'</tt></td>
</tr>
<tr>
<td><tt>['go']['group']</tt></td>
<td>String</td>
<td>Go group</td>
<td>-</td>
<td><tt>'root'</tt></td>
</tr>
</table>
Up the chain
The golang
and supervisor
cookbooks are also attribute driven - override them for the desired behaviour when installing.
See nodejs and supervisor for details.
Recipes
default.rb
Installs carbon-relay-ng and sets it up as a service using supervisord
.
Example
To install carbon-relay-ng:
Add the carbon-relay-ng
cookbook as a dependency:
depends 'carbon-relay-ng'
Include the carbon-relay-ng::default
recipe:
include_recipe 'carbon-relay-ng::default'
Overwrite the configuration attributes as you desire.
References
- carbon-relay-ng documentation
Development / Contributing
Dependencies
Installation
$ git clone git@github.com:Mindera/carbon-relay-ng-cookbook.git $ cd carbon-relay-ng-cookbook $ bundle install
Tests
To run unit tests (chefspec):
bash
$ bundle exec rake unit
To run lint tests (rubocop, foodcritic):
bash
$ bundle exec rake lint
To run integration tests (kitchen-ci, serverspec):
bash
$ bundle exec rake integration
Dependent cookbooks
supervisor ~> 0.4 |
golang ~> 1.5 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.0.1 passed this metric
Contributing File Metric
0.0.1 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
0.0.1 failed this metric
FC064: Ensure issues_url is set in metadata: carbon-relay-ng/metadata.rb:1
FC065: Ensure source_url is set in metadata: carbon-relay-ng/metadata.rb:1
FC066: Ensure chef_version is set in metadata: carbon-relay-ng/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.1 passed this metric
Testing File Metric
0.0.1 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
0.0.1 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 include a tag that matches this cookbook version number
0.0.1 passed this metric
0.0.1 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
0.0.1 failed this metric
FC064: Ensure issues_url is set in metadata: carbon-relay-ng/metadata.rb:1
FC065: Ensure source_url is set in metadata: carbon-relay-ng/metadata.rb:1
FC066: Ensure chef_version is set in metadata: carbon-relay-ng/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.1 passed this metric
Testing File Metric
0.0.1 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
0.0.1 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 include a tag that matches this cookbook version number
0.0.1 failed this metric
FC065: Ensure source_url is set in metadata: carbon-relay-ng/metadata.rb:1
FC066: Ensure chef_version is set in metadata: carbon-relay-ng/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.0.1 passed this metric
Testing File Metric
0.0.1 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
0.0.1 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 include a tag that matches this cookbook version number
0.0.1 failed this metric
0.0.1 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 include a tag that matches this cookbook version number