All of lore.kernel.org
 help / color / mirror / Atom feed
* Update on ceph-mgr
@ 2016-05-18 11:02 John Spray
  2016-05-18 11:10 ` Wido den Hollander
  2016-05-19 11:17 ` Tim Serong
  0 siblings, 2 replies; 6+ messages in thread
From: John Spray @ 2016-05-18 11:02 UTC (permalink / raw)
  To: Ceph Development

Hi all,

For those who are interested, I wanted to give a quick update on the
recently-started ceph-mgr work.  This is all still very changeable,
but now that some code exists I'm putting it out there.

Firstly, here it is: https://github.com/jcsp/ceph/tree/wip-ceph-mgr

The place I'm starting is with the python embedding.  Currently it's
running the REST API code that previously lived in Calamari, which you
can now see in src/pybind/mgr/ (entry point is rest.py).  As
previously discussed, the Python interface is pretty minimal:
 * Python modules expose a serve() method and a notify() method (see rest.py)
 * Python modules consume methods "get" (for cluster objects like
maps), get_server (for the list of servers+services) and send_command
(for sending rados commands)

The rest.py module is serving the webapp using cherrypy -- this is a
handy choice because it just uses plain python threads, which are
fairly easy to deal with from the C++ side (gevent has a whole
different model that C-land sometimes needs to be aware of, gunicorn
uses multiprocessing).

I had to update some of the rest api code to work with the latest
version of django-rest-framework because Calamari was using an older
one.  My code is working with the versions of python dependencies that
are present in Fedora 22.

To play with this:
 1. Build your tree with cmake
 2. make ceph-mgr
 3. CALAMARI_CONFIG=<whereever>/ceph/src/pybind/mgr/calamari.conf
PYTHONPATH=env/lib/python2.7/site-packages bin/ceph-mgr -f
 4. Point your browser at e.g.
http://localhost:8002/api/v2/cluster/osd and witness that you get
calamari-like API output

Next part is the integration with the mon so that we can run ceph-mgr
as an active/standby HA service, and let it store its configuration
inside the mon.  Once we have that, combined with the embedded python
parts, this will turn into a nicely cleaned up pull request for the
main ceph tree.

Cheers,
John

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-19 11:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 11:02 Update on ceph-mgr John Spray
2016-05-18 11:10 ` Wido den Hollander
2016-05-18 11:21   ` John Spray
2016-05-18 11:26     ` John Spray
2016-05-19 11:17 ` Tim Serong
2016-05-19 11:40   ` John Spray

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.