Public Repository

Last pushed: 3 years ago
Short Description
etcd and marathon based service discovery
Full Description

I'll document more in a while, but until then:

This will setup an haproxy in front of your services. This haproxy automatically configures itself, based on a template (using apache velocity), and a data source (currently etcd and/or marathon).

I built this because I'm using both Marathon and etcd to run services, and because apache velocity provides a much more robust / readable templating format compared to golang's.

I'll share the source code in due time.

run this image without arguments for a full list of command line options.


docker run \
    --name=${CONTAINER_NAME} \
    --rm \
    -p 8080:8080 \
    -p 4443:4443 \
    -p 1000:1000 \
    -v ${ARTIFACT_DIR}/certificates/:/opt/multicloud/discovery/pem/ \
    -v /dev/log:/dev/log \
    yaronr/discovery -etcdUrl http://$bridge_ip:4001 -marathonUrl http://marathon:8080 -templateFileUrl'

For Marathon services to be 'discovered' by this service, you need to supply additional environment variables as part of the Marathon application. For example:

"env": {

Take a look at the following templat to understand how this works, and create your own version:

Docker Pull Command