Merge "[docs] Deploy cyborg api under WSGI server"

This commit is contained in:
Zuul 2018-10-30 02:05:39 +00:00 committed by Gerrit Code Review
commit 5e1f69f114
4 changed files with 50 additions and 3 deletions

View File

@ -0,0 +1,46 @@
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

View File

@ -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

View File

@ -32,6 +32,7 @@ Installation
:maxdepth: 1
install/installation
admin/config-wsgi
API
~~~

View File

@ -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