You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/intelmq-api.rst
+41-6Lines changed: 41 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,20 @@ The `intelmq-api` package ships the following example files:
59
59
60
60
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).
61
61
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
+
62
76
You need to install Gunicorn and Apache2 on your own, e.g., using apt:
63
77
64
78
.. code-block:: bash
@@ -71,6 +85,8 @@ Then, if you didn't use it before, ensure to enable the ``proxy_http`` module fo
71
85
72
86
a2enmod proxy_http
73
87
88
+
Configuring Apache
89
+
~~~~~~~~~~~~~~~~~~
74
90
75
91
The file ``${PREFIX}/etc/intelmq/api-apache.conf`` needs to be placed in the correct place for your Apache 2 installation.
76
92
- 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
79
95
80
96
Don't forget to reload the Apache2 afterwards.
81
97
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
+
82
109
The systemd configuration files (``intelmq-api.service`` and ``intelmq-api.socket``) are responsible
83
110
for instructing systemd daemon to start and keep running Gunicorn (that serves the API), and
84
111
forwarding requests between proxy and the Gunicorn instance.
@@ -90,6 +117,9 @@ forwarding requests between proxy and the Gunicorn instance.
90
117
After moving files, you can enable the service by executing ``systemctl enable intelmq-api`` to
91
118
start it on the system startup.
92
119
120
+
Setup API configuration files
121
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122
+
93
123
- The file ``${PREFIX}/etc/intelmq/api-config.json`` needs to be moved to ``/etc/intelmq/api-config.json``.
94
124
- The file ``${PREFIX}/etc/intelmq/manager/positions.conf`` needs to be moved to ``/etc/intelmq/manager/positions.conf``.
95
125
- 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
98
128
you can start the service using ``systemctl start intelmq-api``. You may need to restart the service
99
129
after any configuration change.
100
130
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.
102
137
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.
105
140
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.
0 commit comments