Consul service registry bridge for Marathon. It monitors services running by Marathon and syncs them to Consul.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Andreas Peters da8be46c42
freshup everything
1 week ago
bridge freshup everything 1 week ago
consul freshup everything 1 week ago
marathon freshup everything 1 week ago
types Fix deregistration of services with colliding exposed port numbers. Add docs, fix grammar 2 years ago
.gitignore freshup everything 1 week ago
Dockerfile freshup everything 1 week ago
Dockerfile.dev Rename repository 3 years ago
LICENSE Initial commit 3 years ago
Makefile Rename repository 3 years ago
README.md Add option description 2 years ago
VERSION Build Docker image, Travis build against 2 Go versions 3 years ago
registrator.go freshup everything 1 week ago

README.md

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