Test utils scripts
This is a collection of scripts aimed to facilitate the validation of the wazuh-indexer packages generated on the GitHub Action Workflow.
Even if these scripts can be executed in almost any Linux environment, we expect it to be used alongside the
Vagrant environment defined in the tools/test-cluster, using the scripts inside the VMs to facilitate the validation steps.
GitHub token requirements
Create a personal access token for GitHub with at least read:packages permissions.
Validation flow
The scripts can be used to prepare and validate a single node or multi-node cluster, as required.
All-at-once
Single node
Use the 00_run.sh utility to execute all the scripts automatically
sudo bash 00_run.sh
Multi node cluster
This section assumes you are using the
node-1andnode-2Vagrant VMs
- On the
node-2VM install and prepare thewazuh-indexercomponentGITHUB_TOKEN=<GH_TOKEN> bash 01_download_and_install_package.sh -id <RUN_ID> -n <PACKAGE_NAME>sudo bash 02_apply_certificates.sh -p ../wazuh-certificates.tar -n node-2 -nip 192.168.56.11 -s node-1 -sip 192.168.56.10sudo bash 03_manage_indexer_service.sh -a start - On the
node-1VM execute the all-at-once utilitysudo bash 00_run.sh
Manual execution
If you prefer, you can run each script individually.
- Download and install the
wazuh-indexerpackage (mandatory on each node)GITHUB_TOKEN=<GH_TOKEN> bash 01_download_and_install_package.sh -id <RUN_ID> -n <PACKAGE_NAME> - Configure and start the service (mandatory on each node)
sudo bash 02_apply_certificates.sh -p <PATH_TO_CERTS.TAR> -n <NODE_NAME> -nip <NODE_IP>sudo bash 03_manage_indexer_service.sh -a startWith this script you can also
restartandstopthe service - Initialize the cluster
sudo bash 04_initialize_cluster.sh - Check all the plugins are installed
bash 05_validate_installed_plugins.sh -n <NODE_NAME> - Check the setup plugin configured the index-patterns correctly
bash 06_validate_setup.sh - Check the command manager plugin works correctly
bash 07_validate_command_manager.sh - Uninstall Wazuh indexer
sudo bash 08_uninstall_indexer.sh