0

Everyone:

I'm wondering how to launch a framework (e.g. a docker app) via Mesos' REST API? I just checked all the HTTP endpoints. But I don't see anything helpful.

The reason for this question is that, I've tried Marathon, which just need a Mesos master's address, and we can launch a framework over Mesos via Marathon's REST API.
I think Marathon takes advantages over Mesos's API. But I don't want to involve Marathon. I want to launch a framework directly via Mesos REST API. Could someone please help? What's the best approach?

Thanks

MyCoy
  • 61
  • 5

2 Answers2

0

If your scheduler doesn't use the Scheduler HTTP API itself, you can't just "launch" a framework. That's not how it works.

Tobi
  • 31,405
  • 8
  • 58
  • 90
0

Like Tobi say, you can use Mesos Scheduler API to communicate with Mesos master wihtout Marathon.

You just need write a Mesos scheduler, Mesos have default docker excutor.

For your own framework, you need to Send a SUBSCRIBE json to Mesos Master to register. then, you would receive offer EVENT. user offer id, you send ACCEPT msg, you would lanch your application.

reference:

Mesos Scheduler API

Mesos github example

Rendler example

edwardramsey
  • 363
  • 2
  • 12
  • Thanks, does this mean, Marathon implements its own scheduler? And Mesos doesn't have any REST API to launch a framework, using its default scheduler? – MyCoy Jul 21 '17 at 13:39
  • I think if you want to use Mesos REST API, you need implement your own scheduler. – edwardramsey Jul 23 '17 at 13:08