diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f10abf..693522e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,12 +34,18 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fixed bug when trying to download nonexistent filebeat_wazuh_template ([#124](https://github.com/wazuh/wazuh-installation-assistant/pull/124)) +- Fixed offline pre-release package download process ([#121](https://github.com/wazuh/wazuh-installation-assistant/pull/121)) - Changed GitHub Runner version to fix Python error ([#110](https://github.com/wazuh/wazuh-installation-assistant/pull/110)) - Fixed Wazuh API validation ([#29](https://github.com/wazuh/wazuh-installation-assistant/pull/29)) - Fixed token variable empty in Wazuh manager check ([#45](https://github.com/wazuh/wazuh-installation-assistant/pull/45)) - Fixed manager check in distributed deployment ([#52](https://github.com/wazuh/wazuh-installation-assistant/pull/52)) - Changed command order execution to get the TOKEN ([#57](https://github.com/wazuh/wazuh-installation-assistant/pull/57)) +## [4.9.2] + +- https://github.com/wazuh/wazuh-packages/releases/tag/v4.9.2 + ## [4.9.1] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.9.1 diff --git a/install_functions/indexer.sh b/install_functions/indexer.sh index d224e5e..c920b75 100644 --- a/install_functions/indexer.sh +++ b/install_functions/indexer.sh @@ -207,7 +207,7 @@ function indexer_startCluster() { filebeat_wazuh_template="file://${offline_files_path}/wazuh-template.json" fi http_status=$(eval "common_curl --silent '${filebeat_wazuh_template}' --max-time 300 --retry 5 --retry-delay 5" | eval "common_curl -X PUT 'https://${indexer_node_ips[pos]}:9200/_template/wazuh' -H \'Content-Type: application/json\' -d @- -uadmin:admin -k --max-time 300 --silent --retry 5 --retry-delay 5 -w "%{http_code}" -o /dev/null") - if [ "${http_status}" -ne 200 ]; then + if [ -z "${http_status}" ] || [ "${http_status}" -ne 200 ]; then common_logger -e "The wazuh-alerts template could not be inserted into the Wazuh indexer cluster." exit 1 else diff --git a/install_functions/installVariables.sh b/install_functions/installVariables.sh index 229153a..3335695 100644 --- a/install_functions/installVariables.sh +++ b/install_functions/installVariables.sh @@ -42,18 +42,18 @@ readonly apt_lockfile="/var/lib/dpkg/lock" ## Offline Installation vars readonly base_dest_folder="wazuh-offline" -readonly manager_deb_base_url="${base_url}/apt/pool/main/w/wazuh-manager" +manager_deb_base_url="${base_url}/apt/pool/main/w/wazuh-manager" readonly filebeat_deb_base_url="${base_url}/apt/pool/main/f/filebeat" readonly filebeat_deb_package="filebeat-oss-${filebeat_version}-amd64.deb" -readonly indexer_deb_base_url="${base_url}/apt/pool/main/w/wazuh-indexer" -readonly dashboard_deb_base_url="${base_url}/apt/pool/main/w/wazuh-dashboard" -readonly manager_rpm_base_url="${base_url}/yum" +indexer_deb_base_url="${base_url}/apt/pool/main/w/wazuh-indexer" +dashboard_deb_base_url="${base_url}/apt/pool/main/w/wazuh-dashboard" +manager_rpm_base_url="${base_url}/yum" readonly filebeat_rpm_base_url="${base_url}/yum" readonly filebeat_rpm_package="filebeat-oss-${filebeat_version}-x86_64.rpm" -readonly indexer_rpm_base_url="${base_url}/yum" -readonly dashboard_rpm_base_url="${base_url}/yum" +indexer_rpm_base_url="${base_url}/yum" +dashboard_rpm_base_url="${base_url}/yum" readonly wazuh_gpg_key="https://${bucket}/key/GPG-KEY-WAZUH" -readonly filebeat_config_file="${resources}/tpl/wazuh/filebeat/filebeat.yml" +filebeat_config_file="${resources}/tpl/wazuh/filebeat/filebeat.yml" adminUser="wazuh" adminPassword="wazuh" diff --git a/install_functions/wazuh-offline-download.sh b/install_functions/wazuh-offline-download.sh index cd81f19..36e10c9 100755 --- a/install_functions/wazuh-offline-download.sh +++ b/install_functions/wazuh-offline-download.sh @@ -27,6 +27,19 @@ function offline_download() { indexer_revision="1" dashboard_revision="1" + if [ -n "${development}" ]; then + filebeat_config_file="https://${bucket}/${wazuh_major}/tpl/wazuh/filebeat/filebeat.yml" + if [ "${package_type}" == "rpm" ]; then + manager_rpm_base_url="${repobaseurl}/yum" + indexer_rpm_base_url="${repobaseurl}/yum" + dashboard_rpm_base_url="${repobaseurl}/yum" + elif [ "${package_type}" == "deb" ]; then + manager_deb_base_url="${repobaseurl}/apt/pool/main/w/wazuh-manager" + indexer_deb_base_url="${repobaseurl}/apt/pool/main/w/wazuh-indexer" + dashboard_deb_base_url="${repobaseurl}/apt/pool/main/w/wazuh-dashboard" + fi + fi + if [ "${package_type}" == "rpm" ]; then manager_rpm_package="wazuh-manager-${wazuh_version}-${manager_revision}.x86_64.${package_type}" indexer_rpm_package="wazuh-indexer-${wazuh_version}-${indexer_revision}.x86_64.${package_type}"