Closed GGP1 closed 1 month ago
After making the modifications to use a cluster and to listen on localhost by default, I realized that the pull request was becoming too big and decided to split the work into two different issues.
I opened https://github.com/wazuh/wazuh/issues/25895 to continue working on that and I kept this one focused on initializing the wazuh-server
and all the subprocesses.
Started by creating a docker image without all the legacy modules and that uses wazuh_clusterd.py
as the entrypoint. I'm still working on installing the embedded python interpreter without unnecessary dependencies.
I tried setting up an environment with the embedded and then installing the dependencies in the interpreter but both require several days of work to get 5.0 working without the current installation.
I continued with the initialization in the current environment and making changes to initialize both APIs during cluster startup.
Implemented part of the initialization, tested the changes and updated unit tests. To finish the development, I must contact the CppServer team to ask for guidance to execute the Engine and do some extra tests.
Added the engine process initialization and validated that everything runs as expected after the changes.
I simplified the way in which we started the daemons, included the wazuh-engined
PID file in the folder where the others are stored so the manager status takes it into account.
We decided not to include changes to the naming and paths in this PR, since that would require changing thousands lines of code. We will be performing those changes in new issues.
Applied suggested changes.
Description
In Wazuh v5.0, the
wazuh-server
daemon will be in charge of initiating all the other daemons.This issue aims to implement the logic necessary to fulfill the functional and non-functional requirements listed below.
wazuh-server structure diagram
![wazuh-server](https://github.com/user-attachments/assets/a55af5f3-59c3-4ed7-a38c-fbb5d1c591e2)Functional requirements
wazuh-server
must be always running and will be the principal daemon of the Wazuh Server, initializing first before any other daemon that it will start via the Process Control task.wazuh-server
daemon must be able to capture the sub-processes output and instruct them whether to log messages to a file, remote host or just the standard streams.Non-functional requirements
Implementation restrictions
Tasks