Skip to content
Merged

fixes #171

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions en/call-trace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Call trace storage configuration
SEMS and Web are running on same server
---------------------------------------

Edit **/etc/nginx/sites-enabled/yeti-web** and replace **location ~ ^/dump/(.*)$** with following content:
Edit ``/etc/nginx/sites-enabled/yeti-web`` and replace ``location ~ ^/dump/(.*)$`` with following content:

.. code-block:: nginx
Expand All @@ -34,9 +34,9 @@ SEMS and Web located on different servers
Configure nginx on WEB interface server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Create directory **/var/www/dump** with owner **www-data** to store PCAP files.
Create directory ``/var/www/dump`` with owner ``www-data`` to store PCAP files.

Edit **/etc/nginx/sites-enabled/yeti-web** and add such server block:
Edit ``/etc/nginx/sites-enabled/yeti-web`` and add such server block:

.. code-block:: nginx
Expand All @@ -61,7 +61,7 @@ Edit **/etc/nginx/sites-enabled/yeti-web** and add such server block:
}
Edit **/etc/nginx/sites-enabled/yeti-web** and replace **location ~ ^/dump/(.*)$** with following content:
Edit ``/etc/nginx/sites-enabled/yeti-web`` and replace ``location ~ ^/dump/(.*)$`` with following content:

.. code-block:: nginx
Expand All @@ -82,19 +82,19 @@ Restart nginx service:
Configure SEMS to upload traces to WEB interface server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Add **http_client** module configuration to **modules** section of **/etc/sems/sems.conf**::
Add ``http_client`` module configuration to ``modules`` section of ``/etc/sems/sems.conf``::

