You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Hajira Jabeen <ha...@gmail.com> on 2015/07/01 15:07:36 UTC

step-step guide for New-to-Mesos

Hello,

Being new to Mesos (and everything related to big data),
I have been able to install mesos and run example frameworks.
Next step is to run tasks in containers in Mesos.

Do I have to write a framework for this , or just change the "ContainerInfo
etc." fields in Mesos.proto file ?

Is there any step-step working guide ?

Mesos documentation assumes a lot background knowledge, that I do not have
..

Any help and pointers will be appreciated ..

Regards

Hajira





On 30 June 2015 at 00:23, Andras Kerekes <an...@ishisystems.com>
wrote:

> Hi,
>
>
>
> Is there a preferred way to do service discovery in Mesos via mesos-dns
> running on CoreOS? I’m trying to implement a simple app which consists of
> two docker containers and one of them (A) depends on the other (B). What
> I’d like to do is to tell container A to use a fix dns name
> (containerB.marathon.mesos in case of mesos-dns) to find the other service.
> There are at least 3 different ways I think it can be done, but the 3 I
> found all have some shortcomings.
>
>
>
> 1.       Use SRV records to get the port along with the IP. Con: I’d
> prefer not to build the logic of handling SRV records into the app, it can
> be a legacy app that is difficult to modify
>
> 2.       Use haproxy on slaves and connect via a well-known port on
> localhost. Cons: the Marathon provided script does not run on CoreOS, also
> I don’t know how to run haproxy on CoreOS outside of a docker container. If
> it is running in a docker container, then how can it dynamically allocate
> ports on localhost if a new service is discovered in Marathon/Mesos?
>
> 3.       Use dedicated port to bind the containers to. Con: I can have
> only as many instances of a service as many slaves I have because they bind
> to the same port.
>
>
>
> What other alternatives are there?
>
>
>
> Thanks,
>
> Andras
>

Re: step-step guide for New-to-Mesos

Posted by Marco Massenzio <ma...@mesosphere.io>.
Hey Hajira,

you may find this blog entry useful:
https://mesosphere.com/blog/2015/04/02/continuous-deployment-with-mesos-marathon-docker/

A bit "older", but more specific to Docker, please have a look here:
https://mesosphere.github.io/marathon/docs/native-docker.html

generally speaking, there is a lot of info available at:
http://docs.mesosphere.com you could find useful too.

Obviously, you can launch containers using a very simple framework, but
that's largely not necessary; and most certainly, don't change the
mesos.proto contents (this will prevent a lot of stuff from working): that
is meant to be a "read-only" file (well, unless one is doing development on
Mesos itself).

We have made RENDLER publicly available as an example framework:
https://github.com/mesosphere/RENDLER

HTH

*Marco Massenzio*
*Distributed Systems Engineer*

On Wed, Jul 1, 2015 at 9:23 AM, haosdent <ha...@gmail.com> wrote:

> Sorry, marthon should be marathon <https://mesosphere.github.io/marathon/>
>
> On Wed, Jul 1, 2015 at 9:23 PM, haosdent <ha...@gmail.com> wrote:
>
>> Hi, @Hajira
>>
>> >Next step is to run tasks in containers in Mesos.
>> You want to run somethinng like web application in docker or others? You
>> could try marthon or other exist framework first. I think you don't need to
>> write a framework.
>>
>>
>> On Wed, Jul 1, 2015 at 9:07 PM, Hajira Jabeen <ha...@gmail.com>
>> wrote:
>>
>>>
>>> Hello,
>>>
>>> Being new to Mesos (and everything related to big data),
>>> I have been able to install mesos and run example frameworks.
>>> Next step is to run tasks in containers in Mesos.
>>>
>>> Do I have to write a framework for this , or just change the
>>> "ContainerInfo etc." fields in Mesos.proto file ?
>>>
>>> Is there any step-step working guide ?
>>>
>>> Mesos documentation assumes a lot background knowledge, that I do not
>>> have ..
>>>
>>> Any help and pointers will be appreciated ..
>>>
>>> Regards
>>>
>>> Hajira
>>>
>>>
>>>
>>>
>>>
>>> On 30 June 2015 at 00:23, Andras Kerekes <andras.kerekes@ishisystems.com
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> Is there a preferred way to do service discovery in Mesos via mesos-dns
>>>> running on CoreOS? I’m trying to implement a simple app which consists of
>>>> two docker containers and one of them (A) depends on the other (B). What
>>>> I’d like to do is to tell container A to use a fix dns name
>>>> (containerB.marathon.mesos in case of mesos-dns) to find the other service.
>>>> There are at least 3 different ways I think it can be done, but the 3 I
>>>> found all have some shortcomings.
>>>>
>>>>
>>>>
>>>> 1.       Use SRV records to get the port along with the IP. Con: I’d
>>>> prefer not to build the logic of handling SRV records into the app, it can
>>>> be a legacy app that is difficult to modify
>>>>
>>>> 2.       Use haproxy on slaves and connect via a well-known port on
>>>> localhost. Cons: the Marathon provided script does not run on CoreOS, also
>>>> I don’t know how to run haproxy on CoreOS outside of a docker container. If
>>>> it is running in a docker container, then how can it dynamically allocate
>>>> ports on localhost if a new service is discovered in Marathon/Mesos?
>>>>
>>>> 3.       Use dedicated port to bind the containers to. Con: I can have
>>>> only as many instances of a service as many slaves I have because they bind
>>>> to the same port.
>>>>
>>>>
>>>>
>>>> What other alternatives are there?
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Andras
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Haosdent Huang
>>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>

