Correct descriptions of install doc

1. add create pid step
2. correct service config file name to 'zaqar-uwsgi.service'
3. move zaqar.conf into /etc/zaqar/
4. change uwsgi workdir to path '/srv/zaqar'

Change-Id: I6aafbb3b84abaf3ae40561055c2c122d9a1c8dff
Closes-bug: 1716864
This commit is contained in:
Rui Yuan Dou 2017-09-13 16:23:38 +08:00
parent 7ca8254a42
commit eb86aafb23
3 changed files with 61 additions and 16 deletions

View File

@ -268,11 +268,11 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
# pip install . -r ./requirements.txt --upgrade --log /tmp/zaqar-pip.log
# pip install --upgrade pymongo gevent uwsgi
#. Copy the Zaqar RBAC policy sample file to the directory ``etc/zaqar/``:
#. Copy the Zaqar RBAC policy sample file to the directory ``/etc/zaqar/``:
.. code-block:: console
# mkdir
# mkdir /etc/zaqar
# cp etc/policy.json.sample /etc/zaqar/policy.json
#. Create log file:
@ -286,7 +286,11 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
Replace ``ZAQARUSER`` with the name of the user in system under which the
Messaging service will run.
#. Create ``/srv/zaqar`` folder to store ``uWSGI`` configuration files.
#. Create ``/srv/zaqar`` folder to store ``uWSGI`` configuration files:
.. code-block:: console
# mkdir /srv/zaqar
#. Create ``/srv/zaqar/zaqar_uwsgi.py`` with the following content:
@ -315,6 +319,7 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
gevent-monkey-patch = true
listen = 1024
enable-threads = true
chdir = /srv/zaqar
module = zaqar_uwsgi:app
workers = 4
harakiri = 60
@ -330,7 +335,17 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
security and performance requirements including load balancing. See the
official `uWSGI configuration reference`_.
#. Create Messaging service's configuration file ``/etc/zaqar.conf`` with the
#. Create pid file:
.. code-block:: console
# touch /var/run/zaqar.pid
# chown ZAQARUSER:ZAQARUSER /var/run/zaqar.pid
Replace ``ZAQARUSER`` with the name of the user in system under which the
Messaging service will run.
#. Create Messaging service's configuration file ``/etc/zaqar/zaqar.conf`` with the
following content:
.. code-block:: ini
@ -461,7 +476,7 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
Edit any options as needed, especially the options with capitalized values.
#. Create a service file for Messaging service
``/etc/systemd/system/zaqaruwsgi.service``:
``/etc/systemd/system/zaqar-uwsgi.service``:
.. code-block:: ini
@ -499,13 +514,13 @@ replica-set as Messaging's pool.
.. code-block:: console
# systemctl start zaqar.uwsgi.service
# systemctl start zaqar-uwsgi.service
#. Make Messaging service start automatically after reboot on the web server:
.. code-block:: console
# systemctl enable zaqar.uwsgi.service
# systemctl enable zaqar-uwsgi.service
#. Configure pool:

View File

@ -268,11 +268,11 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
# pip install . -r ./requirements.txt --upgrade --log /tmp/zaqar-pip.log
# pip install --upgrade pymongo gevent uwsgi
#. Copy the Zaqar RBAC policy sample file to the directory ``etc/zaqar/``:
#. Copy the Zaqar RBAC policy sample file to the directory ``/etc/zaqar/``:
.. code-block:: console
# mkdir
# mkdir /etc/zaqar
# cp etc/policy.json.sample /etc/zaqar/policy.json
#. Create log file:
@ -286,7 +286,11 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
Replace ``ZAQARUSER`` with the name of the user in system under which the
Messaging service will run.
#. Create ``/srv/zaqar`` folder to store ``uWSGI`` configuration files.
#. Create ``/srv/zaqar`` folder to store ``uWSGI`` configuration files:
.. code-block:: console
# mkdir /srv/zaqar
#. Create ``/srv/zaqar/zaqar_uwsgi.py`` with the following content:
@ -315,6 +319,7 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
gevent-monkey-patch = true
listen = 1024
enable-threads = true
chdir = /srv/zaqar
module = zaqar_uwsgi:app
workers = 4
harakiri = 60
@ -330,7 +335,17 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
security and performance requirements including load balancing. See the
official `uWSGI configuration reference`_.
#. Create Messaging service's configuration file ``/etc/zaqar.conf`` with the
#. Create pid file:
.. code-block:: console
# touch /var/run/zaqar.pid
# chown ZAQARUSER:ZAQARUSER /var/run/zaqar.pid
Replace ``ZAQARUSER`` with the name of the user in system under which the
Messaging service will run.
#. Create Messaging service's configuration file ``/etc/zaqar/zaqar.conf`` with the
following content:
.. code-block:: ini
@ -368,7 +383,7 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
auth_uri = HTTPS://IDENTITY.EXAMPLE-MESSAGES.NET:5000
# Complete admin Identity API endpoint (HTTPS protocol is more preferable
# than HTTP).
auth_url = HTTPS://IDENTITY.EXAMPLE-MESSAGES.NET:35357
identity_uri = HTTPS://IDENTITY.EXAMPLE-MESSAGES.NET:35357
# Token cache time in seconds.
token_cache_time = TOKEN_CACHE_TIME
memcached_servers = 127.0.0.1:11211
@ -461,7 +476,7 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
Edit any options as needed, especially the options with capitalized values.
#. Create a service file for Messaging service
``/etc/systemd/system/zaqaruwsgi.service``:
``/etc/systemd/system/zaqar.uwsgi.service``:
.. code-block:: ini

View File

@ -274,7 +274,11 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
Replace ``ZAQARUSER`` with the name of the user in system under which the
Messaging service will run.
#. Create ``/srv/zaqar`` folder to store ``uWSGI`` configuration files.
#. Create ``/srv/zaqar`` folder to store ``uWSGI`` configuration files:
.. code-block:: console
# mkdir /srv/zaqar
#. Create ``/srv/zaqar/zaqar_uwsgi.py`` with the following content:
@ -303,6 +307,7 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
gevent-monkey-patch = true
listen = 1024
enable-threads = true
chdir = /srv/zaqar
module = zaqar_uwsgi:app
workers = 4
harakiri = 60
@ -318,7 +323,17 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
security and performance requirements including load balancing. See the
official `uWSGI configuration reference`_.
#. Create Messaging service's configuration file ``/etc/zaqar.conf`` with the
#. Create pid file:
.. code-block:: console
# touch /var/run/zaqar.pid
# chown ZAQARUSER:ZAQARUSER /var/run/zaqar.pid
Replace ``ZAQARUSER`` with the name of the user in system under which the
Messaging service will run.
#. Create Messaging service's configuration file ``/etc/zaqar/zaqar.conf`` with the
following content:
.. code-block:: ini
@ -356,7 +371,7 @@ Install and configure ``memcached``, ``uWSGI`` and Messaging on the web server
auth_uri = HTTPS://IDENTITY.EXAMPLE-MESSAGES.NET:5000
# Complete admin Identity API endpoint (HTTPS protocol is more preferable
# than HTTP).
auth_url = HTTPS://IDENTITY.EXAMPLE-MESSAGES.NET:35357
identity_uri = HTTPS://IDENTITY.EXAMPLE-MESSAGES.NET:35357
# Token cache time in seconds.
token_cache_time = TOKEN_CACHE_TIME
memcached_servers = 127.0.0.1:11211