]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add Cinder API wsgi application
authorAnton Arefiev <aarefiev@mirantis.com>
Fri, 10 Jul 2015 13:44:59 +0000 (16:44 +0300)
committerAnton Arefiev <aarefiev@mirantis.com>
Tue, 25 Aug 2015 10:48:03 +0000 (13:48 +0300)
commit91a8e88dc6dbc781cb46e56fe7cfe1e98748f3ce
tree1cae4f81f4be70800ad1dc633fcb89f27a13b74d
parent742026723c6bc5024b35317a87f9faf8d4f8fabc
Add Cinder API wsgi application

This change adds cinder API application, so cinder API can be run
under wsgi server(Apache, Nginx, etc). Eventlet will still be used
by default.

Cinder API with eventlet as a webserver and wsgi application
managing has some cons:

* Cinder API is deployed in other way as a common web application.
Apache/Nginx is generally used web servers for REST API application.

* Cinder API is run as a separate service. It means that cloud
operators need to configure some software to monitor that the API
is running.

* Apache/Nginx works better under the real heavy load than eventlet.

To use c-api deployment under Apache in devstack assign
devstack var CINDER_USE_MOD_WSGI="True".
Related changes in devstack:
 https://review.openstack.org/#/c/204643/

Cinder documentation on how deploy cinder API under Apache:
 https://review.openstack.org/#/c/207020/

Patch for Infra to make it tested:
 https://review.openstack.org/#/c/208498/

DocImpact
Implements: blueprint: non-eventlet-wsgi-app

Change-Id: If877d700b0efaa5406efa8f8f17c5816928e83ce
17 files changed:
cinder/api/middleware/auth.py
cinder/api/middleware/fault.py
cinder/api/openstack/__init__.py
cinder/api/openstack/wsgi.py
cinder/api/v1/limits.py
cinder/api/v2/limits.py
cinder/service.py
cinder/tests/unit/api/fakes.py
cinder/tests/unit/test_service.py
cinder/tests/unit/wsgi/__init__.py [new file with mode: 0644]
cinder/tests/unit/wsgi/test_eventlet_server.py [moved from cinder/tests/unit/test_wsgi.py with 89% similarity]
cinder/tests/unit/wsgi/test_wsgi.py [moved from cinder/tests/unit/api/test_wsgi.py with 98% similarity]
cinder/wsgi/__init__.py [new file with mode: 0644]
cinder/wsgi/common.py [new file with mode: 0644]
cinder/wsgi/eventlet_server.py [moved from cinder/wsgi.py with 54% similarity]
cinder/wsgi/wsgi.py [new file with mode: 0644]
etc/cinder/api-httpd.conf [new file with mode: 0644]