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.
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):