Forge Home

nerve

This puppet module installs and configures Nerve as part of Airbnbs SmartStack

10,334 downloads

6,423 latest version

3.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.6 (latest)
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Dec 10th 2015

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'KyleAnderson-nerve', '0.0.6'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add KyleAnderson-nerve
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install KyleAnderson-nerve --version 0.0.6

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

KyleAnderson/nerve — version 0.0.6 Dec 10th 2015

#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',
  zk_hosts       => ["localhost:2181"],
  zk_path        => "/nerve/services/service1",
  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)

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