Add the describe of uWSGI to run Gnocchi API

Gnocchi API coundn't be use if we don't install and configure uwsgi
or other HTTP daemon. And gnocchi install guide didn't describe
those.

Add the describe of installing uWSGI and the brief relationship
between uWSGI and Gnocchi API. And tell the reader that they can
also use Apache httpd and mod_wsgi, or any other HTTP daemon to
run Gnocchi API.

Closes-Bug: #1750933
Change-Id: Iba8c1fe7a64569de4ca366251c495731a8d7a779
This commit is contained in:
Han Guangyu 2021-08-24 19:12:25 +08:00
parent 2688793b45
commit 2e09c6525b
4 changed files with 53 additions and 3 deletions

View File

@ -32,6 +32,22 @@ Install Gnocchi
Depending on your environment size, consider installing Gnocchi Depending on your environment size, consider installing Gnocchi
separately as it makes extensive use of the cpu. separately as it makes extensive use of the cpu.
#. Install the uWSGI packages. The following method uses operating system
provided packages. Another alternative would be to use pip(or pip3,
depending on the distribution); using pip is not described in this doc:
.. code-block:: console
# zypper install uwsgi-plugin-python3 uwsgi
.. note::
Since the provided gnocchi-api wraps around uwsgi, you need to
make sure that uWSGI is installed if you want to use gnocchi-api
to run Gnocchi API.
As Gnocchi API tier runs using WSGI, it can also alternatively
be run using Apache httpd and mod_wsgi, or any other HTTP daemon.
.. include:: install-gnocchi.inc .. include:: install-gnocchi.inc
Finalize Gnocchi installation Finalize Gnocchi installation

View File

@ -32,6 +32,22 @@ Install Gnocchi
Depending on your environment size, consider installing Gnocchi Depending on your environment size, consider installing Gnocchi
separately as it makes extensive use of the cpu. separately as it makes extensive use of the cpu.
#. Install the uWSGI packages. The following method uses operating system
provided packages. Another alternative would be to use pip(or pip3,
depending on the distribution); using pip is not described in this doc:
.. code-block:: console
# yum install uwsgi-plugin-common uwsgi-plugin-python3 uwsgi
.. note::
Since the provided gnocchi-api wraps around uwsgi, you need to
make sure that uWSGI is installed if you want to use gnocchi-api
to run Gnocchi API.
As Gnocchi API tier runs using WSGI, it can also alternatively
be run using Apache httpd and mod_wsgi, or any other HTTP daemon.
.. include:: install-gnocchi.inc .. include:: install-gnocchi.inc
Finalize Gnocchi installation Finalize Gnocchi installation

View File

@ -31,6 +31,22 @@ Install Gnocchi
Depending on your environment size, consider installing Gnocchi Depending on your environment size, consider installing Gnocchi
separately as it makes extensive use of the cpu. separately as it makes extensive use of the cpu.
#. Install the uWSGI packages. The following method uses operating system
provided packages. Another alternative would be to use pip(or pip3,
depending on the distribution); using pip is not described in this doc:
.. code-block:: console
# apt-get install uwsgi-plugin-python3 uwsgi
.. note::
Since the provided gnocchi-api wraps around uwsgi, you need to
make sure that uWSGI is installed if you want to use gnocchi-api
to run Gnocchi API.
As Gnocchi API tier runs using WSGI, it can also alternatively
be run using Apache httpd and mod_wsgi, or any other HTTP daemon.
.. include:: install-gnocchi.inc .. include:: install-gnocchi.inc
Finalize Gnocchi installation Finalize Gnocchi installation

View File

@ -1,4 +1,4 @@
2. Create the database for Gnocchi's indexer: 3. Create the database for Gnocchi's indexer:
* Use the database access client to connect to the database * Use the database access client to connect to the database
server as the ``root`` user: server as the ``root`` user:
@ -26,7 +26,7 @@
* Exit the database access client. * Exit the database access client.
3. Edit the ``/etc/gnocchi/gnocchi.conf`` file and add Keystone options: 4. Edit the ``/etc/gnocchi/gnocchi.conf`` file and add Keystone options:
* In the ``[api]`` section, configure gnocchi to use keystone: * In the ``[api]`` section, configure gnocchi to use keystone:
@ -34,6 +34,8 @@
[api] [api]
auth_mode = keystone auth_mode = keystone
port = 8041
uwsgi_mode = http-socket
* In the ``[keystone_authtoken]`` section, configure keystone * In the ``[keystone_authtoken]`` section, configure keystone
authentication: authentication:
@ -78,7 +80,7 @@
file_basepath = /var/lib/gnocchi file_basepath = /var/lib/gnocchi
driver = file driver = file
4. Initialize Gnocchi: 5. Initialize Gnocchi:
.. code-block:: console .. code-block:: console