On 05/27/2014 02:20 PM, Wido den Hollander wrote:
Hi,
I'm trying to run the ceph_rest_api module as a WSGI application behind
Apache with mod_wsgi but I'm struggling a bit.
Not having used WSGI that much I'm stuck on the .wsgi file. Has anybody
done this before?
I've been reading the Flask [0] and Ceph [1] docs, but it's not clear to
me yet.
I need a WSGI file to bootstrap it all, but what should I put in the
WSGI file and my Apache (2.4) VirtualHost?
So far my VirtualHost is fairly simple:
<VirtualHost *:80>
DocumentRoot /var/www
ServerName ceph-rest-api
ErrorLog /var/log/apache2/ceph-rest-api_error.log
CustomLog /var/log/apache2/ceph-rest-api_access.log combined
WSGIScriptAlias / /var/www/ceph-rest-api.wsgi
</VirtualHost>
[0]: http://flask.pocoo.org/docs/deploying/mod_wsgi/
[1]: http://eu.ceph.com/docs/master/man/8/ceph-rest-api/
So, I spend some time on this today again and the issue was really
simple. I was using Python 3 mod_wsgi under Ubuntu 14.04 which is not
working with librados and the ceph_rest_api module which are Python 2.7
I created a Github gist with my wrapper and some documentation in there:
https://gist.github.com/wido/8bf032e5f482bfef949c
I'll push a patch later to the master branch with this wsgi file and
documentation updates.
--
Wido den Hollander
42on B.V.
Ceph trainer and consultant
Phone: +31 (0)20 700 9902
Skype: contact42on
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com