From 2e09c6525b1f2e1b926d47c4b502cb7c1ab7d62c Mon Sep 17 00:00:00 2001 From: Han Guangyu Date: Tue, 24 Aug 2021 19:12:25 +0800 Subject: [PATCH] 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 --- doc/source/install/install-base-obs.rst | 16 ++++++++++++++++ doc/source/install/install-base-rdo.rst | 16 ++++++++++++++++ doc/source/install/install-base-ubuntu.rst | 16 ++++++++++++++++ doc/source/install/install-gnocchi.inc | 8 +++++--- 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/doc/source/install/install-base-obs.rst b/doc/source/install/install-base-obs.rst index f1484ad1e0..3f77282584 100644 --- a/doc/source/install/install-base-obs.rst +++ b/doc/source/install/install-base-obs.rst @@ -32,6 +32,22 @@ Install Gnocchi Depending on your environment size, consider installing Gnocchi 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 Finalize Gnocchi installation diff --git a/doc/source/install/install-base-rdo.rst b/doc/source/install/install-base-rdo.rst index e73faacf74..f470e55ad2 100644 --- a/doc/source/install/install-base-rdo.rst +++ b/doc/source/install/install-base-rdo.rst @@ -32,6 +32,22 @@ Install Gnocchi Depending on your environment size, consider installing Gnocchi 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 Finalize Gnocchi installation diff --git a/doc/source/install/install-base-ubuntu.rst b/doc/source/install/install-base-ubuntu.rst index ffab6013b6..abc7f1b6c8 100644 --- a/doc/source/install/install-base-ubuntu.rst +++ b/doc/source/install/install-base-ubuntu.rst @@ -31,6 +31,22 @@ Install Gnocchi Depending on your environment size, consider installing Gnocchi 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 Finalize Gnocchi installation diff --git a/doc/source/install/install-gnocchi.inc b/doc/source/install/install-gnocchi.inc index 25e191b92c..3326c26a1c 100644 --- a/doc/source/install/install-gnocchi.inc +++ b/doc/source/install/install-gnocchi.inc @@ -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 server as the ``root`` user: @@ -26,7 +26,7 @@ * 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: @@ -34,6 +34,8 @@ [api] auth_mode = keystone + port = 8041 + uwsgi_mode = http-socket * In the ``[keystone_authtoken]`` section, configure keystone authentication: @@ -78,7 +80,7 @@ file_basepath = /var/lib/gnocchi driver = file -4. Initialize Gnocchi: +5. Initialize Gnocchi: .. code-block:: console