Skip to content

Commit f4a542e

Browse files
kamil-certatsebix
authored andcommitted
Breaking installation into steps, added script
1 parent 0eea65f commit f4a542e

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

docs/user/intelmq-api.rst

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ The `intelmq-api` package ships the following example files:
5959

6060
The value of ``${PREFIX}`` depends on your environment and is something like ``/usr/local/lib/pythonX.Y/dist-packages/`` (where ``X.Y`` is your Python version).
6161

62+
.. note::
63+
64+
All configuration files have example paths to the IntelMQ API package. During the installation
65+
please ensure to update them with the right value, as the ``${PREFIX}``.
66+
67+
Installing packages
68+
~~~~~~~~~~~~~~~~~~~
69+
70+
Let's start with installing the IntelMQ API package:
71+
72+
.. code-block:: bash
73+
74+
pip install intelmq-api
75+
6276
You need to install Gunicorn and Apache2 on your own, e.g., using apt:
6377

6478
.. code-block:: bash
@@ -71,6 +85,8 @@ Then, if you didn't use it before, ensure to enable the ``proxy_http`` module fo
7185
7286
a2enmod proxy_http
7387
88+
Configuring Apache
89+
~~~~~~~~~~~~~~~~~~
7490

7591
The file ``${PREFIX}/etc/intelmq/api-apache.conf`` needs to be placed in the correct place for your Apache 2 installation.
7692
- On Debian and Ubuntu, move the file to ``/etc/apache2/conf-available.d/api-apache.conf`` and then execute ``a2enconf api-apache``.
@@ -79,6 +95,17 @@ The file ``${PREFIX}/etc/intelmq/api-apache.conf`` needs to be placed in the cor
7995

8096
Don't forget to reload the Apache2 afterwards.
8197

98+
Configuring Systemd services
99+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100+
101+
.. note::
102+
103+
This step could be also done by calling the script:
104+
105+
.. code-block:: bash
106+
107+
intelmq-api-setup-systemd
108+
82109
The systemd configuration files (``intelmq-api.service`` and ``intelmq-api.socket``) are responsible
83110
for instructing systemd daemon to start and keep running Gunicorn (that serves the API), and
84111
forwarding requests between proxy and the Gunicorn instance.
@@ -90,6 +117,9 @@ forwarding requests between proxy and the Gunicorn instance.
90117
After moving files, you can enable the service by executing ``systemctl enable intelmq-api`` to
91118
start it on the system startup.
92119

120+
Setup API configuration files
121+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122+
93123
- The file ``${PREFIX}/etc/intelmq/api-config.json`` needs to be moved to ``/etc/intelmq/api-config.json``.
94124
- The file ``${PREFIX}/etc/intelmq/manager/positions.conf`` needs to be moved to ``/etc/intelmq/manager/positions.conf``.
95125
- Last but not least move the file ``${PREFIX}/etc/intelmq/api-sudoers.conf`` to ``/etc/sudoers.d/01_intelmq-api`` and adapt the webserver username in this file. Set the file permissions to ``0o440``.
@@ -98,14 +128,19 @@ Afterwards, continue with the section Permissions below. When you finish the con
98128
you can start the service using ``systemctl start intelmq-api``. You may need to restart the service
99129
after any configuration change.
100130

101-
.. note::
131+
Next steps
132+
~~~~~~~~~~
133+
134+
The example Apache2 and Gunicorn configurations serve the IntelMQ API under ``/intelmq`` prefix,
135+
what means that at this moment you should be able to get, e.g., the API documentation under
136+
``/intelmq/docs`` etc.
102137

103-
The example Apache2 and Gunicorn configurations serve the IntelMQ API under ``/intelmq`` prefix,
104-
what means that you should be able to get, e.g., the documentation under ``/intelmq/docs`` etc.
138+
Now, you should continue with the API configuration and creating users. If you didn't do it before,
139+
it's also time to configure IntelMQ itself.
105140

106-
IntelMQ 2.3.1 comes with a tool ``intelmqsetup`` which performs these set-up steps automatically.
107-
Please note that the tool is very new and may not detect all situations correctly. Please report us any bugs you are observing.
108-
The tool is idempotent, you can execute it multiple times.
141+
IntelMQ 2.3.1 comes with a tool ``intelmqsetup`` which helps with performing some steps automatically.
142+
Please note that the tool is still under development and may not detect all situations correctly.
143+
Please report us any bugs you are observing. The tool is idempotent, you can execute it multiple times.
109144

110145
***********************
111146
Configuring intelmq-api

0 commit comments

Comments
 (0)