|
4 | 4 | Register [Marathon](https://mesosphere.github.io/marathon/) Tasks as [Consul](https://www.consul.io/) Services for service discovery.
|
5 | 5 |
|
6 | 6 | `marathon-consul` takes information provided by the [Marathon event bus](https://mesosphere.github.io/marathon/docs/event-bus.html) and
|
7 |
| -forwards it to Consul agents. It also re-syncs all the information from Marathon |
| 7 | +forwards it to Consul agents. It also re-syncs all the information from Marathon |
8 | 8 | to Consul on startup and repeats it with given interval.
|
9 | 9 |
|
| 10 | +## Code |
| 11 | + |
| 12 | +This project is based on |
| 13 | + |
| 14 | +* [mesos-consul](https://github.com/CiscoCloud/mesos-consul) |
| 15 | +* [marathon-consul](https://github.com/CiscoCloud/marathon-consul) |
| 16 | + |
| 17 | +### Differences |
| 18 | + |
| 19 | +* CiscoCloud/marthon-consul copies application information to Consul KV while |
| 20 | +allegro/marathon-consul registers tasks as Consul services |
| 21 | +(it is more similar to CiscoCloud/mesos-consul) |
| 22 | +* CiscoCloud/mesos-consul uses polling while allegro/marathon-consul uses |
| 23 | +[Marathon's event bus](https://mesosphere.github.io/marathon/docs/event-bus.html) |
| 24 | +to detect changes |
| 25 | +* CiscoCloud/marathon-consul is no longer developed |
| 26 | +(see [comment](https://github.com/CiscoCloud/marathon-consul/issues/17#issuecomment-161678453)) |
| 27 | + |
| 28 | + |
10 | 29 | ## Installation
|
11 | 30 |
|
12 | 31 | ### Installing from source code
|
@@ -69,6 +88,7 @@ curl -X POST 'http://marathon.service.consul:8080/v2/eventSubscriptions?callback
|
69 | 88 |
|
70 | 89 | ## Usage
|
71 | 90 |
|
| 91 | +- marathon-consul should be installed on all Marathon masters, and subscription should be set to `localhost` to reduce network traffic |
72 | 92 | - Consul Agents should be available at every Mesos Slave, tasks will be registered at hosts their run on.
|
73 | 93 | - Only tasks which are labeled as `consul` will be registered in Consul. By default the registered service name is equal to Marathon's application name.
|
74 | 94 | A different name can be provided as the label's value, e.g. `consul:customName`. As an exception of the rule, for backward compatibility with the `0.3.x` branch, a value of `true` is resolved to the default name.
|
@@ -130,17 +150,10 @@ The following section describes known limitations in `marathon-consul`.
|
130 | 150 |
|
131 | 151 | * Every marathon application needs to have a unique service name in Consul.
|
132 | 152 | * In Marathon when a deployment changing the application's service name (by changing its `labels`) is being stopped, it changes app's configuration anyway.
|
133 |
| - This means we loose the link between the app and the services registered with the old name in Consul. |
| 153 | + This means we loose the link between the app and the services registered with the old name in Consul. |
134 | 154 | Later on, if another deployment takes place, new services are registered with a new name, the old ones are not being deregistered though.
|
135 | 155 | A scheduled sync is required to wipe them out.
|
136 | 156 |
|
137 |
| -## Code |
138 |
| - |
139 |
| -This project is based on |
140 |
| - |
141 |
| -* [mesos-consul](https://github.com/CiscoCloud/mesos-consul) |
142 |
| -* [marathon-consul](https://github.com/CiscoCloud/marathon-consul) |
143 |
| - |
144 | 157 | ## License
|
145 | 158 |
|
146 | 159 | Marathon-consul is released under the Apache 2.0 license (see [LICENSE](LICENSE))
|
0 commit comments