Re: step-step guide for New-to-Mesos

Posted by haosdent <ha...@gmail.com>.
Sorry, marthon should be marathon <https://mesosphere.github.io/marathon/>

On Wed, Jul 1, 2015 at 9:23 PM, haosdent <ha...@gmail.com> wrote:

> Hi, @Hajira
>
> >Next step is to run tasks in containers in Mesos.
> You want to run somethinng like web application in docker or others? You
> could try marthon or other exist framework first. I think you don't need to
> write a framework.
>
>
> On Wed, Jul 1, 2015 at 9:07 PM, Hajira Jabeen <ha...@gmail.com>
> wrote:
>
>>
>> Hello,
>>
>> Being new to Mesos (and everything related to big data),
>> I have been able to install mesos and run example frameworks.
>> Next step is to run tasks in containers in Mesos.
>>
>> Do I have to write a framework for this , or just change the
>> "ContainerInfo etc." fields in Mesos.proto file ?
>>
>> Is there any step-step working guide ?
>>
>> Mesos documentation assumes a lot background knowledge, that I do not
>> have ..
>>
>> Any help and pointers will be appreciated ..
>>
>> Regards
>>
>> Hajira
>>
>>
>>
>>
>>
>> On 30 June 2015 at 00:23, Andras Kerekes <an...@ishisystems.com>
>> wrote:
>>
>>> Hi,
>>>
>>>
>>>
>>> Is there a preferred way to do service discovery in Mesos via mesos-dns
>>> running on CoreOS? I’m trying to implement a simple app which consists of
>>> two docker containers and one of them (A) depends on the other (B). What
>>> I’d like to do is to tell container A to use a fix dns name
>>> (containerB.marathon.mesos in case of mesos-dns) to find the other service.
>>> There are at least 3 different ways I think it can be done, but the 3 I
>>> found all have some shortcomings.
>>>
>>>
>>>
>>> 1.       Use SRV records to get the port along with the IP. Con: I’d
>>> prefer not to build the logic of handling SRV records into the app, it can
>>> be a legacy app that is difficult to modify
>>>
>>> 2.       Use haproxy on slaves and connect via a well-known port on
>>> localhost. Cons: the Marathon provided script does not run on CoreOS, also
>>> I don’t know how to run haproxy on CoreOS outside of a docker container. If
>>> it is running in a docker container, then how can it dynamically allocate
>>> ports on localhost if a new service is discovered in Marathon/Mesos?
>>>
>>> 3.       Use dedicated port to bind the containers to. Con: I can have
>>> only as many instances of a service as many slaves I have because they bind
>>> to the same port.
>>>
>>>
>>>
>>> What other alternatives are there?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Andras
>>>
>>
>>
>
>
> --
> Best Regards,
> Haosdent Huang
>



-- 
Best Regards,
Haosdent Huang

Re: step-step guide for New-to-Mesos

Posted by haosdent <ha...@gmail.com>.
Hi, @Hajira

>Next step is to run tasks in containers in Mesos.
You want to run somethinng like web application in docker or others? You
could try marthon or other exist framework first. I think you don't need to
write a framework.


On Wed, Jul 1, 2015 at 9:07 PM, Hajira Jabeen <ha...@gmail.com>
wrote:

>
> Hello,
>
> Being new to Mesos (and everything related to big data),
> I have been able to install mesos and run example frameworks.
> Next step is to run tasks in containers in Mesos.
>
> Do I have to write a framework for this , or just change the
> "ContainerInfo etc." fields in Mesos.proto file ?
>
> Is there any step-step working guide ?
>
> Mesos documentation assumes a lot background knowledge, that I do not have
> ..
>
> Any help and pointers will be appreciated ..
>
> Regards
>
> Hajira
>
>
>
>
>
> On 30 June 2015 at 00:23, Andras Kerekes <an...@ishisystems.com>
> wrote:
>
>> Hi,
>>
>>
>>
>> Is there a preferred way to do service discovery in Mesos via mesos-dns
>> running on CoreOS? I’m trying to implement a simple app which consists of
>> two docker containers and one of them (A) depends on the other (B). What
>> I’d like to do is to tell container A to use a fix dns name
>> (containerB.marathon.mesos in case of mesos-dns) to find the other service.
>> There are at least 3 different ways I think it can be done, but the 3 I
>> found all have some shortcomings.
>>
>>
>>
>> 1.       Use SRV records to get the port along with the IP. Con: I’d
>> prefer not to build the logic of handling SRV records into the app, it can
>> be a legacy app that is difficult to modify
>>
>> 2.       Use haproxy on slaves and connect via a well-known port on
>> localhost. Cons: the Marathon provided script does not run on CoreOS, also
>> I don’t know how to run haproxy on CoreOS outside of a docker container. If
>> it is running in a docker container, then how can it dynamically allocate
>> ports on localhost if a new service is discovered in Marathon/Mesos?
>>
>> 3.       Use dedicated port to bind the containers to. Con: I can have
>> only as many instances of a service as many slaves I have because they bind
>> to the same port.
>>
>>
>>
>> What other alternatives are there?
>>
>>
>>
>> Thanks,
>>
>> Andras
>>
>
>


-- 
Best Regards,
Haosdent Huang