[openstack-dev] uWSGI help for Congress

Eric K ekcs.openstack at gmail.com
Fri May 26 01:57:28 UTC 2017


On 5/23/17, 5:37 AM, "Chris Dent" <cdent+os at anticdent.org> wrote:

>On Mon, 22 May 2017, Eric K wrote:
>
>> If someone out there knows uWSGI and has a couple spare cycles to help
>> Congress project, we'd super appreciate it.
>>
>> The regular contributors to Congress don't have experience with uWSGI
>>and
>> could definitely use some help getting started with this goal. Thanks a
>>ton!
>
>Is the issue that you need get WSGI working at all (that is, need to
>create a WSGI app for running the api service), or existing WSGI
>tooling, made to work with mod_wsgi, needs to be adapted to work
>with uwsgi?
>In either case, if you're able to point me at existing
>api service code I might be able to provide some pointers.
>
>In the meantime some potentially useful links:
>
>* some notes I took on switching nova and devstack over to uwsg:
>
>     https://etherpad.openstack.org/p/devstack-uwsgi
>
>* devstack code for nova+uwsgi
>
>     https://review.openstack.org/#/c/457715/
>
>* rewrite of nova's wsgi application to start up properly
>
>     https://review.openstack.org/#/c/457283/
>
>This last one might be most useful as it looks like congress is
>using an api startup model (for the non-WSGI case) similar to
>nova's.

Thanks a lot for the references Chris! I¹m very new to this matter so
please excuse my ignorance.
We have a WSGI app but have not made it deployable with either mod_wsgi or
uwsgi, only directly running with paste http server.

Here is the app (wrapper):
https://github.com/openstack/congress/blob/master/congress/api/application.
py#L34

Here¹s the app factory that makes it work with paste:
https://github.com/openstack/congress/blob/master/congress/service.py#L43

Here¹s the routing logic (not relevant I think):
https://github.com/openstack/congress/blob/master/congress/api/webservice.p
y

There is also a wsgi.py file but it appears to be used only for Keystone
context:
https://github.com/openstack/congress/blob/master/congress/common/wsgi.py

As far as I can figure out, the first step is to adapt the existing wsgi
app so it works right with uwsgi. It looks like what we are missing is the
equivalent of this file:
https://github.com/openstack/nova/blob/master/nova/api/openstack/wsgi_app.p
y (basically your third link)

Is that right?

I¹ve read the following as well as several wsgi related patches but still
feel quite ungrounded. Any other suggested reading?

http://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html
http://docs.webob.org/en/stable/do-it-yourself.html
http://docs.webob.org/en/stable/api/dec.html

Thanks a ton!

Eric





More information about the OpenStack-dev mailing list