Code Monkey home page Code Monkey logo

chef-nsq's Introduction

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

chef-nsq's People

Contributors

mreiferson avatar elubow avatar moogar0880 avatar bschwartz avatar retr0h avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.