Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

carbon (2) Versions 0.3.2

Installs/Configures carbon

Policyfile
Berkshelf
Knife
cookbook 'carbon', '~> 0.3.2', :supermarket
cookbook 'carbon', '~> 0.3.2'
knife supermarket install carbon
knife supermarket download carbon
README
Dependencies
Quality 17%

Description

This cookbook provides two resources and providers to install and configure Graphite Carbon {Cache:Relay} under virtualenv. Currently supported resources:

  • Carbon Relay (relay)
  • Carbon Cache (cache)

Requirements

  1. Ubuntu 12.04 Has been tested, other versions may work.
  2. Python Provides virtualenv support and the pip provider
  3. graphite Installs the Graphite Web Service to display Metrics stored by Carbon Cache

Recipes

default.rb

The default recipe does absolutely nothing. It is not intended to do anything

Resources and Providers

This cookbook provides two resource and corresponding providers.

install.rb

Installs Carbon Cache from either Pypi or Github

Actions:

  • install - installs carbon-cache from Pypi
  • git - installs carbon-cache via git

Attribute Parameters:

  • carbon_stable_base_git_uri - String - default - https://github.com/graphite-project/
  • carbon_stable_packages - Hash - default - { "whisper" => "0.9.x", "carbon" => "0.9.x" }
  • graphite_home - String - default - /opt/graphite
  • user - String - default - graphite
  • carbon_packages - Hash - { "whisper" => "0.9.10", "carbon" => "0.9.10" }

cache.rb

Installs and Configures Carbon Cache from

Actions:

  • create - configures carbon-cache
  • start - starts carbon-cache
  • stop - stops carbon-cache

Attribute Parameters:

  • cookbook - String - default - carbon - cookbook to fetch all templates from
  • python_interpreter - String - default - python2.7
  • carbon_template_source - String - default - carbon.conf.erb
  • storage_template_source - String - default - storage-schemas.conf.erb
  • cpu_affinity - String
  • options - Hash
  • user - String - default - graphite
  • group - String - default - graphite
  • max_cache_size - String - default - inf
  • max_updates_per_second - Fixnum - default - 5000
  • max_creates_per_minute - Fixnum - default - 100
  • line_listner - Hash - default - {"line_receiver_interface" => "0.0.0.0", "line_receiver_port" => 2003 }
  • pickle_listner - Hash - default - {"pickle_receiver_interface" => "0.0.0.0", "pickle_receiver_port" => 2004 }
  • udp_listner - Hash - default - {"enable_udp_listner" => "False", "udp_receiver_interface" => "0.0.0.0", "udp_receiver_port" => 2003 }
  • use_insecure_pickler - String - default - False
  • use_flow_control - String - default - True
  • cache_query - Hash - default - {"cache_query_interface" => "0.0.0.0", "cache_query_port" => 7002 }
  • log_updates - String - default - False
  • whisper_autoflush - String - default - False
  • enable_amqp - String - default - False
  • amqp_verbose - String - default - False
  • amqp - Hash - default - {"amqp_host" => "localhost", "amqp_port" => 5672, "amqp_vhost" => "/", "amqp_user" => "guest", "amqp_password" => "guest", "amqp_exchange" => "graphite", "amqp_metric_name_in_body" => "False" }
  • bind_patterns - Array - default - "#"
  • graphite_home - String - default - /opt/graphite
  • carbon_packages - Hash - default - { "whisper" => "0.9.10", "carbon" => "0.9.10" }
  • carbon_instance - String - default - a
  • storage_schema - Hash - default - { :all => { :pattern => "(.*)", :retentions => "10s:90d, 60s:1y" } }
  • storage_aggregation - Hash - default - { }
  • local_data_dir - String - default - /opt/graphite/storage/whisper
  • init_style - String - default - runit

relay.rb

Configures Carbon Relay

Actions:

  • create - configures carbon-relay
  • start - starts carbon-relay
  • stop - stops carbon-relay
  • disable - disables carbon-relay

Attribute Parameters:

  • cookbook - String - carbon - name of the cookbook to get templates from
  • options - Hash
  • relay_rules - Hash - default - {"default" => { "default" => "true"' - "destinations" => ["127.0.0.1:2004"]' - "continue" => "false"' - "pattern" => String.new } }
  • line_listner - Hash - default - {"line_receiver_interface" => "0.0.0.0"' - "line_receiver_port" => 2013 }
  • pickle_listner - Hash - default {"pickle_receiver_interface" => "0.0.0.0"' - "pickle_receiver_port" => 2014 }
  • relay_method - String - default - consistent-hashing
  • replication_factor - Fixnum - default - 1
  • destinations - Array' - default - ["127.0.0.1:2004:a"]
  • max_datapoints_per_message - Fixnum - default 500
  • max_queue_size - Fixnum - default - 10000
  • use_flow_control - String - default - True
  • graphite_home - String - default - /opt/graphite - location to install graphite to
  • relay_instance - String - default - a
  • user - String - default - graphite - username to install graphite under
  • group - String - default - graphite - group to install graphite under
  • python_interpreter - String - default - python2.7
  • relay_template_source - String - default - carbon-relay.conf.erb
  • relay_init_template - String - default - carbon-relay.init.erb
  • init_style - String' - default - runit
  • cpu_affinity - String - Specifies which cpu to bind the carbon-relay process to
  • relay_rules_template_source - String - default - relay-rules.conf.erb

Usage

This is the most basic example you are not limited by this example.

cd chef-repo/cookbooks

git submodule add git://github.com/damm/carbon.git

git submodule add git://github.com/damm/graphite.git

COOKBOOK=graphite_infra rake new_cookbook

  • The cookbook named graphite_infra must depend on the carbon cookbook.

    carbon_cache "my_carbon" do
    action [:install,:config,:start]

    cpu_affinity "1"

    end

    carbon_relay "sample" do

    action [:config,:start]

    end

  • For better examples please review our Tests

License and Author

Author:: Scott M. Likens scott@spam.likens.us

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.

Collaborator Number Metric
            

0.3.2 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.3.2 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.3.2 failed this metric

FC009: Resource attribute not recognised: carbon/providers/install.rb:7
FC064: Ensure issues_url is set in metadata: carbon/metadata.rb:1
FC065: Ensure source_url is set in metadata: carbon/metadata.rb:1
FC066: Ensure chef_version is set in metadata: carbon/metadata.rb:1
FC069: Ensure standardized license defined in metadata: carbon/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: carbon/resources/cache.rb:1
FC074: LWRP should use DSL to define resource's default action: carbon/resources/install.rb:1
FC074: LWRP should use DSL to define resource's default action: carbon/resources/relay.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: carbon/providers/relay.rb:59
FC121: Cookbook depends on cookbook made obsolete by Chef 14: carbon/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.3.2 passed this metric

Testing File Metric
            

0.3.2 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.3.2 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