wazuh / wazuh-installation-assistant

Wazuh - Installation assistant
https://wazuh.com/
GNU General Public License v2.0
0 stars 3 forks source link

The `offline_checkPrerequisites` function must be deleted #96

Closed davidcr01 closed 1 week ago

davidcr01 commented 2 weeks ago

Description

While documenting the Wazuh installation assistant functions, I noticed that the offline_checkPrerequisites is the same as the offline_checkDependencies function:

https://github.com/wazuh/wazuh-installation-assistant/blob/b3b1e4c96a09e8c4770b11f012a8085ed5abb07a/install_functions/wazuh-offline-installation.sh#L34-L51

The offline_checkPrerequisites function is duplicated and it not being used.

[!NOTE] This function is in the code of the 4.10.0 version.

Enaraque commented 1 week ago

Update report

We removed the offline_checkDependencies function to use only the offline_checkPrerequisites instead. With this, we have added a new parameter when we call to offline_checkPrerequisites to check the dependencies to differentiate the wazuh installation assistant dependencies from the wazuh offline installation prerequisites.

Testing

For now, we have been testing this functionality in RPM instances. It remains to be tested in APT ones.

[root@ip-172-31-46-248 wazuh-installation-assistant]# bash wazuh-install.sh --offline-installation --wazuh-dashboard dashboard -o
08/10/2024 17:05:00 INFO: Starting Wazuh installation assistant. Wazuh version: 4.9.0
08/10/2024 17:05:00 INFO: Verbose logging redirected to /var/log/wazuh-install.log
In offline_checkPrerequisites:
Dependencies: curl tar gnupg openssl lsof
08/10/2024 17:05:01 INFO: Checking dependencies for Wazuh installation assistant.
08/10/2024 17:05:05 INFO: --- Removing existing Wazuh installation ---
08/10/2024 17:05:05 INFO: Removing Wazuh dashboard.
08/10/2024 17:05:24 WARNING: The Wazuh dashboard package could not be removed.
08/10/2024 17:05:24 INFO: Installation cleaned.
08/10/2024 17:05:24 INFO: Verifying that your system meets the recommended minimum hardware requirements.
08/10/2024 17:05:24 INFO: Wazuh web interface port will be 443.
In offline_checkPrerequisites:
Dependencies: libcap
08/10/2024 17:05:25 INFO: Checking prerequisites for Offline installation.
08/10/2024 17:05:25 INFO: Checking wazuh-offline.tar.gz file.
08/10/2024 17:05:26 INFO: --- Wazuh dashboard ----
08/10/2024 17:05:26 INFO: Starting Wazuh dashboard installation.
08/10/2024 17:07:50 INFO: Wazuh dashboard installation finished.
08/10/2024 17:07:51 INFO: Wazuh dashboard post-install configuration finished.
08/10/2024 17:07:51 INFO: Starting service wazuh-dashboard.
08/10/2024 17:07:52 INFO: wazuh-dashboard service started.
08/10/2024 17:08:15 INFO: Initializing Wazuh dashboard web application.
08/10/2024 17:08:15 INFO: Wazuh dashboard web application initialized.
08/10/2024 17:08:15 INFO: --- Summary ---
08/10/2024 17:08:15 INFO: You can access the web interface https://<wazuh-dashboard-ip>:443
    User: admin
    Password: 4tLp+PiYp0sm7I?EZyKrggjlimeTm+n5
08/10/2024 17:08:15 INFO: Installation finished.