Skip to content

Commit 3037f98

Browse files
committed
{WiP} Update the installation guide
1 parent fdb9106 commit 3037f98

File tree

4 files changed

+101
-97
lines changed

4 files changed

+101
-97
lines changed

source/_templates/installations/indexer/common/configure_indexer_nodes.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
.. Copyright (C) 2015, Wazuh, Inc.
22
3+
#. Edit ``/etc/wazuh-indexer/opensearch.yml`` and replace the following values:
34

4-
#. Edit the ``/etc/wazuh-indexer/opensearch.yml`` configuration file and replace the following values:
55

6-
7-
#. ``network.host``: Sets the address of this node for both HTTP and transport traffic. The node will bind to this address and use it as its publish address. Accepts an IP address or a hostname.
8-
9-
Use the same node address set in ``config.yml`` to create the SSL certificates.
6+
#. ``network.host``: Sets the address of this node for both HTTP and transport traffic. The node will bind to this address and use it as its publish address. Accepts an IP address or a hostname.
7+
8+
Use the same node address set in ``config.yml`` to create the SSL certificates.
109

1110
#. ``node.name``: Name of the Wazuh indexer node as defined in the ``config.yml`` file. For example, ``node-1``.
1211

@@ -19,15 +18,15 @@
1918
- "node-2"
2019
- "node-3"
2120
22-
#. ``discovery.seed_hosts:`` List of the addresses of the master-eligible nodes. Each element can be either an IP address or a hostname. You may leave this setting commented if you are configuring the Wazuh indexer as a single node. For multi-node configurations, uncomment this setting and set the IP addresses of each master-eligible node.
21+
#. ``discovery.seed_hosts:`` List of the addresses of the master-eligible nodes. Each element can be either an IP address or a hostname. You may leave this setting commented if you are configuring the Wazuh indexer as a single node. For multi-node configurations, uncomment this setting and set the IP addresses of each master-eligible node.
2322

2423
.. code-block:: yaml
2524
2625
discovery.seed_hosts:
2726
- "10.0.0.1"
2827
- "10.0.0.2"
2928
- "10.0.0.3"
30-
29+
3130
#. ``plugins.security.nodes_dn``: List of the Distinguished Names of the certificates of all the Wazuh indexer cluster nodes. Uncomment the lines for ``node-2`` and ``node-3`` and change the common names (CN) and values according to your settings and your ``config.yml`` definitions.
3231

3332
.. code-block:: yaml
Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
.. Copyright (C) 2015, Wazuh, Inc.
22
3+
#. Run the following commands, replacing ``<INDEXER_NODE_NAME>`` with the name of the Wazuh indexer node you are configuring as defined in ``config.yml``. For example, ``node-1``. This deploys the SSL certificates to encrypt communications between the Wazuh central components.
34

4-
#. Run the following commands replacing ``<INDEXER_NODE_NAME>`` with the name of the Wazuh indexer node you are configuring as defined in ``config.yml``. For example, ``node-1``. This deploys the SSL certificates to encrypt communications between the Wazuh central components.
5+
.. code-block:: console
6+
7+
# NODE_NAME=<INDEXER_NODE_NAME>
8+
9+
.. code-block:: console
10+
11+
# mkdir /etc/wazuh-indexer/certs
12+
# tar -xf ./wazuh-certificates.tar -C /etc/wazuh-indexer/certs/ ./$NODE_NAME.pem ./$NODE_NAME-key.pem ./admin.pem ./admin-key.pem ./root-ca.pem
13+
# mv -n /etc/wazuh-indexer/certs/$NODE_NAME.pem /etc/wazuh-indexer/certs/indexer.pem
14+
# mv -n /etc/wazuh-indexer/certs/$NODE_NAME-key.pem /etc/wazuh-indexer/certs/indexer-key.pem
15+
# chmod 500 /etc/wazuh-indexer/certs
16+
# chmod 400 /etc/wazuh-indexer/certs/*
17+
# chown -R wazuh-indexer:wazuh-indexer /etc/wazuh-indexer/certs
18+
19+
#. **Recommended action**: If no other Wazuh components will be installed on this node, run the following command to remove the ``wazuh-certificates.tar`` file.
520

