Skip to content

x-cray/marathon-registrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 14, 2016
fcea3d6 · Sep 14, 2016

History

58 Commits
Aug 30, 2016
Apr 15, 2016
Sep 14, 2016
Aug 30, 2016
Apr 15, 2016
Sep 14, 2016
Nov 18, 2015
Nov 18, 2015
Oct 6, 2015
Nov 18, 2015
Apr 15, 2016
Nov 4, 2015
Apr 15, 2016

Repository files navigation

Marathon Service Registrator

Build Status Docker Pulls

Consul service registry bridge for Marathon. It monitors services running by Marathon and syncs them to Consul. Heavily inspired by registrator.

Features

  • Automatically registers/deregisters Marathon tasks as services in Consul.
  • Updates service registry in real-time.
  • Uses new Marathon Event Stream (e.g. /v2/events) for getting service updates. No need to reconfigure Marathon to use webhooks.
  • Automatically cleans up dangling services from service registry.
  • Designed with extensibility in mind: service scheduler and service registry are abstractions which may have different implementations. Currently, there are only Marathon scheduler and Consul service registry implemented.

Installation

Usage

Options

Option Description
consul Address and port of Consul agent. Default: http://127.0.0.1:8500.
marathon URL of Marathon instance. Multiple instances may be specified in case of HA setup: http://addr1:8080,addr2:8080,addr3:8080. Default: http://127.0.0.1:8080.
resync-interval Time interval to resync Marathon services to determine dangling instances. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Default: 5m.
dry-run Do not perform actual service registration/deregistration. Just log intents.
log-level Set the logging level - valid values are "debug", "info", "warn", "error", and "fatal". Default: info.
syslog Send the log output to syslog.
force-colors Force colored log output.

Development

Install dependencies:

$ make deps

Run tests:

$ make test

Generate mocks for interfaces (run when you modify mocked type interface):

$ make mocks

License

MIT

About

Consul service registry bridge for Marathon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published