|
2 | 2 | Wazuh
|
3 | 3 | =====
|
4 | 4 |
|
| 5 | +The short version |
| 6 | +================= |
| 7 | + |
| 8 | +#. Create an infrastructure VM for the Wazuh manager, and add it to the wazuh-manager group |
| 9 | +#. Configure the infrastructure VM with kayobe: ``kayobe infra vm host configure`` |
| 10 | +#. Edit your config under |
| 11 | + ``etc/kayobe/inventory/group_vars/wazuh-manager/wazuh-manager``, in |
| 12 | + particular the defaults assume that the ``provision_oc_net`` network will be |
| 13 | + used. |
| 14 | +#. Generate secrets: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-secrets.yml`` |
| 15 | +#. Encrypt the secrets: ``ansible-vault encrypt --vault-password-file ~/vault.password $KAYOBE_CONFIG_PATH/environments/ci-multinode/wazuh-secrets.yml`` |
| 16 | +#. Deploy the Wazuh manager: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-manager.yml`` |
| 17 | +#. Deploy the Wazuh agents: ``kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/wazuh-agent.yml`` |
| 18 | + |
| 19 | + |
5 | 20 | Wazuh Manager
|
6 | 21 | =============
|
7 | 22 |
|
@@ -74,8 +89,8 @@ Define network interfaces ``etc/kayobe/inventory/group_vars/wazuh-manager/networ
|
74 | 89 |
|
75 | 90 |
|
76 | 91 | The Wazuh manager may need to be exposed externally, in which case it may require another interface.
|
77 |
| -This can be done as follows in ``etc/kayobe/inventory/group_vars/wazuh-manager/network-interfaces`` , |
78 |
| -with the network defined in network.yml as usual. |
| 92 | +This can be done as follows in ``etc/kayobe/inventory/group_vars/wazuh-manager/network-interfaces``, |
| 93 | +with the network defined in ``networks.yml`` as usual. |
79 | 94 |
|
80 | 95 | .. code-block:: console
|
81 | 96 |
|
@@ -128,18 +143,18 @@ Several services are used for the communication of Wazuh components. Below is th
|
128 | 143 | Manually provisioned VM
|
129 | 144 | -----------------------
|
130 | 145 |
|
131 |
| -In case where you can’t use infra-vms to deploy your wazuh-manager VM but you want to configure |
132 |
| -host using kayobe, there are some tips (note that depending on your setup this don’t have to always apply): |
| 146 | +In cases where you can’t use infra-vms to deploy your wazuh-manager VM but you want to configure |
| 147 | +the host using kayobe, here are some tips (note that depending on your setup this doesn't have to always apply): |
133 | 148 |
|
134 |
| -* Depending on preferences host have to be part of some group in inventory. ``infra-vms`` group still seems as best choice |
| 149 | +* Depending on preferences, hosts have to be part of some group in inventory. ``infra-vms`` group still seems like the best choice. |
135 | 150 | You can use ``kayobe infra vm host configure`` to configure host in this case.
|
136 |
| - Bellow tips are based on assumption that infra-vm will be used. |
137 |
| -* user ``stack`` with password less sudo and accessible with ssh keys needs to be present on host. |
| 151 | + The tips below are based on the assumption that infra-vm will be used. |
| 152 | +* user ``stack`` with passwordless sudo and access with ssh keys needs to be present on the host. |
138 | 153 | It can be achieved in many different ways, depending on your setup.
|
139 | 154 | * lvm configuration should be placed in ``host_vars/<host_name>``
|
140 |
| -* wazuh-manager host have to be part of ``infra-vms`` group (directly or as child) |
141 |
| -* network used on host needs to be defined in ``networks.yml`` and |
142 |
| - if you have pre-alocated IP, it should be added to ``network-allocation.yml``. |
| 155 | +* wazuh-manager hosts have to be part of ``infra-vms`` group (directly or as child) |
| 156 | +* The network used on the host needs to be defined in ``networks.yml`` and |
| 157 | + if you have pre-alocated an IP, it should be added to ``network-allocation.yml``. |
143 | 158 | For example, if using host with IP 10.10.224.5 in network 10.10.224.0/24 one have to add:
|
144 | 159 |
|
145 | 160 |
|
@@ -169,18 +184,18 @@ Deploying Wazuh Manager services
|
169 | 184 | Setup
|
170 | 185 | -----
|
171 | 186 |
|
172 |
| -To install specific version modify wazuh-ansible entry in ``etc/kayobe/ansible/requirements.yml``: |
| 187 | +To install a specific version modify the wazuh-ansible entry in ``etc/kayobe/ansible/requirements.yml``: |
173 | 188 |
|
174 | 189 | .. code-block:: console
|
175 | 190 |
|
176 | 191 | roles:
|
177 | 192 | - name: wazuh-ansible
|
178 | 193 | src: https://github.com/stackhpc/wazuh-ansible
|
179 |
| - version: stackhpc |
| 194 | + version: custom-branch |
180 | 195 |
|
181 |
| -Version above was tested and verified, but there is no reason to use not different one. |
| 196 | +The default version has been tested and verified, but there is no reason not to use a different one. |
182 | 197 |
|
183 |
| -Install the role: |
| 198 | +Reinstall the role if required: |
184 | 199 |
|
185 | 200 | ``kayobe control host bootstrap``
|
186 | 201 |
|
@@ -210,9 +225,10 @@ You may need to modify some of the variables, including:
|
210 | 225 | .. note::
|
211 | 226 |
|
212 | 227 | NOTE:
|
213 |
| - If you are using multiple environments, and you need to customise Wazuh in each environement, create override files in an appropriate directory, |
| 228 | + If you are using multiple environments, and you need to customise Wazuh in |
| 229 | + each environment, create override files in an appropriate directory, |
214 | 230 | for example `etc/kayobe/environments/production/inventory/group_vars/`
|
215 |
| - Files which values can be overridden (in context of Wazuh): |
| 231 | + Files which values can be overridden (in the context of Wazuh): |
216 | 232 | - etc/kayobe/inventory/group_vars/wazuh/wazuh-manager/wazuh-manager
|
217 | 233 | - etc/kayobe/wazuh-manager.yml
|
218 | 234 | - etc/kayobe/inventory/group_vars/wazuh/wazuh-agent/wazuh-agent
|
@@ -259,7 +275,6 @@ does not exist, it will generate the following certificates in ``etc/kayobe/ansi
|
259 | 275 | * root-ca.key root-ca.pem
|
260 | 276 |
|
261 | 277 |
|
262 |
| - |
263 | 278 | It is also possible to use externally generated certificates for wazuh-dashboard. root-ca.pem should contain the CA chain.
|
264 | 279 | Those certificates can be uploaded to ``etc/kayobe/ansible/wazuh/custom_certificates``,
|
265 | 280 | and will replace certificates generated by wazuh.
|
|
0 commit comments