Skip to content
Snippets Groups Projects
Commit e61f36f5 authored by Jan Mach's avatar Jan Mach
Browse files

Fix: Added the missing event migrations to Debian package.

(Redmine issue: #3361,#3387,#4216)
parent 14c27f7f
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ Installation
The Mentat system is available as native Python package from PyPI. However there
is only so much you can do with setuptools. To make the installation more convenient
is only so much you can do with setuptools, so to make the installation more convenient
for users we are also providing package for Debian based systems via our custom
internal repository. We are trying hard to keep the installation process as simple
as possible, however at the same time we try not to force too many decisions on the
......@@ -19,10 +19,10 @@ to your setup and preferences.
As an example try to compare version of `PostgreSQL <https://www.postgresql.org>`__
database that is available via official Debian repositories with version available
via repository operated by `PostgreSQL <https://www.postgresql.org>`__ development
team. That is the reason why we did not add is directly to the list of Debian package
dependencies.
team. That is the reason why we did not add that directly to the list of Debian
package dependencies.
Currently you have following installation options:
To sum it up currently you have following installation options:
#. :ref:`section-installation-manual`
#. :ref:`section-installation-git`
......@@ -31,8 +31,8 @@ Currently you have following installation options:
.. note::
We are using HTTPS to serve our internal Debian package repository. You need
to have the ``apt-transport-https`` package installed on your target host to
be able to access it.
to have the ``apt-transport-https`` package installed on your target Debian
host to be able to access it.
Dependencies
......@@ -55,7 +55,8 @@ Following is a list of most important system dependencies:
* `Debian packages <https://packages.debian.org/search?keywords=rrdtool>`_
This dependency will be istalled for you automatically by Debian packaging
system.
system, because the package version in Debian repository is good enough for
our needs.
`PostgreSQL <https://www.postgresql.org>`__
PostgreSQL is a powerful, open source object-relational database system. It
......@@ -71,7 +72,7 @@ Following is a list of most important system dependencies:
Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among others, and exceptional
documentation.
In Mentat system it is used as backend service for persistent data storage.
In Mentat system it is used as a backend service for persistent data storage.
* `Documentation <https://www.postgresql.org/docs/>`__
* `Installation guide for Debian systems <https://www.postgresql.org/download/linux/debian/>`__
......@@ -81,11 +82,15 @@ Following is a list of most important system dependencies:
role `postgresql <https://galaxy.ansible.com/honzamach/postgresql>`__
(see section :ref:`section-installation-ansible` below for more details).
Additionally, it is necessary to install the `IP4R <https://github.com/RhodiumToad/ip4r>`__
PostgreSQL extension to enable support for better handling of mixed IP addresses
and ranges.
Python dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Following is a list of most important Python dependencies:
Following is a list of most important and/or notable Python dependencies:
`geoip2 <https://pypi.org/project/geoip2/>`__
Python binding for `MaxMind <https://www.maxmind.com/en/home>`__
......@@ -138,12 +143,17 @@ Following is a list of most important Python dependencies:
Python library for filtering, querying or inspecting almost arbitrary data
structures.
All these dependencies can be quickly installed using ``pip3`` and prepared Python
requirements file ``/etc/mentat/requirements.pip``:
When installing from our Debian packages, all these dependencies are installed
for you automatically into a separate Python virtual environment (we try hard
not to mess up your host system). In case you need to install/reinstall them
manually, you can use ``pip3`` and prepared Python requirements file
``/etc/mentat/requirements.pip``:
.. code-block:: shell
pip3 install -r /etc/mentat/requirements.pip
$ . /var/mentat/venv/bin/activate
(venv) $ pip3 install -r /etc/mentat/requirements.pip
(venv) $ deactivate
.. _section-installation-manual:
......@@ -181,8 +191,8 @@ After these steps there are several post-installation tasks to be performed:
$ mentat-dbmngr.py --command init
# Step 9: Stamp both metadata end event databases with latest migration revisions:
$ /etc/mentat/scripts/sqldb-migrate.py db stamp head --directory /etc/mentat/migrations
$ /etc/mentat/scripts/sqldb-migrate-e.sh stamp head
$ hawat-cli db stamp head
$ /etc/mentat/scripts/sqldb-migrate.sh stamp head
# Step 10: Precache various event search form select option dictionaries:
$ mentat-precache.py --allow-empty
......@@ -263,8 +273,8 @@ After these steps there are several post-installation tasks to be performed:
(venv) $ mentat-dbmngr.py --command init
# Step 11: Stamp both metadata end event databases with latest migration revisions:
(venv) $ ./scripts/sqldb-migrate.py db stamp head --directory ./migrations-events
(venv) $ ./scripts/sqldb-migrate-e.sh stamp head
(venv) $ hawat-cli db stamp head
(venv) $ ./scripts/sqldb-migrate.sh stamp head
# Step 12: Precache various event search form select option dictionaries:
(venv) $ mentat-precache.py --allow-empty
......
......@@ -22,7 +22,7 @@ fi
${MENTAT_VENV}/bin/pip install -r /etc/mentat/requirements.pip
# Install Mentat system itself.
${MENTAT_VENV}/bin/pip install -r /etc/mentat/install.pip --upgrade
${MENTAT_VENV}/bin/pip install -r /etc/mentat/install.pip --upgrade --no-deps
mentat_bin_list=(
hawat-cli
......
......@@ -20,6 +20,7 @@ binary:
cp -r ../conf/* debian/mentat-ng/etc/mentat/
cp -r ../scripts debian/mentat-ng/etc/mentat/
cp -r ../migrations-events debian/mentat-ng/etc/mentat/
cp -r ../etc/bash_completion.d/* debian/mentat-ng/usr/share/bash-completion/completions
cp -r ../etc/default debian/mentat-ng/etc/
cp -r ../etc/init.d debian/mentat-ng/etc/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment