You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aurora.apache.org by Adrian Fraisse <ad...@gmail.com> on 2016/05/12 15:26:57 UTC

Service discovery in Zookeeper

Hi dear Aurora friends !

I need to deploy services on Aurora with inter-dependencies between them. I am looking into using Aurora’s service discovery feature in conjonction with tellapart/aurproxy (https://github.com/tellapart/aurproxy) to allow my services to find each other.

However, I cannot get things to work. It seems that despite the fact that I use an Announcer object inside my configuration, Aurora doesn’t register my tasks into Zookeeper.

I have read the documentation over and over. Something bugs me in the Announcer object’s documentation : each task will be registered in the ServerSet /aurora/role/environment/jobname in the zookeeper ensemble configured by the executor. What is « the zookeeper ensemble configured by the executor » ? Does that mean there is some more tuning to be done on thermos in order to perform service discovery ?

Any though would be greatly appreciated !

Thanks.
Adrian

Re: Service discovery in Zookeeper

Posted by Adrian Fraisse <ad...@gmail.com>.
Thanks for the clarification. Once I feel a bit more comfortable with the service discovery feature I’ll gladly try to update the documentation :)
  
> Le 12 mai 2016 à 19:14, Joshua Cohen <jc...@apache.org> a écrit :
> 
> That's an assumption we don't necessarily want to make. We've found it beneficial to separate the ZK ensemble the scheduler uses for leader election and discovery of the Mesos master from the ZK ensemble that tasks use for service discovery. Additionally, the scheduler and Thermos are conceptually separate entities and we'd like to maintain that separation of concerns by not having the scheduler make any assumptions as far as what the scheduler expect. E.g. imagine the scenario where the --announce-ensemble flag is renamed, now instead of simply needing to update your scheduler config and restart, you need to rebuild the scheduler to pick up the change that knows about the new flag name.
> 
> That said, it's clear that the documentation is lacking in this regards. I'd welcome a patch that adds some instructions to https://github.com/apache/aurora/blob/master/docs/operations/configuration.md <https://github.com/apache/aurora/blob/master/docs/operations/configuration.md> detailing this executor flag and how to set it from the scheduler :).
> 
> On Thu, May 12, 2016 at 11:55 AM, Adrian Fraisse <adrian.fraisse@gmail.com <ma...@gmail.com>> wrote:
> Joshua,
> 
> Thanks a lot for your fast reply. I added the —announcer-ensemble flag and everything started to work as expected !
> Just a thought : wouldn’t it be simpler if this flag was set by default with the same value as the -zk_endpoint flag ?
> 
> Cheers,
> Adrian
> 
>> Le 12 mai 2016 à 18:20, Joshua Cohen <jcohen@apache.org <ma...@apache.org>> a écrit :
>> 
>> Yes, there is, in fact, some more tuning to be done! The executor takes a command line flag, --announcer-ensemble, which should be the host:port of your ZK ensemble where tasks should be announced. You can configure the flags passed to the executor when its launched via the -thermos_executor_flags (see: https://github.com/apache/aurora/blob/master/docs/reference/scheduler-configuration.md <https://github.com/apache/aurora/blob/master/docs/reference/scheduler-configuration.md> for all scheduler args) argument on the scheduler.
>> 
>> If you look at the aurora-scheduler.conf we use for our vagrant image, you can see an example of wiring this all together: https://github.com/apache/aurora/blob/master/examples/vagrant/upstart/aurora-scheduler.conf#L45 <https://github.com/apache/aurora/blob/master/examples/vagrant/upstart/aurora-scheduler.conf#L45>.
>> 
>> Cheers,
>> 
>> Joshua
>> 
>> On Thu, May 12, 2016 at 10:26 AM, Adrian Fraisse <adrian.fraisse@gmail.com <ma...@gmail.com>> wrote:
>> Hi dear Aurora friends !
>> 
>> I need to deploy services on Aurora with inter-dependencies between them. I am looking into using Aurora’s service discovery feature in conjonction with tellapart/aurproxy (https://github.com/tellapart/aurproxy <https://github.com/tellapart/aurproxy>) to allow my services to find each other.
>> 
>> However, I cannot get things to work. It seems that despite the fact that I use an Announcer object inside my configuration, Aurora doesn’t register my tasks into Zookeeper.
>> 
>> I have read the documentation over and over. Something bugs me in the Announcer object’s documentation : each task will be registered in the ServerSet /aurora/role/environment/jobname in the zookeeper ensemble configured by the executor. What is « the zookeeper ensemble configured by the executor » ? Does that mean there is some more tuning to be done on thermos in order to perform service discovery ?
>> 
>> Any though would be greatly appreciated !
>> 
>> Thanks.
>> Adrian
>> 
> 
> 


Re: Service discovery in Zookeeper

Posted by Joshua Cohen <jc...@apache.org>.
That's an assumption we don't necessarily want to make. We've found it
beneficial to separate the ZK ensemble the scheduler uses for leader
election and discovery of the Mesos master from the ZK ensemble that tasks
use for service discovery. Additionally, the scheduler and Thermos are
conceptually separate entities and we'd like to maintain that separation of
concerns by not having the scheduler make any assumptions as far as what
the scheduler expect. E.g. imagine the scenario where the
--announce-ensemble flag is renamed, now instead of simply needing to
update your scheduler config and restart, you need to rebuild the scheduler
to pick up the change that knows about the new flag name.

That said, it's clear that the documentation is lacking in this regards.
I'd welcome a patch that adds some instructions to
https://github.com/apache/aurora/blob/master/docs/operations/configuration.md
detailing this executor flag and how to set it from the scheduler :).

On Thu, May 12, 2016 at 11:55 AM, Adrian Fraisse <ad...@gmail.com>
wrote:

> Joshua,
>
> Thanks a lot for your fast reply. I added the —announcer-ensemble flag and
> everything started to work as expected !
> Just a thought : wouldn’t it be simpler if this flag was set by default
> with the same value as the -zk_endpoint flag ?
>
> Cheers,
> Adrian
>
> Le 12 mai 2016 à 18:20, Joshua Cohen <jc...@apache.org> a écrit :
>
> Yes, there is, in fact, some more tuning to be done! The executor takes a
> command line flag, --announcer-ensemble, which should be the host:port of
> your ZK ensemble where tasks should be announced. You can configure the
> flags passed to the executor when its launched via the
> -thermos_executor_flags (see:
> https://github.com/apache/aurora/blob/master/docs/reference/scheduler-configuration.md
> for all scheduler args) argument on the scheduler.
>
> If you look at the aurora-scheduler.conf we use for our vagrant image, you
> can see an example of wiring this all together:
> https://github.com/apache/aurora/blob/master/examples/vagrant/upstart/aurora-scheduler.conf#L45
> .
>
> Cheers,
>
> Joshua
>
> On Thu, May 12, 2016 at 10:26 AM, Adrian Fraisse <adrian.fraisse@gmail.com
> > wrote:
>
>> Hi dear Aurora friends !
>>
>> I need to deploy services on Aurora with inter-dependencies between them.
>> I am looking into using Aurora’s service discovery feature in conjonction
>> with tellapart/aurproxy (https://github.com/tellapart/aurproxy) to allow
>> my services to find each other.
>>
>> However, I cannot get things to work. It seems that despite the fact that
>> I use an Announcer object inside my configuration, Aurora doesn’t register
>> my tasks into Zookeeper.
>>
>> I have read the documentation over and over. Something bugs me in the
>> Announcer object’s documentation : each task will be registered in the
>> ServerSet /aurora/role/environment/jobname in the* zookeeper ensemble
>> configured by the executor. *What is « the zookeeper ensemble configured
>> by the executor » ? Does that mean there is some more tuning to be done on
>> thermos in order to perform service discovery ?
>>
>> Any though would be greatly appreciated !
>>
>> Thanks.
>> Adrian
>>
>
>
>

Re: Service discovery in Zookeeper

Posted by Adrian Fraisse <ad...@gmail.com>.
Joshua,

Thanks a lot for your fast reply. I added the —announcer-ensemble flag and everything started to work as expected !
Just a thought : wouldn’t it be simpler if this flag was set by default with the same value as the -zk_endpoint flag ?

Cheers,
Adrian

> Le 12 mai 2016 à 18:20, Joshua Cohen <jc...@apache.org> a écrit :
> 
> Yes, there is, in fact, some more tuning to be done! The executor takes a command line flag, --announcer-ensemble, which should be the host:port of your ZK ensemble where tasks should be announced. You can configure the flags passed to the executor when its launched via the -thermos_executor_flags (see: https://github.com/apache/aurora/blob/master/docs/reference/scheduler-configuration.md <https://github.com/apache/aurora/blob/master/docs/reference/scheduler-configuration.md> for all scheduler args) argument on the scheduler.
> 
> If you look at the aurora-scheduler.conf we use for our vagrant image, you can see an example of wiring this all together: https://github.com/apache/aurora/blob/master/examples/vagrant/upstart/aurora-scheduler.conf#L45 <https://github.com/apache/aurora/blob/master/examples/vagrant/upstart/aurora-scheduler.conf#L45>.
> 
> Cheers,
> 
> Joshua
> 
> On Thu, May 12, 2016 at 10:26 AM, Adrian Fraisse <adrian.fraisse@gmail.com <ma...@gmail.com>> wrote:
> Hi dear Aurora friends !
> 
> I need to deploy services on Aurora with inter-dependencies between them. I am looking into using Aurora’s service discovery feature in conjonction with tellapart/aurproxy (https://github.com/tellapart/aurproxy <https://github.com/tellapart/aurproxy>) to allow my services to find each other.
> 
> However, I cannot get things to work. It seems that despite the fact that I use an Announcer object inside my configuration, Aurora doesn’t register my tasks into Zookeeper.
> 
> I have read the documentation over and over. Something bugs me in the Announcer object’s documentation : each task will be registered in the ServerSet /aurora/role/environment/jobname in the zookeeper ensemble configured by the executor. What is « the zookeeper ensemble configured by the executor » ? Does that mean there is some more tuning to be done on thermos in order to perform service discovery ?
> 
> Any though would be greatly appreciated !
> 
> Thanks.
> Adrian
> 


Re: Service discovery in Zookeeper

Posted by Joshua Cohen <jc...@apache.org>.
Yes, there is, in fact, some more tuning to be done! The executor takes a
command line flag, --announcer-ensemble, which should be the host:port of
your ZK ensemble where tasks should be announced. You can configure the
flags passed to the executor when its launched via the
-thermos_executor_flags (see:
https://github.com/apache/aurora/blob/master/docs/reference/scheduler-configuration.md
for all scheduler args) argument on the scheduler.

If you look at the aurora-scheduler.conf we use for our vagrant image, you
can see an example of wiring this all together:
https://github.com/apache/aurora/blob/master/examples/vagrant/upstart/aurora-scheduler.conf#L45
.

Cheers,

Joshua

On Thu, May 12, 2016 at 10:26 AM, Adrian Fraisse <ad...@gmail.com>
wrote:

> Hi dear Aurora friends !
>
> I need to deploy services on Aurora with inter-dependencies between them.
> I am looking into using Aurora’s service discovery feature in conjonction
> with tellapart/aurproxy (https://github.com/tellapart/aurproxy) to allow
> my services to find each other.
>
> However, I cannot get things to work. It seems that despite the fact that
> I use an Announcer object inside my configuration, Aurora doesn’t register
> my tasks into Zookeeper.
>
> I have read the documentation over and over. Something bugs me in the
> Announcer object’s documentation : each task will be registered in the
> ServerSet /aurora/role/environment/jobname in the* zookeeper ensemble
> configured by the executor. *What is « the zookeeper ensemble configured
> by the executor » ? Does that mean there is some more tuning to be done on
> thermos in order to perform service discovery ?
>
> Any though would be greatly appreciated !
>
> Thanks.
> Adrian
>