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

chef-nsq (1) Versions 1.2.0

Installs/Configures nsqd, nsqlookupd, and nsqadmin

Policyfile
Berkshelf
Knife
cookbook 'chef-nsq', '~> 1.2.0', :supermarket
cookbook 'chef-nsq', '~> 1.2.0'
knife supermarket install chef-nsq
knife supermarket download chef-nsq
README
Dependencies
Changelog
Quality 17%

chef-nsq

Installs and configures NSQ.

Requirements

Chef

Chef version 0.10.10+ and Ohai 0.6.12+ are required.

Platform

  • Ubuntu 12.10

Notes: This cookbook has been tested on the listed platforms only. It may work on other platforms with modification.

Attributes

Each of the attributes come with a default setting. Read the files in the attributes/ directory for a full description of what each setting does along with its default value.

Recipes

default

Includes the chef-nsq recipe to install the base NSQ packages.

Data Bags

None.

Roles

There are 3 primary roles used for setting up NSQ:

nsqadmin - This role is to add nsqadmin to a host.

name 'nsqadmin'
description 'nsqadmin'
run_list(
    'recipe[nsq::nsqadmin]'
)

default_attributes(
    nsq: {
        version: '0.2.24',
        go_version: 'go1.1.2'
    }
)

nsqd - This role is add an nsqd to a host.

name 'nsqd'
description 'nsqd'
run_list(
    'recipe[nsq::nsqd]'
)

default_attributes(
  nsq: {
    version: '0.2.24',
    go_version: 'go1.1.2'
  }
)

nsqlookupd - This role adds an nsqlookupd instance to a host.

name 'nsqlookupd'
description 'nsqlookupd'
run_list(
    'recipe[nsq::nsqlookupd]'
)

default_attributes(
    nsq: {
        version: '0.2.24',
        go_version: 'go1.1.2'
    }
)

Definitions

None

Libraries

None

Resources/Providers

None

Usage

Setup

In the environment.rb file relevant to your environment, it is useful to specify the static hostnames of your lookup nodes. You can put these addresses in DNS to make replacement easier.

nsq: {
  nsqd: {
    lookupd_tcp_address: (1..3).map{|i| "lookup-00#{i}.nsq.example.com:4160" },
    lookupd_http_address: (1..3).map{|i| "lookup-00#{i}.nsq.example.com:4161" },
    statsd_interval: '60s'
  }
}

Once you have setup the lookup servers, you can optionally setup nsqadmin. nsqadmin can easily be deployed to any host with a statsd graphite host optional. These attributes can also be set in your environment.

nsq: {
  nsqadmin: {
    statsd_interval: '60s',
    graphite_url: 'http://graphite-001.example.com',
    proxy_graphite: true,
    use_statsd_prefixes: false
  }
}

After the lookup servers are up and running, you can setup nsqd. To add nsqd to any host, just add the role listed above to any other host role. This will install and setup nsqd with the default attributes to listen on localhost.

Testing

$ rake

Authors

Dependent cookbooks

ark >= 0.1.0
users >= 0.1.5

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

  • 1.1.3 - Fixed bug where only_if failed to execute due to quoting
  • 1.1.2 - Added support for the to_nsq utility when installing 0.2.30 and above.
  • 1.0.0 - Initial Release

Collaborator Number Metric
            

1.2.0 failed this metric

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

Contributing File Metric
            

1.2.0 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
            

1.2.0 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: chef-nsq/recipes/default.rb:12
FC007: Ensure recipe dependencies are reflected in cookbook metadata: chef-nsq/recipes/nsqadmin.rb:11
FC007: Ensure recipe dependencies are reflected in cookbook metadata: chef-nsq/recipes/nsqd.rb:11
FC007: Ensure recipe dependencies are reflected in cookbook metadata: chef-nsq/recipes/nsqlookupd.rb:11
FC064: Ensure issues_url is set in metadata: chef-nsq/metadata.rb:1
FC065: Ensure source_url is set in metadata: chef-nsq/metadata.rb:1
FC066: Ensure chef_version is set in metadata: chef-nsq/metadata.rb:1
FC120: Do not set the name property directly on a resource: chef-nsq/recipes/default.rb:42
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

1.2.0 passed this metric

Testing File Metric
            

1.2.0 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
            

1.2.0 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