settingsLogin | Registersettings

[openstack-dev] uWSGI help for Congress

0 votes

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!

https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html

Eric


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
asked May 26, 2017 in openstack-dev by Eric_Kao (2,540 points)   1 3

4 Responses

0 votes

On 22/05/17 05:48 PM, 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!

it shouldn't be much different from mod_wsgi. you just need to create a
uwsgi.ini file which points to the appropriate .wsgi file. here's
sileht's patch in gnocchi from a while back:
https://review.openstack.org/#/c/292077. apparently pbr provides wsgi
file now (not sure what version though):
https://github.com/gnocchixyz/gnocchi/commit/6377e25bdcca68be66fadf65aa16a6f174cfaa99

cheers,
--
gord


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded May 23, 2017 by gordon_chung (19,300 points)   2 3 8
0 votes

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:

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.

--
Chris Dent ┬──┬◡ノ(° -°ノ) https://anticdent.org/
freenode: cdent tw: @anticdent__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

responded May 23, 2017 by cdent_plus_os_at_ant (12,800 points)   2 2 5
0 votes

On 5/23/17, 5:37 AM, "Chris Dent" cdent+os@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:

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


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded May 26, 2017 by Eric_Kao (2,540 points)   1 3
0 votes

On 5/22/17, 8:54 PM, "gordon chung" gord@live.ca wrote:

On 22/05/17 05:48 PM, 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!

it shouldn't be much different from mod_wsgi. you just need to create a
uwsgi.ini file which points to the appropriate .wsgi file. here's
sileht's patch in gnocchi from a while back:
https://review.openstack.org/#/c/292077. apparently pbr provides wsgi
file now (not sure what version though):
https://github.com/gnocchixyz/gnocchi/commit/6377e25bdcca68be66fadf65aa16a
6f174cfaa99

Thank you Gordon for the references. We have a wsgi app but have not made
it work with mod_wsgi or uwsgi yet.
So I think we still have some steps to go before we¹re at this step. Glad
to have a good reference for when we get there. Thanks!

Eric


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded May 26, 2017 by Eric_Kao (2,540 points)   1 3
...