
Wazuh Server
Channel | Revision | Published | Runs on |
---|---|---|---|
4.11/stable | 167 | 07 Jul 2025 | |
4.11/edge | 200 | 01 Oct 2025 |
juju deploy wazuh-server --channel 4.11/stable
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
How to run manual tests
The source code for this charm comes with several integration tests that cover basic functionality. However, for testing updates to complex functions, such as those that may affect the custom configuration repository feature, or for testing the effects of particular Wazuh and rsyslog configurations stored in a custom configuration repository, manual testing may be required.
This guide provides the steps to deploy a local testing environment for manual tests.
Follow the integration test setup
The how-to guide for running the integration tests provides instructions for setting up LXD, Kubernetes, and Juju controllers on a Ubuntu virtual machine.
Run the integration tests
To bootstrap your environment, run the integration tests once with the
--keep-models
argument, as described in the ‘Reuse environments’ section of
the integration test how-to guide.
(Optional) Create configuration secrets
If you wish to test the wazuh-server
charm with the optional agent-password
or custom-config-ssh-key
configuration items, create the secrets now. Make
note of the secret URIs, as these should be the value of the corresponding
configuration items.
juju switch k8s:admin/test-wazuh
juju add-secret agent-password value="password"
juju add-secret deploy-key value="$(cat PATH_TO_DEPLOY_KEY)"
Deploy the wazuh-server
charm
The integration tests do not retain the wazuh-server
charm, so you will need
to re-deploy the version of the charm that you wish to test.
From the root directory of the charm source code, run charmcraft pack
. This
will take several minutes on the first run, and will take significantly less
time on all subsequent runs.
As described in the ‘(Optional) Build the rock’ and ‘Set the container location’
sections of the integration test guide, either rebuild and upload the rock, or
identify a GitHub Container Repository (GHCR) image for use and set the
IMAGE_URL
variable.
The latest available GHCR images can be found in the source code repository.
export IMAGE_URL="ghcr.io/canonical/wazuh-server:a063aca515693126206e4dfa6ba6eba4bac43698-_1.0_amd64"
Deploy the charm.
juju deploy ./wazuh-server_ubuntu-22.04-amd64.charm \
--resource wazuh-server-image=$IMAGE_URL
If you created the optional secrets, grant access to the secret.
juju grant-secret deploy-key wazuh-server
juju grant-secret agent-password wazuh-server
Create the necessary relations.
juju integrate \
localhost:admin/test-wazuh-machine.wazuh-indexer \
wazuh-server
juju integrate \
localhost:admin/test-wazuh-machine.self-signed-certificates \
wazuh-server
juju integrate traefik-k8s wazuh-server
juju integrate any-opencti wazuh-server:opencti-connector
Deploy the desired charm configuration values. No configuration items are mandatory. Configuration items may be specified one-by-one on the command-line or via a YAML file.
Refer to juju config
documentation.
juju config wazuh-server --file=~/wazuh-conf.yml
(Optional) Deploy the dashboard charm
The integration tests do not deploy the dashboard charm by default. If your manual testing would benefit from access to the Wazuh user interface, deploy the dashboard with the following commands:
juju switch k8s:admin/test-wazuh
juju offer wazuh-server:wazuh-api
juju switch localhost:admin/test-wazuh-machine
juju deploy wazuh-dashboard --channel 4.11/edge
juju integrate wazuh-dashboard wazuh-indexer
juju integrate wazuh-dashboard self-signed-certificates
juju integrate wazuh-dashboard k8s:admin/test-wazuh.wazuh-server
juju expose wazuh-dashboard
To retrieve credentials for the dashboard, you may either follow the instructions in the ‘Retrieve dashboard credentials’ section of the Test your deployment how-to guide, or you may retrieve the indexer’s admin credentials:
juju switch localhost:admin/test-wazuh-machine
juju run wazuh-indexer/leader get-password
Tear down the environment
Remove the wazuh-server
charm:
juju switch localhost:admin/test-wazuh-machine
juju remove-saas wazuh-server
juju switch k8s:admin/test-wazuh
juju remove-offer wazuh-server --force --yes
kubectl -n test-wazuh delete statefulset wazuh-server
juju remove-application wazuh-server \
--destroy-storage --force \
--no-wait --no-prompt