621
.. code-block:: console
722
8-
# NODE_NAME=<INDEXER_NODE_NAME>
9-
10-
.. code-block:: console
11-
12-
# mkdir /etc/wazuh-indexer/certs
13-
# tar -xf ./wazuh-certificates.tar -C /etc/wazuh-indexer/certs/ ./$NODE_NAME.pem ./$NODE_NAME-key.pem ./admin.pem ./admin-key.pem ./root-ca.pem
14-
# mv -n /etc/wazuh-indexer/certs/$NODE_NAME.pem /etc/wazuh-indexer/certs/indexer.pem
15-
# mv -n /etc/wazuh-indexer/certs/$NODE_NAME-key.pem /etc/wazuh-indexer/certs/indexer-key.pem
16-
# chmod 500 /etc/wazuh-indexer/certs
17-
# chmod 400 /etc/wazuh-indexer/certs/*
18-
# chown -R wazuh-indexer:wazuh-indexer /etc/wazuh-indexer/certs
19-
20-
#. **Recommended action**: If no other Wazuh components are going to be installed on this node, remove the ``wazuh-certificates.tar`` file by running ``rm -f ./wazuh-certificates.tar`` to increase security.
23+
# rm -f ./wazuh-certificates.tar
2124
2225
.. End of include file

source/_templates/installations/indexer/common/install-dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. Copyright (C) 2015, Wazuh, Inc.
22
3-
#. Install the following packages if missing:
3+
#. Run the following command to install the following packages if missing:
44

55
.. tabs::
66

Lines changed: 77 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
.. Copyright (C) 2015, Wazuh, Inc.
22
33
.. meta::
4-
:description: Wazuh indexer is a highly scalable full-text search engine. Install the Wazuh indexer in a single-node or multi-node configuration according to your environment needs.
4+
:description: Wazuh indexer is a highly scalable full-text search engine. Install the Wazuh indexer in a single-node or multi-node configuration according to your environment needs.
55

66
Installing the Wazuh indexer step by step
77
=========================================
88

99
Install and configure the Wazuh indexer as a single-node or multi-node cluster following step-by-step instructions. Wazuh indexer is a highly scalable full-text search engine and offers advanced security, alerting, index management, deep performance analysis, and several other features.
1010

11-
The installation process is divided into three stages.
11+
The installation process is divided into three stages:
1212

13-
#. Certificates creation
14-
15-
#. Wazuh indexer nodes installation
16-
17-
#. Cluster initialization
13+
#. `Certificate creation`_
14+
#. `Wazuh indexer nodes installation`_
15+
#. `Cluster initialization`_
1816

17+
.. note::
1918

20-
.. note:: You need root user privileges to run all the commands described below.
19+
You need root user privileges to run all the commands described below.
2120

2221
.. _certificates_creation:
2322

24-
1. Certificates creation
25-
------------------------
26-
.. raw:: html
23+
Certificate creation
24+
--------------------
2725

28-
<div class="accordion-section open">
26+
Wazuh uses certificates to establish confidentiality and encrypt communications between its central components. Follow these steps to create certificates for the Wazuh central components.
2927

3028
Generating the SSL certificates
3129
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -34,68 +32,65 @@ Generating the SSL certificates
3432

3533
.. code-block:: console
3634
37-
# curl -sO https://packages.wazuh.com/|WAZUH_CURRENT_MINOR|/wazuh-certs-tool.sh
38-
# curl -sO https://packages.wazuh.com/|WAZUH_CURRENT_MINOR|/config.yml
35+
# curl -sO https://packages.wazuh.com/|WAZUH_CURRENT_MINOR|/wazuh-certs-tool.sh
36+
# curl -sO https://packages.wazuh.com/|WAZUH_CURRENT_MINOR|/config.yml
3937
4038
#. Edit ``./config.yml`` and replace the node names and IP values with the corresponding names and IP addresses. You need to do this for all Wazuh server, Wazuh indexer, and Wazuh dashboard nodes. Add as many node fields as needed.
4139

42-
.. code-block:: yaml
43-
44-
nodes:
45-
# Wazuh indexer nodes
46-
indexer:
47-
- name: node-1
48-
ip: "<indexer-node-ip>"
49-
#- name: node-2
50-
# ip: "<indexer-node-ip>"
51-
#- name: node-3
52-
# ip: "<indexer-node-ip>"
53-
54-
# Wazuh server nodes
55-
# If there is more than one Wazuh server
56-
# node, each one must have a node_type
57-
server:
58-
- name: wazuh-1
59-
ip: "<wazuh-manager-ip>"
60-
# node_type: master
61-
#- name: wazuh-2
62-
# ip: "<wazuh-manager-ip>"
63-
# node_type: worker
64-
#- name: wazuh-3
65-
# ip: "<wazuh-manager-ip>"
66-
# node_type: worker
67-
68-
# Wazuh dashboard nodes
69-
dashboard:
70-
- name: dashboard
71-
ip: "<dashboard-node-ip>"
72-
73-
74-
To learn more about how to create and configure the certificates, see the :doc:`/user-manual/wazuh-indexer-cluster/certificate-deployment` section.
40+
.. code-block:: yaml
41+
:emphasize-lines: 4-5, 15-16, 27-28
42+
43+
nodes:
44+
# Wazuh indexer nodes
45+
indexer:
46+
- name: node-1
47+
ip: "<indexer-node-ip>"
48+
#- name: node-2
49+
# ip: "<indexer-node-ip>"
50+
#- name: node-3
51+
# ip: "<indexer-node-ip>"
52+
53+
# Wazuh server nodes
54+
# If there is more than one Wazuh server
55+
# node, each one must have a node_type
56+
server:
57+
- name: wazuh-1
58+
ip: "<wazuh-manager-ip>"
59+
# node_type: master
60+
#- name: wazuh-2
61+
# ip: "<wazuh-manager-ip>"
62+
# node_type: worker
63+
#- name: wazuh-3
64+
# ip: "<wazuh-manager-ip>"
65+
# node_type: worker
66+
67+
# Wazuh dashboard nodes
68+
dashboard:
69+
- name: dashboard
70+
ip: "<dashboard-node-ip>"
71+
72+
73+
To learn more about how to create and configure the certificates, see the :doc:`/user-manual/wazuh-indexer-cluster/certificate-deployment` section.
7574

7675
#. Run ``./wazuh-certs-tool.sh`` to create the certificates. For a multi-node cluster, these certificates need to be later deployed to all Wazuh instances in your cluster.
7776

7877
.. code-block:: console
7978
80-
# bash ./wazuh-certs-tool.sh -A
79+
# bash ./wazuh-certs-tool.sh -A
8180
8281
#. Compress all the necessary files.
8382

8483
.. code-block:: console
8584
86-
# tar -cvf ./wazuh-certificates.tar -C ./wazuh-certificates/ .
87-
# rm -rf ./wazuh-certificates
88-
85+
# tar -cvf ./wazuh-certificates.tar -C ./wazuh-certificates/ .
86+
# rm -rf ./wazuh-certificates
8987
9088
#. Copy the ``wazuh-certificates.tar`` file to all the nodes, including the Wazuh indexer, Wazuh server, and Wazuh dashboard nodes. This can be done by using the ``scp`` utility.
9189

90+
Wazuh indexer nodes installation
91+
--------------------------------
9292

93-
2. Nodes installation
94-
---------------------
95-
.. raw:: html
96-
97-
<div class="accordion-section open">
98-
93+
Follow these steps to install and configure a single-node or multi-node Wazuh indexer.
9994

10095
Installing package dependencies
10196
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -147,7 +142,7 @@ Installing the Wazuh indexer
147142
Configuring the Wazuh indexer
148143
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149144

150-
.. include:: /_templates/installations/indexer/common/configure_indexer_nodes.rst
145+
.. include:: /_templates/installations/indexer/common/configure_indexer_nodes.rst
151146

152147
.. include:: /_templates/installations/common/firewall-ports-note.rst
153148

@@ -156,7 +151,7 @@ Deploying certificates
156151

157152
.. note::
158153

