Commit f3a017d0 by Yumeng Bao

[docs] Deploy cyborg api under WSGI server

This patch adds the docs for deploying cyborg api under WSGI server
and fixes a few small mistakes.

Change-Id: I51529d0f0fbaeac34b39e4fb84396e08263ef499
parent 4475cc9b
Installing Cyborg API via WSGI
==============================
Cyborg-api service can be run either as a Python command that runs a web serve
or As a WSGI application hosted by uwsgi. This document is a guide to deploy
cyborg-api using uwsgi. In devstack, uwsgi is used by default for development.
WSGI Application
----------------
The function ``cyborg.api.wsgi_app.init_application`` will setup a WSGI
application to run behind uwsgi.
Watcher API behind uwsgi
------------------------
Create a ``cyborg-api-uwsgi`` file with content below:
.. code-block:: ini
[uwsgi]
chmod-socket = 666
socket = /var/run/uwsgi/cyborg-wsgi-api.socket
lazy-apps = true
add-header = Connection: close
buffer-size = 65535
hook-master-start = unix_signal:15 gracefully_kill_them_all
thunder-lock = true
plugins = python
enable-threads = true
worker-reload-mercy = 90
exit-on-reload = false
die-on-term = true
master = true
processes = 2
wsgi-file = /usr/local/bin/cyborg-wsgi-api
.. end
Start cyborg-api:
.. code-block:: console
# uwsgi --ini /etc/cyborg/cyborg-api-uwsgi.ini
.. end
......@@ -92,7 +92,7 @@ Enable services
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service quantum
enable_service neutron
enable_service n-novnc
enable_plugin cyborg git://git.openstack.org/openstack/cyborg
NOVA_VNC_ENABLED=True
......
......@@ -32,6 +32,7 @@ Installation
:maxdepth: 1
install/installation
admin/config-wsgi
API
~~~
......
......@@ -4,9 +4,9 @@ Installation
At the command line::
$ pip install cyborg
$ pip install openstack-cyborg
Or, if you have virtualenvwrapper installed::
$ mkvirtualenv cyborg
$ pip install cyborg
$ pip install openstack-cyborg
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment