It is possible for the Aurora executor to announce tasks into ServerSets for the purpose of service discovery. ServerSets use the Zookeeper group membership pattern of which there are several reference implementations:
These can also be used natively in Finagle using the ZookeeperServerSetCluster.
For more information about how to configure announcing, see the Configuration Reference.
Experimental support for populating DiscoveryInfo in Mesos is introduced in Aurora. This can be used to build
custom service discovery system not using zookeeper. Please see Service Discovery
section in
Mesos Framework Development guide for
explanation of the protobuf message in Mesos.
To use this feature, please enable --populate_discovery_info
flag on scheduler. All jobs started by scheduler
afterwards will have their portmap populated to Mesos and discoverable in /state
endpoint in Mesos master and agent.
An example is using Mesos-DNS, which is able to generate multiple DNS
records. With current implementation, the example job with key devcluster/vagrant/test/http-example
generates at
least the following:
- An A record for
http_example.test.vagrant.aurora.mesos
(which only includes IP address); - A SRV record for
_http_example.test.vagrant._tcp.aurora.mesos
, which includes IP address and every port. This should only be used if the service has one port. - A SRV record
_{port-name}._http_example.test.vagrant._tcp.aurora.mesos
for each port name defined. This should be used when the service has multiple ports.
Things to note:
- The domain part (".mesos" in above example) can be configured in Mesos DNS;
- Right now, portmap and port aliases in announcer object are not reflected in DiscoveryInfo, therefore not visible in Mesos DNS records either. This is because they are only resolved in thermos executors.