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

Migrate Wazuh Ansible QA custom roles #4581

Closed
8 tasks done
Tracked by #4369
Rebits opened this issue Oct 6, 2023 · 7 comments · Fixed by #4642
Closed
8 tasks done
Tracked by #4369

Migrate Wazuh Ansible QA custom roles #4581

Rebits opened this issue Oct 6, 2023 · 7 comments · Fixed by #4642
Assignees

Comments

@Rebits
Copy link
Member

Rebits commented Oct 6, 2023

Description

We have identified some issues with the current approach for deployment and provision. The approach currently relies on roles defined in the wazuh-qa repository (specific testing roles) and the wazuh-ansible repository (roles related to Wazuh).

There are several inconveniences with this approach that we need to address:

  • It introduces dependencies on the wazuh-qa and wazuh-ansible repositories.
  • The provisioning structure is complex and difficult to manage.
  • Maintenance of the setup becomes challenging.
  • Non-production branches in wazuh-ansible are being used.

To mitigate these disadvantages, we have decided to migrate all the roles to this repository. This migration will require implementing some changes:

  • The Wazuh component should support provisioning multiple versions.
  • Roles should be designed to be atomic, allowing for easy customization of the environment.

By addressing these concerns and making the necessary adjustments, we aim to simplify the provisioning process and enhance the overall efficiency of our deployment approach.

Tasks

Wazuh QA

@Rebits Rebits changed the title Migrate provisioning roles from wazuh-qa and wazuh-ansible Migrate Wazuh Ansible QA custom roles Oct 6, 2023
@Rebits Rebits added the level/task Task issue label Oct 6, 2023
@wazuhci wazuhci moved this to Backlog in Release 4.8.0 Oct 6, 2023
@Rebits Rebits self-assigned this Oct 11, 2023
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.8.0 Oct 11, 2023
@Rebits
Copy link
Member Author

Rebits commented Oct 11, 2023

Development branches

Wazuh Jenkins Wazuh QA
4581-migrate-ansible-roles 4581-migrate-ansible-roles

Migrated Wazuh roles from Wazuh Ansible to QA repository
It is currently being tested a PoC with the changes: https://ci.wazuh.info/job/Wazuh_QA_environment/381/console

@Rebits
Copy link
Member Author

Rebits commented Oct 13, 2023

After migration it seems certificates are not being correctly generated:

10:39:42  Could not find or access '/home/ec2-user/workspace/Wazuh_QA_environment/383/wazuh-qa/provisioning/playbooks/indexer/certificates/wazuh-certificates/admin-key.pem' on the Ansible Controller.
10:39:42  If you are using a module and expect the file to exist on the remote, see the remote_src option
10:39:43  An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
10:39:43  failed: [wi1] (item=admin.pem) => {
10:39:43      "ansible_loop_var": "item",
10:39:43      "changed": false,
10:39:43      "item": "admin.pem"
10:39:43  }
10:39:43  
10:39:43  MSG:

@Rebits
Copy link
Member Author

Rebits commented Oct 13, 2023

We have successfully deployed the proposed environment.

Deployment Details: View Deployment Details

Currently, we are in the process of refining new roles and optimizing the Wazuh_QA_Environment pipeline.

@Rebits
Copy link
Member Author

Rebits commented Oct 16, 2023

Minor fixes in Windows wazuh-agent provision

@wazuhci wazuhci moved this from In progress to On hold in Release 4.8.0 Oct 20, 2023
@wazuhci wazuhci moved this from On hold to In progress in Release 4.8.0 Oct 23, 2023
@Rebits
Copy link
Member Author

Rebits commented Oct 23, 2023

In order to validate the developed solution, we need to ensure that the necessary infrastructure is available for testing. Once we confirm that the pipeline can provision the proposed environment, we can proceed to close the development phase. For more details, please refer to this comment

@wazuhci wazuhci moved this from In progress to Blocked in Release 4.8.0 Oct 23, 2023
@Rebits Rebits linked a pull request Oct 25, 2023 that will close this issue
@wazuhci wazuhci moved this from Blocked to In progress in Release 4.8.0 Oct 26, 2023
@Rebits
Copy link
Member Author

Rebits commented Oct 26, 2023

During the development of the VD tests it has been detected that macOS endpoint was configured with invalid configuration. Configuration included invalid & in the configuration xml. In addition manager IP was not correctly set. Further research is required

@wazuhci wazuhci moved this from In progress to Pending review in Release 4.8.0 Nov 2, 2023
@wazuhci wazuhci moved this from Pending review to In review in Release 4.8.0 Nov 3, 2023
@wazuhci wazuhci moved this from In review to Pending final review in Release 4.8.0 Nov 3, 2023
@davidjiglesias
Copy link
Member

LGTM!

@wazuhci wazuhci moved this from Pending final review to Done in Release 4.8.0 Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants