From 4b897557845c733b851b914065ad687a3eb3f85e Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Sun, 30 Apr 2017 15:30:55 +0000 Subject: [PATCH] devref and reno for nova-{api,metadata}-wsgi scripts This provides a brief explanation of the new nova-api-wsgi [1] and nova-metadata-wsgi [2] scripts in the Architecture section of the devref with links to the new doc added to the man pages for the eventlet scripts. The nova-api.rst mentioned ec2 so figured best to fix that now rather than forget about it, despite not being entirely germane. There is also a reno note that indicates the availability of the new scripts. There is a devstack change which is testing the new wsgi scripts as well as forcing grenade to not use them at If2d7e363a6541854f2e30c03171bef7a41aff745 [1] I7c4acfaa6c50ac0e4d6de69eb62ec5bbad72ff85 [2] Icb35fe2b94ab02c0ba8ba8129ae18aae0f794756 Change-Id: I351b2af3b256d3031bd2a65feba0495e815f8427 Related-Bug: #1661360 --- doc/source/index.rst | 1 + doc/source/man/nova-api-metadata.rst | 1 + doc/source/man/nova-api-os-compute.rst | 1 + doc/source/man/nova-api.rst | 4 ++- doc/source/wsgi.rst | 36 +++++++++++++++++++ .../wsgi-applications-8017c3192d2b143e.yaml | 8 +++++ 6 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 doc/source/wsgi.rst create mode 100644 releasenotes/notes/wsgi-applications-8017c3192d2b143e.yaml diff --git a/doc/source/index.rst b/doc/source/index.rst index d39c470865d8..8ff6ee3e20c1 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -159,6 +159,7 @@ Open Development. quotas threading vmstates + wsgi Architecture Evolution Plans ----------------------------- diff --git a/doc/source/man/nova-api-metadata.rst b/doc/source/man/nova-api-metadata.rst index a2afb1572292..d55eb05fce56 100644 --- a/doc/source/man/nova-api-metadata.rst +++ b/doc/source/man/nova-api-metadata.rst @@ -41,6 +41,7 @@ SEE ALSO ======== * `OpenStack Nova `__ +* `Using WSGI with Nova `__ BUGS ==== diff --git a/doc/source/man/nova-api-os-compute.rst b/doc/source/man/nova-api-os-compute.rst index f09695215338..4d687a53e1ae 100644 --- a/doc/source/man/nova-api-os-compute.rst +++ b/doc/source/man/nova-api-os-compute.rst @@ -41,6 +41,7 @@ SEE ALSO ======== * `OpenStack Nova `__ +* `Using WSGI with Nova `__ BUGS ==== diff --git a/doc/source/man/nova-api.rst b/doc/source/man/nova-api.rst index 3be20f15f86b..8589044afee5 100644 --- a/doc/source/man/nova-api.rst +++ b/doc/source/man/nova-api.rst @@ -21,7 +21,8 @@ SYNOPSIS DESCRIPTION =========== -nova-api is a server daemon that serves the nova EC2 and OpenStack APIs in separate greenthreads +nova-api is a server daemon that serves the metadata and compute APIs in +separate greenthreads OPTIONS ======= @@ -41,6 +42,7 @@ SEE ALSO ======== * `OpenStack Nova `__ +* `Using WSGI with Nova `__ BUGS ==== diff --git a/doc/source/wsgi.rst b/doc/source/wsgi.rst new file mode 100644 index 000000000000..6b314b4832ef --- /dev/null +++ b/doc/source/wsgi.rst @@ -0,0 +1,36 @@ +Using WSGI with Nova +==================== + +Though the compute and metadata APIs can be run using independent scripts that +provide eventlet-based HTTP servers, it is generally considered more performant +and flexible to run them using a generic HTTP server that supports WSGI_ (such +as Apache_ or nginx_). + +The nova project provides two automatically generated entry points that +support this: ``nova-api-wsgi`` and ``nova-metadata-wsgi``. These read +``nova.conf`` and ``api-paste.ini`` and generate the required module-level +``application`` that most WSGI servers require. If nova is installed using pip, +these two scripts will be installed into whatever the expected ``bin`` +directory is for the environment. + +The new scripts replace older experimental scripts that could be found in the +``nova/wsgi`` directory of the code repository. The new scripts are *not* +experimental. + +When running the compute and metadata services with WSGI, sharing the compute +and metadata service in the same process is not supported (as it is in the +eventlet-based scripts). + +In devstack as of May 2017, the compute and metadata APIs are hosted by a +Apache communicating with uwsgi_ via mod_proxy_uwsgi_. Inspecting the +configuration created there can provide some guidance on one option for +managing the WSGI scripts. It is important to remember, however, that one of +the major features of using WSGI is that there are many different ways to host +a WSGI application. Different servers make different choices about performance +and configurability. + +.. _WSGI: https://www.python.org/dev/peps/pep-3333/ +.. _apache: http://httpd.apache.org/ +.. _nginx: http://nginx.org/en/ +.. _uwsgi: https://uwsgi-docs.readthedocs.io/ +.. _mod_proxy_uwsgi: http://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi diff --git a/releasenotes/notes/wsgi-applications-8017c3192d2b143e.yaml b/releasenotes/notes/wsgi-applications-8017c3192d2b143e.yaml new file mode 100644 index 000000000000..381985527458 --- /dev/null +++ b/releasenotes/notes/wsgi-applications-8017c3192d2b143e.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + WSGI application scripts ``nova-api-wsgi`` and ``nova-metadata-wsgi`` are + now available. They allow running the compute and metadata APIs using a WSGI + server of choice (for example nginx and uwsgi, apache2 with mod_proxy_uwsgx + or gunicorn). The eventlet-based servers are still available, but the WSGI + options will allow greater deployment flexibility.