Git Product home page Git Product logo

puppet-nerve's Introduction

#nerve Build Status

##Overview

This puppet module installs and configures Nerve as part of Airbnb's SmartStack.

It allows you to dynamically register services in Zookeeper. See also Puppet-Synapse to configure the Synapse side of SmartStack: a local HAproxy that allows your services to find other services registered in zookeeper, by only needing to connect to localhost.

##Installation

puppet module install KyleAnderson/nerve
# Or librarian-puppet, r10k, whatever

##Usage

Default settings ensure present, and use system packages:

include nerve

Use gem install:

class { 'nerve': 
  package_provider => 'gem'
}

Use system packages, latest, but not running:

class { 'nerve':
  package_ensure => 'latest',
  service_ensure => 'stopped',
}

See init.pp or params.pp for more fields you can override. You can do things like:

  • instance_id (defaults to $::fqdn)
  • config_file (defaults to /etc/nerve/nerve.conf.json)
  • config_dir (defaults to /etc/nerve/conf.d/)
  • etc.

Registering Services

These are the defaults (Everything optional except for port):

nerve::register { 'service1':
  port           => '3000',
  target         => '/etc/nerve/conf.d/service1.json',
  host           => '127.0.0.1',
  service_hosts  => ["localhost:2181"],
  service_path   => "/nerve/services/service1",
  service_type   => 'zookeeper',
  check_interval => '2',
  checks         => [
    {
      'type' => 'http',
      'uri'  => '/health',
      'timeout' => '0.2',
      'rise'    => '3',
      'fall'    => '2'
    }
  ],
}

zk_hosts is an array of strings. Checks is an array of hashes.

##Limitations

The OS support assumes that rubygem-nerve is available or gem install nerve is functioning. (depending on the provider you specify)

TODO: More init script stuff (more than upstart) and rspec-system tests.

##Development Open an issue or fork and open a Pull Request

puppet-nerve's People

Contributors

solarkennedy avatar

Watchers

Alan Smith avatar James Cloos 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.