You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Marc Roos <M....@f1-outsourcing.eu> on 2019/10/11 22:25:51 UTC

Mesos task example json


Is there some example json available with all options for use with 
'mesos-execute --task='


RE: Advice on alternative for marathon framework

Posted by Marc Roos <M....@f1-outsourcing.eu>.
 

Thanks Tomek, have it running, giving it a try.


-----Original Message-----
To: user
Subject: Re: Advice on alternative for marathon framework

You can try https://github.com/HubSpot/Singularity
Aurora was moved to attic <https://attic.apache.org/> 


śr., 15 lip 2020 o 16:29 Marc Roos <M....@f1-outsourcing.eu> 
napisał(a):




	I am having problems[1] getting marathon to run since march (can 
only 
	run 1.7) and the only emails I receive from d2iq is how to rate 
their 
	support. I wonder if this Marathon is still best to be used with 
mesos. 
	I have aurora running, but it looks to have less options.
	
	What I like about the Marathon framework is of course the web 
interface 
	and some plugins that allowed me to use capabilities. I know I 
	should/could launch application directly in mesos via the command 
line. 
	But I am just starting with the mesos and I prefer now to have a 
gui.
	
	Can anyone advice on a good alternative to marathon?
	
	
	[1]
	https://jira.d2iq.com/browse/MARATHON-8729
	https://github.com/mesosphere/marathon/issues/7136
	



Re: Advice on alternative for marathon framework

Posted by Tomek Janiszewski <ja...@gmail.com>.
You can try https://github.com/HubSpot/Singularity
Aurora was moved to attic <https://attic.apache.org/>

śr., 15 lip 2020 o 16:29 Marc Roos <M....@f1-outsourcing.eu> napisał(a):

>
>
> I am having problems[1] getting marathon to run since march (can only
> run 1.7) and the only emails I receive from d2iq is how to rate their
> support. I wonder if this Marathon is still best to be used with mesos.
> I have aurora running, but it looks to have less options.
>
> What I like about the Marathon framework is of course the web interface
> and some plugins that allowed me to use capabilities. I know I
> should/could launch application directly in mesos via the command line.
> But I am just starting with the mesos and I prefer now to have a gui.
>
> Can anyone advice on a good alternative to marathon?
>
>
> [1]
> https://jira.d2iq.com/browse/MARATHON-8729
> https://github.com/mesosphere/marathon/issues/7136
>

Advice on alternative for marathon framework

Posted by Marc Roos <M....@f1-outsourcing.eu>.

I am having problems[1] getting marathon to run since march (can only 
run 1.7) and the only emails I receive from d2iq is how to rate their 
support. I wonder if this Marathon is still best to be used with mesos. 
I have aurora running, but it looks to have less options.

What I like about the Marathon framework is of course the web interface 
and some plugins that allowed me to use capabilities. I know I 
should/could launch application directly in mesos via the command line. 
But I am just starting with the mesos and I prefer now to have a gui.

Can anyone advice on a good alternative to marathon?


[1]
https://jira.d2iq.com/browse/MARATHON-8729
https://github.com/mesosphere/marathon/issues/7136

RE: Mesos task example json

Posted by Marc Roos <M....@f1-outsourcing.eu>.
 

Thanks Benjamin, I will bookmark these.




-----Original Message-----
To: user@mesos.apache.org
Subject: Re: Mesos task example json

Hi Marc,

> You also know how/where to put the capabilities? I am struggling with 
> that.


Have a look at the protobufs which define this API:

* `TaskInfo` which is used with `mesos-execute` is defined here, 
https://github.com/apache/mesos/blob/558829eb24f4ad636348497075bbc0428a4794a4/include/mesos/mesos.proto#L2229-L2285,
* capabilities are passed via a task’s `container` field, 
https://github.com/apache/mesos/blob/558829eb24f4ad636348497075bbc0428a4794a4/include/mesos/mesos.proto#L2239 
which has a field `linux_info` whose structure is defined here, 
https://github.com/apache/mesos/blob/558829eb24f4ad636348497075bbc0428a4794a4/include/mesos/mesos.proto#L3270-L3341
* in there you want to set effective_capabilities and/or 
`bounding_capabilities`, see the docs document for their semantics and 
interaction with the agent configuration, e.g., 
https://mesos.apache.org/documentation/latest/isolators/linux-capabilities/#task-setup.

