The aim of this PR is to rework the dependencies installation of the Installation assistant. The original aim of this development is to make the Installation assistant ask for permission to install the necessary dependencies in the performed installation.
Before, the script installed the necessary dependencies for the installation, without asking the user for confirmation. Now, to control this, a new parameter -id|--install-dependencies has been added. If the user wants the Installation assistant to install the dependencies automatically, a new parameter must be added. Otherwise, the installation will be stopped if a dependency is required.
Example:
[!NOTE]
WARNING: To perform the installation, the following package/s must be installed: lsof, openssl, software-properties-common. The following package/s will be removed after the installation: lsof, openssl. Add the -id|--install-dependencies parameter to install them automatically or install them manually.
Other changes
Other changes and improvements have been added:
Removed all WIA references, and replaced them by "Assistant". The WIA term should not be used anymore as it can be confusing.
The lsof and openssl are not installed separately, they belong to the global list of dependencies. These dependencies will be installed only when necessary.
The Assistant dependencies are removed after completing the installation, or if the installation is rollbacked.
The function that installs a dependency list is now unified.
The function that removes the Assistant dependencies is now unified.
The used ports are scanned at an early stage, to simplify the code.
The addition and deletion of CentOS repositories are better controlled.
The installCommon_installCheckDependencies and installCommon_installPrerequisites functions are removed and are unified into the installCommon_installDependencies function.
Some confusing variables were renamed to more clarifying definitions.
Description
The aim of this PR is to rework the dependencies installation of the Installation assistant. The original aim of this development is to make the Installation assistant ask for permission to install the necessary dependencies in the performed installation.
Before, the script installed the necessary dependencies for the installation, without asking the user for confirmation. Now, to control this, a new parameter
-id|--install-dependencies
has been added. If the user wants the Installation assistant to install the dependencies automatically, a new parameter must be added. Otherwise, the installation will be stopped if a dependency is required.Example:
Other changes
Other changes and improvements have been added:
WIA
term should not be used anymore as it can be confusing.lsof
andopenssl
are not installed separately, they belong to the global list of dependencies. These dependencies will be installed only when necessary.installCommon_installCheckDependencies
andinstallCommon_installPrerequisites
functions are removed and are unified into theinstallCommon_installDependencies
function.Tests
:green_circle: Validation of the new parameter: https://github.com/wazuh/wazuh-packages/issues/2879#issuecomment-2145656716
:green_circle: AIO installation: https://github.com/wazuh/wazuh-packages/issues/2879#issuecomment-2149635491
:green_circle: Wazuh indexer installation: https://github.com/wazuh/wazuh-packages/issues/2879#issuecomment-2147969185
:green_circle: Wazuh manager installation: https://github.com/wazuh/wazuh-packages/issues/2879#issuecomment-2148005114
:green_circle: Wazuh dashboard installation: https://github.com/wazuh/wazuh-packages/issues/2879#issuecomment-2148031374
:green_circle: Testing dashboard port change: https://github.com/wazuh/wazuh-packages/issues/2879#issuecomment-2163266795