serfbort

command module
v0.0.0-...-c233a99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2015 License: Apache-2.0 Imports: 19 Imported by: 0

README

serfbort

Screwing around with serf for a more secure, distributed deploy system for app code

serfbort

NOTE This is a WIP, and I am most likely going to get bored of it and forget about it after 6 hours of work, and leave it in a broken, halfassed, unfinished state. Whatevs :)

Ideal features

  • support labeling hosts (weba, webb, canary)
  • support deploy to individual nodes
  • support deploy to tagged subsets
  • rotatable asymetric keys for deploy (i.e. if coordination node is compromised)
  • report version for app via external command (git rev-parse, whatever)
  • trigger deploy only from host holding master keys (i.e. coordination node listens for RPC, but not webs)
  • support multiple "applications" (app, config, creds) as separate deploys

Examples

TODO

TODO

  • make encryption work!!! we need to support separate encryption keys for serf, and rpc auth keys
  • hook shutdown properly for master+agent so they send leave messages
  • make agents rejoin cluster (tune settings for rejoin?)

Devving

Locally

You need go 1.4.2, because serf isnt happy with 1.5.x (yet!). To build, install dependent go tools and do the build with make:

$ make setup
$ make all

With Otto

Install otto: https://www.ottoproject.io/downloads.html

$ otto compile
$ otto dev

With docker-compose

On OSX, if you are using docker-machine and have docker-compose installed...

Create a docker-compose.yml with the helper script:

$ ./create-docker-compose.rb 4 > docker-compose.yml

Now run docker-compose:

$ eval "$(docker-machine env dev)"
$ docker-compose build
...
$ docker-compose up
...

If you want to hook into the network namespace of this compose cluster, make sure to add --net container:serfbort_serfnet_1 to your docker run command, like this:

$ docker run -ti --net container:serfbort_serfnet_1 serfbort_master cluster-status
4/4 hosts matching map[] []
Name    Addr    Tags                    Status
agent0  :::7947 map[]                   alive
master  :::7946 map[master:true]        alive
agent2  :::7949 map[]                   alive
agent1  :::7948 map[]                   alive
$ docker run -ti --net container:serfbort_serfnet_1 serfbort_master -config examples/config.json verify app 123
...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go.net/internal/iana
Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
+build go1.3
_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
_workspace/src/github.com/hashicorp/go-msgpack/codec
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
_workspace/src/github.com/hashicorp/go.net/ipv4
Package ipv4 implements IP-level socket options for the Internet Protocol version 4.
Package ipv4 implements IP-level socket options for the Internet Protocol version 4.
_workspace/src/github.com/hashicorp/go.net/ipv6
Package ipv6 implements IP-level socket options for the Internet Protocol version 6.
Package ipv6 implements IP-level socket options for the Internet Protocol version 6.
_workspace/src/github.com/hashicorp/logutils
Package logutils augments the standard log package with levels.
Package logutils augments the standard log package with levels.
_workspace/src/github.com/hashicorp/memberlist
memberlist is a library that manages cluster membership and member failure detection using a gossip based protocol.
memberlist is a library that manages cluster membership and member failure detection using a gossip based protocol.
_workspace/src/github.com/miekg/dns
Package dns implements a full featured interface to the Domain Name System.
Package dns implements a full featured interface to the Domain Name System.
_workspace/src/github.com/miekg/dns/idn
Package idn implements encoding from and to punycode as speficied by RFC 3492.
Package idn implements encoding from and to punycode as speficied by RFC 3492.
_workspace/src/github.com/mitchellh/mapstructure
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
_workspace/src/github.com/ugorji/go/codec
High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json.
High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json.
_workspace/src/github.com/ugorji/go/codec/codecgen
codecgen generates codec.Selfer implementations for a set of types.
codecgen generates codec.Selfer implementations for a set of types.
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL