mesoscon eu - http api framework

8
© 2015 Mesosphere, Inc. All Rights Reserved. 1 Building a Mesos Framework using the HTTP API Marco Massenzio (http://github.com/massenz) Anand Mazumdar

Upload: marco-massenzio

Post on 13-Feb-2017

210 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: MesosCon EU - HTTP API Framework

© 2015 Mesosphere, Inc. All Rights Reserved. 1

Building a Mesos Framework using the HTTP APIMarco Massenzio (http://github.com/massenz)Anand Mazumdar

Page 2: MesosCon EU - HTTP API Framework

© 2015 Mesosphere, Inc. All Rights Reserved. 2

HTTP API Overview

Page 3: MesosCon EU - HTTP API Framework

© 2015 Mesosphere, Inc. All Rights Reserved. 3

In the beginning, there was libmesos...

Courtesy @vinodkone, @ijimenez, “Mesos HTTP API,” MesosCon 2015 http://events.linuxfoundation.org/sites/events/files/slides/Mesos_HTTP_API.pdf

Page 4: MesosCon EU - HTTP API Framework

© 2015 Mesosphere, Inc. All Rights Reserved. 4

… but now, libmesos no more!

Mesos 0.24

Executor APIavailable as of 0.26

Endpoint API Served by

/api/v1/scheduler Scheduler API Master

/api/v1/executor Executor API Agent

/api/v1/internal Internal API Master

/api/v1/admin Operator API both

Page 5: MesosCon EU - HTTP API Framework

© 2015 Mesosphere, Inc. All Rights Reserved. 5

Calls & Events

Scheduler API v1 C++ API

SUBSCRIBE start()

TEARDOWN stop()

ACCEPT acceptOffers()

DECLINE declineOffer()

REVIVE reviveOffers()

KILL killTask()

SHUTDOWN Shutdown executor

ACKNOWLEDGE Ack status update

RECONCILE reconcileTasks()

MESSAGE sendFrameworkMessage()

REQUEST requestResources()

Page 6: MesosCon EU - HTTP API Framework

© 2015 Mesosphere, Inc. All Rights Reserved. 6

Calls & Events (cont.)

Event C++ Callbacks API

SUBSCRIBED (re)registered()

OFFERS resourceOffers()

RESCIND offerRescinded()

UPDATE statusUpdate()

MESSAGE frameworkMessage()

FAILURE {slave,executor}Lost()

ERROR error()

HEARTBEAT NEW - keep alive h/beats

Page 7: MesosCon EU - HTTP API Framework

© 2015 Mesosphere, Inc. All Rights Reserved. 7

Who likes code?

Demo

Let’s see some code!

Page 8: MesosCon EU - HTTP API Framework

© 2015 Mesosphere, Inc. All Rights Reserved. 8

● HTTP API User Doc, aka RTFMhttps://github.com/apache/mesos/blob/master/docs/scheduler_http_api.md

● Vinod Kone and Isabel Jimenez, “Mesos HTTP API,” MesosCon 2015 http://events.linuxfoundation.org/sites/events/files/slides/Mesos_HTTP_API.pdf

● Mesos HTTP API design documentation, https://goo.gl/X1IHij

● zk-mesos (the IPython notebook & other stuff)http://github.com/massenz/zk-mesos

References