wazuh / wazuh

Wazuh - The Open Source Security Platform. Unified XDR and SIEM protection for endpoints and cloud workloads.
https://wazuh.com/
Other
10.68k stars 1.63k forks source link

Release 4.6.0 - Alpha 1 - E2E UX tests - Deployment on docker #18824

Closed davidjiglesias closed 1 year ago

davidjiglesias commented 1 year ago

End-to-End (E2E) Testing Guideline

For the conclusions and the issue testing and updates, use the following legend:

Status legend

Deployment requirements

Component Installation Type OS
Indexer Deployment on docker Single node and multi node -
Server Deployment on docker Single node and multi node -
Dashboard Deployment on docker - -
Agent Wazuh WUI one-liner deploy using IP - Amazon Linux 2 aarch64

Test description

Test deployment of Docker repository.

Documentation: https://documentation-dev.wazuh.com/v4.6.0-alpha1/deployment-options/docker/index.html

Known issues

Conclusions :red_circle:

Errors detected

Status Test Failure type Notes
🔴 Clone the wazuh-docker repository Generate custom images and start Wazuh using docker-compose https://github.com/wazuh/wazuh-docker/issues/984

Feedback

We value your feedback. Please provide insights on your testing experience.

Reviewers validation

The criteria for completing this task is based on the validation of the conclusions and the test results by all reviewers.

All the checkboxes below must be marked in order to close this issue.

cborla commented 1 year ago

Single-node deployment :red_circle:

Install required software and set-up the environment :green_circle:
1. Increase max_map_count on your host (Linux) ```shell # sudo sysctl -w vm.max_map_count=262144 vm.max_map_count = 262144 # sudo sysctl vm.max_map_count vm.max_map_count = 262144 ``` 2. Check architecture ```shell # uname -r 5.15.0-83-generic # uname -2 5.15.0-83-generic #92~20.04.1-Ubuntu SMP Mon Aug 21 14:00:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ``` 3. Install the Docker engine ```shell # curl -sSL https://get.docker.com/ | sh ``` 4. Start the Docker engine ```shell # sudo systemctl start docker ``` 5. Install `docker-compose` ```shell # curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose # chmod +x /usr/local/bin/docker-compose # docker-compose --version Docker Compose version v2.12.2 ```
Wazuh stack deployment using Docker :red_circle:
1. Clone the `wazuh-docker` repository ```shell # git clone https://github.com/wazuh/wazuh-docker.git -b v4.6.0 Cloning into 'wazuh-docker'... fatal: Remote branch v4.6.0 not found in upstream origin ```
cborla commented 1 year ago

Multi-node deployment :red_circle:

Install required software and set-up the environment :green_circle:
1. Increase max_map_count on your host (Linux) ```shell # sudo sysctl -w vm.max_map_count=262144 vm.max_map_count = 262144 # sudo sysctl vm.max_map_count vm.max_map_count = 262144 ``` 2. Check architecture ```shell # uname -r 5.15.0-83-generic # uname -2 5.15.0-83-generic #92~20.04.1-Ubuntu SMP Mon Aug 21 14:00:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ``` 3. Install the Docker engine ```shell # curl -sSL https://get.docker.com/ | sh ``` 4. Start the Docker engine ```shell # sudo systemctl start docker ``` 5. Install `docker-compose` ```shell # curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose # chmod +x /usr/local/bin/docker-compose # docker-compose --version Docker Compose version v2.12.2 ```
Wazuh stack deployment using Docker :red_circle:
1. Clone the `wazuh-docker` repository ```shell # git clone https://github.com/wazuh/wazuh-docker.git -b v4.6.0 Cloning into 'wazuh-docker'... fatal: Remote branch v4.6.0 not found in upstream origin ```
davidcr01 commented 1 year ago

Hello.

I tested the repository clone and it worked for me:

