Skip to content
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

Improve Ansible deployment documentation for multi-node installation #7575

Closed
2 tasks
pereyra-m opened this issue Jul 25, 2024 · 3 comments
Closed
2 tasks
Assignees
Labels

Comments

@pereyra-m
Copy link
Member

Description

This issue was created during the E2E testing wazuh/wazuh#24838.
The documentation section https://documentation-dev.wazuh.com/v4.9.0-alpha3/deployment-options/deploying-with-ansible/index.html should be improved.

A previous E2E test (wazuh/wazuh#23239) already generated documentations improvements (#7295), but I as a tester consider that the guide still isn't detailed enough to allow users to completely deploy a Wazuh multi-node installation with Ansible.

Improvements suggested

Warning message during Ansible installation (low impact)

During installation, these commands

echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list.d/ansible-debian.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
apt-get update

Generates the following warnings

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

W: http://ppa.launchpad.net/ansible/ansible/ubuntu/dists/trusty/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

It should be verified that it won't impact in the installation process in the near future.

The SSH configuration could be clearer (medium impact)

The steps 3 and 4 under Configuring SSH key-pairing could be more clear about the fact that the following command will request a password

cat ~/.ssh/id_rsa.pub | ssh <USERNAME>@<REMOTE_SERVER_IP_ADDRESS> "cat >> ~/.ssh/authorized_keys"

And after this, the password will no longer be required.
If we don't update this section, it's confusing that the ssh command is used in the suggested command but then, in the last step, it is tested again.

Include an example for many Ansible endpoints (high impact)

Under Testing the Ansible connection to remote endpoints, there is only an example for all-in-one deployment.
It would be useful an example for many endpoints.

The folder /etc/ansible doesn't exist (low impact)

We could add an extra step for creating the folders /etc/ansible and /etc/ansible/roles because they don't exist after the installation of Ansible.

A full example for multi-node installation is missing (high impact)

The documentation doesn't guide the user for a complete multi-node installation.
It names many thing (roles, etc.) but it lacks of a step-by-step guide. The examples of /etc/ansible/hosts only show an all-in-one installation, and many roles require specific groups that aren't named ([wi_cluster] for example)

Also:

  • The wazuh-indexer role has some dependencies (like gpg) that aren't detailed, so the playbook fails if they aren't installed. We should indicate its installation or make the script to automatically install them
  • The certificates aren't created if the folder playbooks/indexer/certificates/ exists but it's empty.

DoD

  • All suggestions were considered, and implemented/rejected after consideration.
  • The full guide was tested again with a clean environment to verify it works
@juliamagan
Copy link
Member

This issue will be worked by @wazuh/devel-devops and the PR will be reviewed by @javimed.

@teddytpc1 teddytpc1 added level/task Task issue type/bug Bug issue labels Jul 29, 2024
@vcerenu vcerenu self-assigned this Jul 29, 2024
@wazuhci wazuhci moved this from Triage to In progress in Release 4.9.0 Jul 29, 2024
@vcerenu
Copy link
Member

vcerenu commented Jul 29, 2024

I've been working on improving Ansible Installation and SSH connection, these are the screenshots of the changes:
image

image

@teddytpc1
Copy link
Member

It's been decided to fix this kind of issues as part of the DevOps overhaul for 5.0.0.

@teddytpc1 teddytpc1 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2024
@wazuhci wazuhci moved this from In progress to Done in Release 4.9.0 Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants