Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added available packages check before installation #80

Conversation

davidcr01
Copy link
Contributor

Description

Related: #65

The aim of this PR is to add a new logic to the installation assistant to check if the Wazuh central packages are available to install.

With this new development, we avoid that the installation is started when the packages are not available to install.

Testing

The complete testing is: #65 (comment)

A log example when the packages are not available to install:

[root@ip-172-31-41-54 ec2-user]# bash wazuh-install.sh -a -v
27/09/2024 13:46:52 DEBUG: Checking root permissions.
27/09/2024 13:46:52 DEBUG: Checking sudo package.
27/09/2024 13:46:52 INFO: Starting Wazuh installation assistant. Wazuh version: 4.10.1
27/09/2024 13:46:52 INFO: Verbose logging redirected to /var/log/wazuh-install.log
27/09/2024 13:46:52 DEBUG: YUM package manager will be used.
27/09/2024 13:46:52 DEBUG: Checking system distribution.
27/09/2024 13:46:52 DEBUG: Detected distribution name: amzn
27/09/2024 13:46:52 DEBUG: Detected distribution version: 2023
27/09/2024 13:46:52 DEBUG: Checking Wazuh installation.
27/09/2024 13:46:52 DEBUG: Checking system architecture.
27/09/2024 13:46:52 DEBUG: Adding the Wazuh repository.
[wazuh]
gpgcheck=1
gpgkey=https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH
enabled=1
name=EL-${releasever} - Wazuh
baseurl=https://packages-dev.wazuh.com/pre-release/yum/
protect=1
27/09/2024 13:46:53 INFO: Wazuh development repository added.
27/09/2024 13:46:53 ERROR: Package wazuh-indexer (version 4.10.1) is NOT available for installation.
27/09/2024 13:46:53 INFO: --- Removing existing Wazuh installation ---
27/09/2024 13:46:53 DEBUG: Removing GPG key from system.
27/09/2024 13:46:54 INFO: Installation cleaned. Check the /var/log/wazuh-install.log file to learn more about the issue.
[root@ip-172-31-41-54 ec2-user]# 

@davidcr01 davidcr01 requested a review from a team September 27, 2024 14:57
@davidcr01 davidcr01 self-assigned this Sep 27, 2024
@davidcr01 davidcr01 linked an issue Sep 27, 2024 that may be closed by this pull request
5 tasks
c-bordon
c-bordon previously approved these changes Sep 27, 2024
teddytpc1
teddytpc1 previously approved these changes Sep 27, 2024
@davidcr01 davidcr01 dismissed stale reviews from teddytpc1 and c-bordon via 8b8531c October 1, 2024 11:48
@c-bordon c-bordon merged commit b53be85 into main Oct 1, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Available packages must be checked before installation
3 participants