-
Notifications
You must be signed in to change notification settings - Fork 203
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
MVP - Ansible - Roles: wazuh-indexer role #1521
Comments
UpdateAmong the advances that have been made in the development of the Ansible role for Wazuh Indexer, there are these elements:
|
UpdateTests have been carried out to verify the functioning of the Ansible role to perform the installation of Tested OSs
Both deployments have been tested on those operative systems: AIO and distributed. Archive with all evidence files DescriptionHere is all included evidence of testing. This includes: execution outputs, screenshots, and inventory and example playbook.AIO evidenceAnsible output log
Cluster health of one of the AIO instances Distributed evidenceAnsible results Ansible output log
Cluster health results:
|
UpdateA new PR has been added, with the purpose of correct some details of the refactoring implementation.
Additionally, the code will be updated and corrected to incorporate the changes proposed in this pull request and this issue. |
UpdateTests were conducted to verify the functionality of the Ansible role following the implementation of corrections to the installation process for Tested OSs
Both deployments have been tested on those operative systems: AIO and distributed. Archive with all evidence files DescriptionHere is all included evidence of testing. This includes: execution outputs, screenshots, and inventory and example playbook.AIO evidenceAnsible results PLAY [all] *********************************************************************
TASK [Gathering Facts] *********************************************************
ok: [aio]
TASK [wazuh-indexer : include_vars] ********************************************
ok: [aio]
TASK [wazuh-indexer : include_vars] ********************************************
ok: [aio]
TASK [wazuh-indexer : Ensure wazuh-indexer package download directory exists] ***
changed: [aio]
TASK [wazuh-indexer : Amazon Linux | Install Amazon extras in Amazon Linux 2] ***
skipping: [aio]
TASK [wazuh-indexer : Amazon Linux | Configure vm.max_map_count] ***************
skipping: [aio]
TASK [wazuh-indexer : Amazon Linux | Update vm.max_map_count] ******************
skipping: [aio]
TASK [wazuh-indexer : RedHat/CentOS/Fedora | Install Indexer dependencies] *****
ok: [aio]
TASK [wazuh-indexer : RedHat/CentOS/Fedora (x86_64) | Download wazuh-indexer package] ***
changed: [aio]
TASK [wazuh-indexer : RedHat/CentOS/Fedora (aarch64) | Download wazuh-indexer package] ***
skipping: [aio]
TASK [wazuh-indexer : Debian-based | Install Indexer dependencies] *************
skipping: [aio]
TASK [wazuh-indexer : Debian-based (AMD64) | Download wazuh-indexer package] ***
skipping: [aio]
TASK [wazuh-indexer : Debian-based (ARM64) | Download wazuh-indexer package] ***
skipping: [aio]
TASK [wazuh-indexer : set_fact] ************************************************
ok: [aio]
TASK [wazuh-indexer : set_fact] ************************************************
skipping: [aio]
TASK [wazuh-indexer : set_fact] ************************************************
skipping: [aio]
TASK [wazuh-indexer : set_fact] ************************************************
skipping: [aio]
TASK [wazuh-indexer : Linux CentOS/RedHat | Install wazuh-indexer using yum] ***
changed: [aio]
TASK [wazuh-indexer : Linux Debian | Install wazuh-indexer using apt] **********
skipping: [aio]
TASK [wazuh-indexer : Cert-gen | Check if certificates already exists] *********
ok: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Remove existing certificates] *****************
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Check if configuration is defined correctly] ***
skipping: [aio]
TASK [wazuh-indexer : Cert-gen | Create local temporary directory for certificates generation (all certs)] ***
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Download certificates generation tool] ********
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Download base config.yml file] ****************
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Remove comments from config.yml file] *********
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Remove existing nodes sections (cluster mode)] ***
skipping: [aio]
TASK [wazuh-indexer : Cert-gen | Add indexer nodes section (cluster mode)] *****
skipping: [aio]
TASK [wazuh-indexer : Cert-gen | Add server nodes section (cluster mode)] ******
skipping: [aio]
TASK [wazuh-indexer : Cert-gen | Add dashboard nodes section (cluster mode)] ***
skipping: [aio]
TASK [wazuh-indexer : Cert-gen | Remove comments from config.yml file] *********
skipping: [aio]
TASK [wazuh-indexer : Cert-gen | Remove empty lines from config.yml file (cluster mode)] ***
skipping: [aio]
TASK [wazuh-indexer : Cert-gen | Add indexer node section (single node mode)] ***
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Add server node section (single node mode)] ***
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Add dashboard node section (single node mode)] ***
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Generate certificates] ************************
changed: [aio -> localhost]
TASK [wazuh-indexer : Cert-gen | Copy certificates to each Wazuh indexer node] ***
changed: [aio] => (item=root-ca.pem)
changed: [aio] => (item=root-ca.key)
changed: [aio] => (item=node-1-key.pem)
changed: [aio] => (item=node-1.pem)
changed: [aio] => (item=admin-key.pem)
changed: [aio] => (item=admin.pem)
TASK [wazuh-indexer : Cert-gen | Rename indexer key certificate (1/2)] *********
changed: [aio]
TASK [wazuh-indexer : Cert-gen | Rename indexer certificate (2/2)] *************
changed: [aio]
TASK [wazuh-indexer : OpenSearch Config | Update network.host configuration] ***
changed: [aio]
TASK [wazuh-indexer : OpenSearch Config | Update node.name configuration] ******
ok: [aio]
TASK [wazuh-indexer : Remove existing nodes in cluster.initial_master_nodes] ***
skipping: [aio]
TASK [wazuh-indexer : OpenSearch Config | Update cluster.initial_master_nodes values] ***
skipping: [aio]
TASK [wazuh-indexer : OpenSearch Config | Remove cluster.initial_master_nodes for single-node cluster] ***
changed: [aio]
TASK [wazuh-indexer : OpenSearch Config | Uncomment discovery.seed_hosts line] ***
skipping: [aio]
TASK [wazuh-indexer : OpenSearch Config | Update discovery.seed_hosts value] ***
skipping: [aio]
TASK [wazuh-indexer : OpenSearch Config | Remove existing SSL configuration lines in plugins.security.nodes_dn] ***
changed: [aio]
TASK [wazuh-indexer : OpenSearch Config | Update SSL configuration values in plugins.security.nodes_dn] ***
changed: [aio]
TASK [wazuh-indexer : Add single-node discovery type if needed] ****************
changed: [aio]
TASK [wazuh-indexer : Reload systemd configuration] ****************************
ok: [aio]
TASK [wazuh-indexer : Ensure Wazuh indexer started and enabled] ****************
changed: [aio]
TASK [wazuh-indexer : Initialize Wazuh Indexer cluster] ************************
changed: [aio]
TASK [wazuh-indexer : Wait for Wazuh indexer API] ******************************
ok: [aio]
TASK [wazuh-indexer : Reload systemd configuration] ****************************
ok: [aio]
TASK [wazuh-indexer : Remove Wazuh Indexer installation leftovers] *************
changed: [aio]
PLAY RECAP *********************************************************************
aio : ok=35 changed=24 unreachable=0 failed=0 skipped=24 rescued=0 ignored=0
Distributed evidenceAnsible results Ansible output logPLAY [all] *********************************************************************
TASK [Gathering Facts] *********************************************************
ok: [wi5]
ok: [wi4]
ok: [wi2]
ok: [wi1]
ok: [wi3]
TASK [wazuh-indexer : include_vars] ********************************************
ok: [wi1]
ok: [wi2]
ok: [wi3]
ok: [wi4]
ok: [wi5]
TASK [wazuh-indexer : include_vars] ********************************************
ok: [wi1]
ok: [wi2]
ok: [wi3]
ok: [wi4]
ok: [wi5]
TASK [wazuh-indexer : Ensure wazuh-indexer package download directory exists] ***
changed: [wi5]
changed: [wi3]
changed: [wi2]
changed: [wi4]
changed: [wi1]
TASK [wazuh-indexer : Amazon Linux | Install Amazon extras in Amazon Linux 2] ***
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]
skipping: [wi4]
skipping: [wi5]
TASK [wazuh-indexer : Amazon Linux | Configure vm.max_map_count] ***************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]
skipping: [wi4]
skipping: [wi5]
TASK [wazuh-indexer : Amazon Linux | Update vm.max_map_count] ******************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]
skipping: [wi4]
skipping: [wi5]
TASK [wazuh-indexer : RedHat/CentOS/Fedora | Install Indexer dependencies] *****
skipping: [wi2]
skipping: [wi3]
ok: [wi5]
ok: [wi1]
ok: [wi4]
TASK [wazuh-indexer : RedHat/CentOS/Fedora (x86_64) | Download wazuh-indexer package] ***
skipping: [wi2]
skipping: [wi3]
skipping: [wi4]
changed: [wi5]
changed: [wi1]
TASK [wazuh-indexer : RedHat/CentOS/Fedora (aarch64) | Download wazuh-indexer package] ***
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]
skipping: [wi5]
changed: [wi4]
TASK [wazuh-indexer : Debian-based | Install Indexer dependencies] *************
skipping: [wi1]
skipping: [wi4]
skipping: [wi5]
ok: [wi2]
ok: [wi3]
TASK [wazuh-indexer : Debian-based (AMD64) | Download wazuh-indexer package] ***
skipping: [wi1]
skipping: [wi3]
skipping: [wi4]
skipping: [wi5]
changed: [wi2]
TASK [wazuh-indexer : Debian-based (ARM64) | Download wazuh-indexer package] ***
skipping: [wi1]
skipping: [wi2]
skipping: [wi4]
skipping: [wi5]
changed: [wi3]
TASK [wazuh-indexer : Linux CentOS/RedHat | Install wazuh-indexer using yum] ***
skipping: [wi2]
skipping: [wi3]
changed: [wi5]
changed: [wi4]
changed: [wi1]
TASK [wazuh-indexer : Linux Debian | Install wazuh-indexer using apt] **********
skipping: [wi1]
skipping: [wi4]
skipping: [wi5]
changed: [wi3]
changed: [wi2]
TASK [wazuh-indexer : Cert-gen | Check if certificates already exists] *********
ok: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Remove existing certificates] *****************
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Check if configuration is defined correctly] ***
skipping: [wi1]
TASK [wazuh-indexer : Cert-gen | Create local temporary directory for certificates generation (all certs)] ***
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Download certificates generation tool] ********
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Download base config.yml file] ****************
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Remove comments from config.yml file] *********
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Remove existing nodes sections (cluster mode)] ***
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Add indexer nodes section (cluster mode)] *****
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Add server nodes section (cluster mode)] ******
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Add dashboard nodes section (cluster mode)] ***
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Remove comments from config.yml file] *********
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Add indexer node section (single node mode)] ***
skipping: [wi1]
TASK [wazuh-indexer : Cert-gen | Add server node section (single node mode)] ***
skipping: [wi1]
TASK [wazuh-indexer : Cert-gen | Add dashboard node section (single node mode)] ***
skipping: [wi1]
TASK [wazuh-indexer : Cert-gen | Remove empty lines from config.yml file (cluster mode)] ***
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Generate certificates] ************************
changed: [wi1 -> localhost]
TASK [wazuh-indexer : Cert-gen | Copy certificates to each Wazuh indexer node] ***
changed: [wi5] => (item=root-ca.pem)
changed: [wi3] => (item=root-ca.pem)
changed: [wi4] => (item=root-ca.pem)
changed: [wi2] => (item=root-ca.pem)
changed: [wi1] => (item=root-ca.pem)
changed: [wi5] => (item=root-ca.key)
changed: [wi3] => (item=root-ca.key)
changed: [wi4] => (item=root-ca.key)
changed: [wi2] => (item=root-ca.key)
changed: [wi1] => (item=root-ca.key)
changed: [wi5] => (item=node-5-key.pem)
changed: [wi3] => (item=node-3-key.pem)
changed: [wi4] => (item=node-4-key.pem)
changed: [wi2] => (item=node-2-key.pem)
changed: [wi1] => (item=node-1-key.pem)
changed: [wi5] => (item=node-5.pem)
changed: [wi3] => (item=node-3.pem)
changed: [wi4] => (item=node-4.pem)
changed: [wi2] => (item=node-2.pem)
changed: [wi1] => (item=node-1.pem)
changed: [wi5] => (item=admin-key.pem)
changed: [wi3] => (item=admin-key.pem)
changed: [wi4] => (item=admin-key.pem)
changed: [wi2] => (item=admin-key.pem)
changed: [wi1] => (item=admin-key.pem)
changed: [wi5] => (item=admin.pem)
changed: [wi3] => (item=admin.pem)
changed: [wi4] => (item=admin.pem)
changed: [wi2] => (item=admin.pem)
changed: [wi1] => (item=admin.pem)
TASK [wazuh-indexer : Cert-gen | Rename indexer key certificate (1/2)] *********
changed: [wi3]
changed: [wi5]
changed: [wi4]
changed: [wi2]
changed: [wi1]
TASK [wazuh-indexer : Cert-gen | Rename indexer certificate (2/2)] *************
changed: [wi3]
changed: [wi5]
changed: [wi2]
changed: [wi4]
changed: [wi1]
TASK [wazuh-indexer : OpenSearch Config | Update network.host configuration] ***
changed: [wi3]
changed: [wi5]
changed: [wi4]
changed: [wi2]
changed: [wi1]
TASK [wazuh-indexer : OpenSearch Config | Update node.name configuration] ******
changed: [wi5]
changed: [wi3]
changed: [wi2]
changed: [wi4]
ok: [wi1]
TASK [wazuh-indexer : Remove existing nodes in cluster.initial_master_nodes] ***
changed: [wi5]
changed: [wi3]
changed: [wi4]
changed: [wi2]
changed: [wi1]
TASK [wazuh-indexer : OpenSearch Config | Update cluster.initial_master_nodes values] ***
changed: [wi5]
changed: [wi3]
changed: [wi2]
changed: [wi4]
changed: [wi1]
TASK [wazuh-indexer : OpenSearch Config | Remove cluster.initial_master_nodes for single-node cluster] ***
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]
skipping: [wi4]
skipping: [wi5]
TASK [wazuh-indexer : OpenSearch Config | Uncomment discovery.seed_hosts line] ***
changed: [wi3]
changed: [wi5]
changed: [wi4]
changed: [wi1]
changed: [wi2]
TASK [wazuh-indexer : OpenSearch Config | Update discovery.seed_hosts value] ***
changed: [wi5]
changed: [wi3]
changed: [wi4]
changed: [wi2]
changed: [wi1]
TASK [wazuh-indexer : OpenSearch Config | Remove existing SSL configuration lines in plugins.security.nodes_dn] ***
changed: [wi5]
changed: [wi3]
changed: [wi4]
changed: [wi2]
changed: [wi1]
TASK [wazuh-indexer : OpenSearch Config | Update SSL configuration values in plugins.security.nodes_dn] ***
changed: [wi3]
changed: [wi5]
changed: [wi4]
changed: [wi2]
changed: [wi1]
TASK [wazuh-indexer : Add single-node discovery type if needed] ****************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]
skipping: [wi4]
skipping: [wi5]
TASK [wazuh-indexer : Reload systemd configuration] ****************************
ok: [wi5]
ok: [wi3]
ok: [wi4]
ok: [wi1]
ok: [wi2]
TASK [wazuh-indexer : Ensure Wazuh indexer started and enabled] ****************
changed: [wi5]
changed: [wi3]
changed: [wi4]
changed: [wi2]
changed: [wi1]
TASK [wazuh-indexer : Initialize Wazuh Indexer cluster] ************************
changed: [wi1]
TASK [wazuh-indexer : Wait for Wazuh indexer API] ******************************
FAILED - RETRYING: [wi5]: Wait for Wazuh indexer API (24 retries left).
FAILED - RETRYING: [wi4]: Wait for Wazuh indexer API (24 retries left).
FAILED - RETRYING: [wi3]: Wait for Wazuh indexer API (24 retries left).
FAILED - RETRYING: [wi2]: Wait for Wazuh indexer API (24 retries left).
FAILED - RETRYING: [wi1]: Wait for Wazuh indexer API (24 retries left).
FAILED - RETRYING: [wi5]: Wait for Wazuh indexer API (23 retries left).
FAILED - RETRYING: [wi3]: Wait for Wazuh indexer API (23 retries left).
FAILED - RETRYING: [wi4]: Wait for Wazuh indexer API (23 retries left).
FAILED - RETRYING: [wi2]: Wait for Wazuh indexer API (23 retries left).
FAILED - RETRYING: [wi1]: Wait for Wazuh indexer API (23 retries left).
ok: [wi5]
ok: [wi4]
ok: [wi3]
ok: [wi2]
ok: [wi1]
TASK [wazuh-indexer : Reload systemd configuration] ****************************
ok: [wi5]
ok: [wi3]
ok: [wi4]
ok: [wi1]
ok: [wi2]
TASK [wazuh-indexer : Remove Wazuh Indexer installation leftovers] *************
changed: [wi5]
changed: [wi4]
changed: [wi1]
changed: [wi2]
changed: [wi3]
PLAY RECAP *********************************************************************
wi1 : ok=39 changed=30 unreachable=0 failed=0 skipped=15 rescued=0 ignored=0
wi2 : ok=25 changed=18 unreachable=0 failed=0 skipped=11 rescued=0 ignored=0
wi3 : ok=25 changed=18 unreachable=0 failed=0 skipped=11 rescued=0 ignored=0
wi4 : ok=25 changed=17 unreachable=0 failed=0 skipped=11 rescued=0 ignored=0
wi5 : ok=25 changed=18 unreachable=0 failed=0 skipped=11 rescued=0 ignored=0
Cluster health results: , #_
~\_ ####_ Amazon Linux 2
~~ \_#####\
~~ \###| AL2 End of Life is 2025-06-30.
~~ \#/ ___
~~ V~' '->
~~~ / A newer version of Amazon Linux is available!
~~._. _/
_/ _/ Amazon Linux 2023, GA and supported until 2028-03-15.
_/m/' https://aws.amazon.com/linux/amazon-linux-2023/
56 package(s) needed for security, out of 79 available
Run "sudo yum update" to apply all updates.
[ec2-user@ip-172-*-*-151 ~]$ curl -k -u admin:admin https://172.*.*.151:9200/_cat/nodes?v
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role node.roles cluster_manager name
172.*.*.151 56 55 1 0.00 0.02 0.07 dimr cluster_manager,data,ingest,remote_cluster_client - node-5
172.*.*.42 48 76 3 0.08 0.05 0.12 dimr cluster_manager,data,ingest,remote_cluster_client - node-2
172.*.*.145 64 81 3 0.08 0.10 0.08 dimr cluster_manager,data,ingest,remote_cluster_client * node-4
172.*.*.75 43 76 2 0.00 0.01 0.07 dimr cluster_manager,data,ingest,remote_cluster_client - node-3
172.*.*.145 28 74 5 0.00 0.07 0.20 dimr cluster_manager,data,ingest,remote_cluster_client - node-1
[ec2-user@ip-172-*-*-151 ~]$ |
Description
The ansible role for Wazuh indexer (
roles/wazuh-indexer
) is a proposal that facilitates the installation and configuration of the Wazuh indexer component. This role will ensure that the indexer is set up correctly and is able to handle data from Wazuh agents effectively.For a more detailed description, please refer to the parent commit (#1493).
Tasks
The text was updated successfully, but these errors were encountered: