Git Product home page Git Product logo

puppet-synapse's Introduction

#synapse

Build Status

Description

This puppet module configures Synapse, a service discovery system by Airbnb. Synapse configures a local HAproxy running on every node, configured dynamically from Zookeeper entries.

##Installation

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

###What this module affects

  • /etc/synapse/ for configs
  • Installs synapse (either via gem or system package
  • Installs and configures HAproxy

###HAproxy considerations

This module is incompatible with an existing instance of HAProxy running. Synapse overwrites the HAProxy config file.

##Usage Examples

Start off by getting synapse installed and running:

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

Now you can prep synapse for listening for services. Syntax is a little tricky, but follows the syntax in example configs. All parameters are validated, so puppet won't let you insert invalid syntax:

synapse::service { 'service1':
  default_servers => [
    {
      "name" => "default1",
      "host" => "localhost",
      "port" => 8422
    }
  ],
  discovery => {
    "method" => "zookeeper",
    "path"   => "/airbnb/service/service2",
    "hosts"  =>  [
      "zk0.airbnb.com:2181",
      "zk1.airbnb.com:2181"
    ]
  },
  haproxy => {
    "port"           => '3214',
    "server_options" => "check inter 2s rise 3 fall 2",
    "listen"         => [
      "mode http",
      "option httpchk /health",
    ]
  },
  ensure => 'present',
}

##Limitations

I assume that you are using a modern version of ruby on the puppetmaster. It outputs json, so either use ruby 1.9 with built in JSON or have the JSON gem available. Pull requests welcome for a better way to do this.

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

puppet-synapse's People

Contributors

solarkennedy avatar bobtfish 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.