MyCoy
MyCoy

Reputation: 61

How to launch a framework via Mesos REST API

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

Upvotes: 0

Views: 208

Answers (2)

edwardramsey
edwardramsey

Reputation: 363

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

Upvotes: 0

Tobi
Tobi

Reputation: 31479

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

Upvotes: 0

Related Questions