159-
Make sure that a copy of the ``wazuh-certificates.tar`` file, created during the initial configuration step, is placed in your working directory.
154+
Make sure that a copy of ``wazuh-certificates.tar``, created in the previous stage of the installation process, is placed in your working directory.
160155

161156
.. include:: /_templates/installations/indexer/common/deploy_certificates.rst
162157

@@ -170,38 +165,37 @@ Starting the service
170165
#. Enable and start the Wazuh indexer service.
171166

172167
.. include:: /_templates/installations/indexer/common/enable_indexer.rst
173-
174-
Repeat this stage of the installation process for every Wazuh indexer node in your cluster. Then proceed with initializing your single-node or multi-node cluster in the next stage.
168+
169+
Repeat this stage of the installation process for every Wazuh indexer node in your multi-node cluster. Then proceed with initializing your single-node or multi-node cluster in the next stage.
175170

176171
Disable Wazuh updates
177172
---------------------
178173

179174
.. include:: /_templates/installations/disable-wazuh-updates.rst
180175

181-
3. Cluster initialization
182-
-------------------------
183-
.. raw:: html
176+
Cluster initialization
177+
----------------------
184178

185-
<div class="accordion-section open">
179+
The final stage of installing the Wazuh indexer single-node or multi-node cluster consists of running the security admin script.
186180

187181
#. Run the Wazuh indexer ``indexer-security-init.sh`` script on `any` Wazuh indexer node to load the new certificates information and start the single-node or multi-node cluster.
188-
182+
189183
.. code-block:: console
190184
191185
# /usr/share/wazuh-indexer/bin/indexer-security-init.sh
192186
193187
.. note::
194-
195-
You only have to initialize the cluster *once*, there is no need to run this command on every node.
196-
188+
189+
You only have to initialize the cluster once, there is no need to run this command on every node.
190+
197191
Testing the cluster installation
198192
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
199193

200-
#. Replace ``<WAZUH_INDEXER_IP_ADDRESS>`` and run the following commands to confirm that the installation is successful.
194+
#. Run the following commands to confirm that the installation is successful. Replace ``<WAZUH_INDEXER_IP_ADDRESS>`` with the IP address of the Wazuh indexer and enter admin as the password when prompted:
201195

202196
.. code-block:: console
203197
204-
# curl -k -u admin:admin https://<WAZUH_INDEXER_IP_ADDRESS>:9200
198+
# curl -k -u admin https://<WAZUH_INDEXER_IP_ADDRESS>:9200
205199
206200
.. code-block:: none
207201
:class: output accordion-output
@@ -223,15 +217,23 @@ Testing the cluster installation
223217
"tagline" : "The OpenSearch Project: https://opensearch.org/"
224218
}
225219
226-
#. Replace ``<WAZUH_INDEXER_IP_ADDRESS>`` and run the following command to check if the single-node or multi-node cluster is working correctly.
227-
220+
#. Run the following command to check if the cluster is working correctly. Replace ``<WAZUH_INDEXER_IP_ADDRESS>`` with the IP address of the Wazuh indexer and enter admin as the password when prompted:
221+
228222
.. code-block:: console
229223
230-
# curl -k -u admin:admin https://<WAZUH_INDEXER_IP_ADDRESS>:9200/_cat/nodes?v
224+
# curl -k -u admin https://<WAZUH_INDEXER_IP_ADDRESS>:9200/_cat/nodes?v
225+
226+
The command produces output similar to the following:
227+
228+
.. code-block:: none
229+
:class: output
230+
231+
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role node.roles cluster_manager name
232+
192.168.107.240 19 94 4 0.22 0.21 0.20 dimr data,ingest,master,remote_cluster_client * node-1
231233
232234
Next steps
233235
----------
234236

235237
The Wazuh indexer is now successfully installed on your single-node or multi-node cluster, and you can proceed with installing the Wazuh server. To perform this action, see the :doc:`../wazuh-server/step-by-step` section.
236238

237-
If you want to uninstall the Wazuh indexer, see :ref:`uninstall_indexer`.
239+
To uninstall the Wazuh indexer, see :ref:`uninstall_indexer`.

0 commit comments

Comments
 (0)