modules {
path = /usr/lib/sems/plug-in
config_path=/etc/sems/etc/
config_path = /etc/sems/etc/
...
module "http_client" {
resend_interval=5000
resend_queue_max=10000
resend_interval = 5000
resend_queue_max = 10000
destination "pcap" {
mode=put
urls={ http://<WEB INTERFACE IP>:8081/upload }
mode = put
urls = { http://<WEB INTERFACE IP>:8081/upload }
on_success {
action = remove
}
Expand All @@ -106,11 +106,11 @@ Add **http_client** module configuration to **modules** section of **/etc/sems/s
...
}
Add **pcap_upload_queue=pcap** directive to section **general** of **/etc/sems/sems.conf**::
Add ``pcap_upload_queue = pcap`` directive to section ``general`` of ``/etc/sems/sems.conf``::

general {
...
pcap_upload_queue=pcap
pcap_upload_queue = pcap
...
}

Expand Down
16 changes: 8 additions & 8 deletions en/cdr-export.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ CDR export feature allows operator to unload CDR from database to CSV file. Yeti
CDR export download link

Yeti Web interface uses Nginx `X-Accel-Redirect <https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/>`_ mechanism to provide file download.
Web interface responds on download request with 200Ok with header **X-Accel-Redirect: /x-redirect/cdr_export/4.csv**. Nginx should be configured to handle this redirection properly.
Web interface responds on download request with 200Ok with header ``X-Accel-Redirect: /x-redirect/cdr_export/4.csv``. Nginx should be configured to handle this redirection properly.


CDR database and yeti-web on the same server
--------------------------------------------

Edit **/etc/nginx/sites-enabled/yeti-web** and replace **/x-redirect/cdr_export** with the following content:
Edit ``/etc/nginx/sites-enabled/yeti-web`` and replace ``/x-redirect/cdr_export`` with the following content:

.. code-block:: nginx
Expand All @@ -27,14 +27,14 @@ Edit **/etc/nginx/sites-enabled/yeti-web** and replace **/x-redirect/cdr_export*
alias /tmp;
}
Where **/tmp** is the storage directory defined in **/opt/yeti-web/config/yeti_web.yml**:
Where ``/tmp`` is the storage directory defined in ``/opt/yeti-web/config/yeti_web.yml``:

.. code-block:: yaml
cdr_export:
dir_path: "/tmp"
.. warning:: You can use any directory as **cdr_export dir_path** but this directory should be writable by **postgres** system user and readable by **www-data** system user.
.. warning:: You can use any directory as ``cdr_export dir_path`` but this directory should be writable by ``postgres`` system user and readable by ``www-data`` system user.

Restart nginx service:

Expand All @@ -48,7 +48,7 @@ CDR database and yeti-web located on different servers
Configure nginx on WEB interface server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Edit **/etc/nginx/sites-enabled/yeti-web** and replace **/x-redirect/cdr_export** with the following content:
Edit ``/etc/nginx/sites-enabled/yeti-web`` and replace ``/x-redirect/cdr_export`` with the following content:

.. code-block:: nginx
Expand All @@ -62,7 +62,7 @@ Where **<CDR SERVER ADDRESS>** is IP address of remote CDR database server.
Configure nginx on CDR database server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Install **nginx** package and add the next server block to **/etc/nginx/nginx.conf**:
Install ``nginx`` package and add the next server block to ``/etc/nginx/nginx.conf``:

.. code-block:: nginx
Expand All @@ -79,9 +79,9 @@ Install **nginx** package and add the next server block to **/etc/nginx/nginx.co
}
}
Where **/tmp** is **cdr_export dir_path** from **/opt/yeti-web/config/yeti_web.yml** config file and **<WEB INTERFACE SERVER ADDRESS>** is IP address of your web interface server.
Where ``/tmp`` is ``cdr_export dir_path`` from ``/opt/yeti-web/config/yeti_web.yml`` config file and ``<WEB INTERFACE SERVER ADDRESS>`` is IP address of your web interface server.

.. warning:: Make sure you configure **allow/deny** ACL properly. Wrong nginx configuration will cause data leak especially if CDR server uses public IP address(we recommend using private IP for CDR db server).
.. warning:: Make sure you configure ``allow/deny`` ACL properly. Wrong nginx configuration will cause data leak especially if CDR server uses public IP address(we recommend using private IP for CDR db server).

Restart nginx service:

Expand Down
12 changes: 6 additions & 6 deletions en/database-tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Performance tuning

By default PostgreSQL RDBMS configured to consume minimal system resources. This approach allows PostgreSQL to start on any server after installation. YETI as well as any other system uses PostgreSQL requires changing default configuration in order to archive best performance.

We recommends to change next configuration variables at /etc/postgresql/16/yeti/postgresql.conf
We recommends to change next configuration variables at ``/etc/postgresql/16/yeti/postgresql.conf``

.. code-block:: ini
Expand All @@ -27,10 +27,10 @@ We recommends to change next configuration variables at /etc/postgresql/16/yeti/
checkpoint_timeout = 50min
Set **shared_buffers** variable to 1/3 of total RAM installed to server if you share this server with some another application. For example we recommends install yeti-web on same server as routing database.
If your server is dedicated for PostgreSQL set **shared_buffers** to 2/3 of your RAM.
Set ``shared_buffers`` variable to 1/3 of total RAM installed to server if you share this server with some another application. For example we recommends install yeti-web on same server as routing database.
If your server is dedicated for PostgreSQL set ``shared_buffers`` to 2/3 of your RAM.

When configuration changed you should restart your PostgreSQL instance using `service postgresql restart`
When configuration changed you should restart your PostgreSQL instance using ``service postgresql restart``

.. seealso:: Read PostgreSQL manual https://www.postgresql.org/docs/16/ to understand RDBMS architecture and features

Expand All @@ -43,7 +43,7 @@ Dump and Restore
See https://github.com/markokr/skytools/blob/master/doc/faq.txt#L50 for details

To get know your cluster epoch, connect to database using **psql** and run:
To get know your cluster epoch, connect to database using ``psql`` and run:

.. code-block:: psql
Expand All @@ -54,7 +54,7 @@ To get know your cluster epoch, connect to database using **psql** and run:
(1 row)
To change PostgreSQL cluster epoch - shutdown cluster and use **pg_resetwal** tool:
To change PostgreSQL cluster epoch - shutdown cluster and use ``pg_resetwal`` tool:

.. code-block:: console
Expand Down
5 changes: 2 additions & 3 deletions en/installation/installation-1.13/cdr-database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ PGQd ticker

After initialization of CDR database you should run pgq ticker daemon(**pgqd**) on server with CDR database.

Create configuration file /etc/pgqd.ini
Create configuration file ``/etc/pgqd.ini``:

.. code-block:: ini
Expand Down Expand Up @@ -85,8 +85,7 @@ Check if databases were successfully created and are accessible:
cdr=# \q
root@cdr-server:/#
Don't forget to make changes in /etc/postgresql/16/main/pg_hba.conf
and apply them if you plan to access this databases from other hosts and/or set up database replication
Don't forget to make changes in ``/etc/postgresql/16/main/pg_hba.conf`` and apply them if you plan to access this databases from other hosts and/or set up database replication


.. seealso:: :ref:`Database tuning <database_tuning>`
2 changes: 1 addition & 1 deletion en/installation/installation-1.13/redis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Add

notify-keyspace-events "Egx"

to your **/etc/redis/redis.conf** to enable notifications. This configuration required for incoming registrations functionality.
to your ``/etc/redis/redis.conf`` to enable notifications. This configuration required for incoming registrations functionality.

Checks
======
Expand Down
2 changes: 1 addition & 1 deletion en/installation/installation-1.13/repositories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Most of servers may use same repositories set::
deb https://deb.yeti-switch.org/debian/1.13 bookworm main
deb https://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main

System repositories can be changed in **/etc/apt/sources.list**. Since we use our own package repository you have add our key to trusted.
System repositories can be changed in ``/etc/apt/sources.list``. Since we use our own package repository you have add our key to trusted.

.. code-block:: console

Expand Down
2 changes: 1 addition & 1 deletion en/installation/installation-1.13/routing-database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Check if databases were successfully created and are accessible::
root@evial:/#


Don't forget to make changes in /etc/postgresql/16/main/pg_hba.conf
Don't forget to make changes in ``/etc/postgresql/16/main/pg_hba.conf``
and apply them if you plan to access this databases from other hosts and/or set up database replication

.. seealso:: :ref:`Database tuning <database_tuning>`
10 changes: 5 additions & 5 deletions en/installation/installation-1.13/sems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Configuration files
/etc/sems/sems.conf
~~~~~~~~~~~~~~~~~~~

Add new :ref:`Point of Presensce <pops>` using web interface. Use id of newly created PoP as value for **pop_id** parameter.
Add new :ref:`Point of Presensce <pops>` using web interface. Use id of newly created PoP as value for ``pop_id`` parameter.

Add new :ref:`Node <nodes>` using web interface. Use id of newly created Node as value for **node_id** parameter.
Add new :ref:`Node <nodes>` using web interface. Use id of newly created Node as value for ``node_id`` parameter.

Replace <SIGNALLING_IP>, <MEDIA_IP> with correct values for your server :
Replace ``<SIGNALLING_IP>``, ``<MEDIA_IP>`` with correct values for your server :

.. code-block::
Expand Down Expand Up @@ -254,13 +254,13 @@ Launch configured traffic switch instance:
# systemctl start sems
In case of errors it's useful to use **sems -E -D3** command
In case of errors it's useful to use ``sems -E -D3`` command
which will launch daemon in foreground with debug logging level

Checks
------

Check if **sems** process exists and signaling/media/rpc sockets are opened:
Check if ``sems`` process exists and signaling/media/rpc sockets are opened:

.. code-block:: console
Expand Down
24 changes: 7 additions & 17 deletions en/installation/installation-1.13/web.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
WEB interface installation
==========================

Server requirements:

- amd64 architecture
- Debian 12 Bookworm distribution
- at least 4GB of RAM

Packages installation
---------------------

Expand All @@ -22,7 +16,7 @@ Packages installation
Yeti-web configuration
----------------------

To configure databases connection parameters create /opt/yeti-web/config/database.yml file with the following content:
To configure databases connection parameters create ``/opt/yeti-web/config/database.yml`` file with the following content:

.. code-block:: yaml

Expand Down Expand Up @@ -55,17 +49,17 @@ To configure databases connection parameters create /opt/yeti-web/config/databas
.. warning:: You should specify correct addresses and credentials that were used in previous section


Configure security keys seed by creating /opt/yeti-web/config/secrets.yml with the following content:
Configure security keys seed by creating ``/opt/yeti-web/config/secrets.yml`` with the following content:

.. code-block:: yaml

production:
secret_key_base: <RANDOM_STRING>

.. warning:: Replace **<RANDOM_STRING>** with randomly generated value. You can use **pwgen -s 128** to generate it.
.. warning:: Replace **<RANDOM_STRING>** with randomly generated value. You can use ``pwgen -s 128`` to generate it.


Copy configuration file example **/opt/yeti-web/config/yeti_web.yml.distr** to **/opt/yeti-web/config/yeti_web.yml**
Copy configuration file example ``/opt/yeti-web/config/yeti_web.yml.distr`` to ``/opt/yeti-web/config/yeti_web.yml``


Databases data initialization
Expand Down Expand Up @@ -110,7 +104,7 @@ For basic configuration remove default config and copy yeti-web.dist.nginx:
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# service nginx restart
# systemctl restart nginx


Launch
Expand All @@ -120,11 +114,7 @@ After successful configuration of databases you finally can run software using f

.. code-block:: console

# service yeti-web start
# service yeti-cdr-billing@cdr_billing start
# service yeti-cdr-billing@cdr_stats
# service yeti-delayed-job start
# service yeti-scheduler start
# systemctl start yeti-web yeti-delayed-job yeti-scheduler yeti-cdr-billing@cdr_billing yeti-cdr-billing@cdr_stats

This will run web-interface, schedulers, background tasks processors and CDR processing workers

Expand All @@ -146,7 +136,7 @@ check if nginx listens on correct TCP/IP addresses and ports:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23627/nginx
tcp 0 0 127.0.0.1:6666 0.0.0.0:* LISTEN 23627/nginx

Log files to check for possible warnings/errors using systemctl and journalctl:
Log files to check for possible warnings/errors using ``systemctl`` and ``journalctl``:

.. code-block:: console

Expand Down