davidcr01:~$ git clone https://github.com/wazuh/wazuh-docker.git -b v4.6.0-alpha1
Clonando en 'wazuh-docker'...
remote: Enumerating objects: 11109, done.
remote: Counting objects: 100% (1148/1148), done.
remote: Compressing objects: 100% (583/583), done.
remote: Total 11109 (delta 605), reused 998 (delta 498), pack-reused 9961
Recibiendo objetos: 100% (11109/11109), 313.96 MiB | 568.00 KiB/s, listo.
Resolviendo deltas: 100% (5678/5678), listo.
Nota: cambiando a 'b377a0f6eb206e68a1898f1552b569334a12779d'.

davidcr01:~$ ls wazuh-docker/
build-docker-images  indexer-certs-creator  multi-node  single-node
CHANGELOG.md         LICENSE                README.md   VERSION
davidcr01:~$ 

The v4.6.0-alpha1 tag was created in https://github.com/wazuh/wazuh-docker/issues/969.

cborla commented 1 year ago

Single-node deployment :red_circle:

Install required software and set-up the environment :green_circle:
1. Increase max_map_count on your host (Linux) ```shell # sudo sysctl -w vm.max_map_count=262144 vm.max_map_count = 262144 # sudo sysctl vm.max_map_count vm.max_map_count = 262144 ``` 2. Check architecture ```shell # uname -r 5.15.0-83-generic # uname -2 5.15.0-83-generic #92~20.04.1-Ubuntu SMP Mon Aug 21 14:00:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ``` 3. Install the Docker engine ```shell # curl -sSL https://get.docker.com/ | sh ``` 4. Start the Docker engine ```shell # sudo systemctl start docker ``` 5. Install `docker-compose` ```shell # curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose # chmod +x /usr/local/bin/docker-compose # docker-compose --version Docker Compose version v2.12.2 ```
Wazuh stack deployment using Docker 🔴
1. Clone the `wazuh-docker` repository ```shell # git clone https://github.com/wazuh/wazuh-docker.git -b v4.6.0-alpha1 ``` 2. Get into the `single-node` folder ```shell # cd wazuh-docker/single-node ``` 3. Generate certificates ``` # docker-compose -f generate-indexer-certs.yml run --rm generator [+] Running 1/0 ⠿ Network single-node_default Created 0.1s [+] Running 5/5 ⠿ generator Pulled 31.3s ⠿ edaedc954fb5 Pull complete 23.7s ⠿ 573f4d11a520 Pull complete 26.5s ⠿ 8f200922197d Pull complete 26.5s ⠿ 55a86de68c5c Pull complete 26.6s The tool to create the certificates exists in the in Packages bucket 08/09/2023 14:17:21 INFO: Admin certificates created. 08/09/2023 14:17:21 INFO: Wazuh indexer certificates created. 08/09/2023 14:17:21 INFO: Wazuh server certificates created. 08/09/2023 14:17:21 INFO: Wazuh dashboard certificates created. Moving created certificates to the destination directory Changing certificate permissions Setting UID indexer and dashboard Setting UID for wazuh manager and worker # ls -l config/wazuh_indexer_ssl_certs/ # ls -l config/wazuh_indexer_ssl_certs/ total 48 -r-------- 1 ubuntu-user ubuntu-user 1704 sep 8 11:17 admin-key.pem -r-------- 1 ubuntu-user ubuntu-user 1119 sep 8 11:17 admin.pem -r-------- 1 ubuntu-user ubuntu-user 1704 sep 8 11:17 root-ca.key -r-------- 1 systemd-resolve systemd-journal 1704 sep 8 11:17 root-ca-manager.key -r-------- 1 systemd-resolve systemd-journal 1204 sep 8 11:17 root-ca-manager.pem -r-------- 1 ubuntu-user ubuntu-user 1204 sep 8 11:17 root-ca.pem -r-------- 1 ubuntu-user ubuntu-user 1704 sep 8 11:17 wazuh.dashboard-key.pem -r-------- 1 ubuntu-user ubuntu-user 1261 sep 8 11:17 wazuh.dashboard.pem -r-------- 1 ubuntu-user ubuntu-user 1708 sep 8 11:17 wazuh.indexer-key.pem -r-------- 1 ubuntu-user ubuntu-user 1257 sep 8 11:17 wazuh.indexer.pem -r-------- 1 ubuntu-user ubuntu-user 1704 sep 8 11:17 wazuh.manager-key.pem -r-------- 1 ubuntu-user ubuntu-user 1257 sep 8 11:17 wazuh.manager.pem ``` 4. Generate custom images (because is a development release) and start Wazuh using `docker-compose` ```shell # cd ../ && sudo build-docker-images/build-images.sh && cd - [+] Building 4.8s (17/76) => [wazuh/wazuh-indexer:4.6.0 internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2.38kB 0.0s => [wazuh/wazuh-manager:4.6.0 internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2.24kB 0.0s => [wazuh/wazuh-dashboard:4.6.0 internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 3.43kB 0.0s => [wazuh/wazuh-indexer:4.6.0 internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => [wazuh/wazuh-dashboard:4.6.0 internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [wazuh/wazuh-manager:4.6.0 internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [wazuh/wazuh-dashboard:4.6.0 internal] load metadata for docker.io/library/ubuntu:focal 4.5s => [wazuh/wazuh-manager:4.6.0 1/18] FROM docker.io/library/ubuntu:focal@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba 0.2s => => resolve docker.io/library/ubuntu:focal@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba 0.0s => => sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba 1.13kB / 1.13kB 0.0s => => sha256:3246518d9735254519e1b2ff35f95686e4a5011c90c85344c1f38df7bae9dd37 424B / 424B 0.0s => => sha256:6df89402372646d400cf092016c28066391a26f5d46c00b1153e75003465484d 2.30kB / 2.30kB 0.0s => [wazuh/wazuh-manager:4.6.0 internal] load build context 0.1s => => transferring context: 25.03kB 0.0s => ERROR [wazuh/wazuh-manager:4.6.0] https://raw.githubusercontent.com/wazuh/wazuh/4.6/extensions/elasticsearch/7.x/wazuh-template.json 0.8s => [wazuh/wazuh-indexer:4.6.0 internal] load build context 0.1s => => transferring context: 20.13kB 0.0s => [wazuh/wazuh-dashboard:4.6.0 internal] load build context 0.0s => => transferring context: 13.44kB 0.0s => [wazuh/wazuh-indexer:4.6.0 stage-1 2/14] RUN getent group wazuh-indexer || groupadd -r -g 1000 wazuh-indexer 1.1s => CANCELED [wazuh/wazuh-dashboard:4.6.0 builder 2/17] RUN apt-get update && apt install curl libcap2-bin xz-utils -y 1.3s => [wazuh/wazuh-manager:4.6.0 2/18] RUN rm /bin/sh && ln -s /bin/bash /bin/sh 1.1s => CANCELED [wazuh/wazuh-indexer:4.6.0 builder 2/9] RUN apt-get update -y && apt-get install curl openssl xz-utils -y 1.4s => CANCELED [wazuh/wazuh-dashboard:4.6.0 stage-1 2/11] RUN apt update && apt install -y libnss3-dev fonts-liberation libfontconfig1 1.3s => CANCELED [wazuh/wazuh-indexer:4.6.0 stage-1 3/14] RUN useradd --system --uid 1000 --no-create-home --home-dir /usr/share/wazuh-indexer --gid wazuh-inde 0.9s ------ > [wazuh/wazuh-manager:4.6.0] https://raw.githubusercontent.com/wazuh/wazuh/4.6/extensions/elasticsearch/7.x/wazuh-template.json: ------ failed to solve: failed to load cache key: invalid response status 404 ```
davidjiglesias commented 1 year ago

LGTM!