Most of the public Mesos APIs are defined in files under 
https://github.com/apache/mesos/tree/558829eb24f4ad636348497075bbc0428a4794a4/include/mesos, 
either in protobuf form or as C++ header files. For questions like yours 
it often helps to work backwards from an interesting field to a 
structure (e.g., in this particular case: work out how `CapabilityInfo` 
is related to `TaskInfo`).


HTH,

Benjamin



Re: Mesos task example json

Posted by Benjamin Bannier <bb...@apache.org>.
Hi Marc,

> You also know how/where to put the capabilities? I am struggling 
> with that.


Have a look at the protobufs which define this API:

* `TaskInfo` which is used with `mesos-execute` is defined here, https://github.com/apache/mesos/blob/558829eb24f4ad636348497075bbc0428a4794a4/include/mesos/mesos.proto#L2229-L2285,
* capabilities are passed via a task’s `container` field, https://github.com/apache/mesos/blob/558829eb24f4ad636348497075bbc0428a4794a4/include/mesos/mesos.proto#L2239 which has a field `linux_info` whose structure is defined here, https://github.com/apache/mesos/blob/558829eb24f4ad636348497075bbc0428a4794a4/include/mesos/mesos.proto#L3270-L3341
* in there you want to set effective_capabilities and/or `bounding_capabilities`, see the docs document for their semantics and interaction with the agent configuration, e.g., https://mesos.apache.org/documentation/latest/isolators/linux-capabilities/#task-setup.

Most of the public Mesos APIs are defined in files under https://github.com/apache/mesos/tree/558829eb24f4ad636348497075bbc0428a4794a4/include/mesos, either in protobuf form or as C++ header files. For questions like yours it often helps to work backwards from an interesting field to a structure (e.g., in this particular case: work out how `CapabilityInfo` is related to `TaskInfo`).


HTH,

Benjamin

RE: Mesos task example json

Posted by Marc Roos <M....@f1-outsourcing.eu>.
 
Hi Qian, 

Thanks! You also know how/where to put the capabilities? I am struggling 
with that.



-----Original Message-----
To: user
Subject: Re: Mesos task example json

Hi Marc,

Here is an example json that I use for testing:

{
  "name": "test",
  "task_id": {"value" : "test"},
  "agent_id": {"value" : ""},
  "resources": [
    {"name": "cpus", "type": "SCALAR", "scalar": {"value": 1}},
    {"name": "mem", "type": "SCALAR", "scalar": {"value": 128}}
  ],
  "command": {
    "value": "sleep 10"
  },
  "container": {
    "type": "MESOS",
    "mesos": {
      "image": {
        "type": "DOCKER",
        "docker": {
          "name": "busybox"
        }
      }
    }
  }
}



Regards,
Qian Zhang


On Sat, Oct 12, 2019 at 6:26 AM Marc Roos <M....@f1-outsourcing.eu> 
wrote:




	Is there some example json available with all options for use with 
	'mesos-execute --task='
	
	



Re: Mesos task example json

Posted by Qian Zhang <zh...@gmail.com>.
Hi Marc,

Here is an example json that I use for testing:

{
  "name": "test",
  "task_id": {"value" : "test"},
  "agent_id": {"value" : ""},
  "resources": [
    {"name": "cpus", "type": "SCALAR", "scalar": {"value": 1}},
    {"name": "mem", "type": "SCALAR", "scalar": {"value": 128}}
  ],
  "command": {
    "value": "sleep 10"
  },
  "container": {
    "type": "MESOS",
    "mesos": {
      "image": {
        "type": "DOCKER",
        "docker": {
          "name": "busybox"
        }
      }
    }
  }
}


Regards,
Qian Zhang


On Sat, Oct 12, 2019 at 6:26 AM Marc Roos <M....@f1-outsourcing.eu> wrote:

>
>
> Is there some example json available with all options for use with
> 'mesos-execute --task='
>
>