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

DTT1 - Iteration 2 - PoC with task flow #4751

Closed
fcaffieri opened this issue Dec 6, 2023 · 4 comments · Fixed by #4800, #4801, #4807 or #4822
Closed

DTT1 - Iteration 2 - PoC with task flow #4751

fcaffieri opened this issue Dec 6, 2023 · 4 comments · Fixed by #4800, #4801, #4807 or #4822
Assignees

Comments

@fcaffieri
Copy link
Member

fcaffieri commented Dec 6, 2023

Epic: #4495


Description

This issue aims to present the PoC with the new module Task Flow and the resolution of the problems found in iteration 1.

@fcaffieri fcaffieri self-assigned this Dec 6, 2023
@fcaffieri fcaffieri changed the title DTT1 - Observability module DTT1 - Iteration 2 - Observability module Dec 26, 2023
@fcaffieri fcaffieri changed the title DTT1 - Iteration 2 - Observability module DTT1 - Iteration 2 - PoC with task flow Dec 29, 2023
@fcaffieri fcaffieri linked a pull request Dec 29, 2023 that will close this issue
@fcaffieri
Copy link
Member Author

Update

I am working on integrating the task flow with the modules and improving each one.

@fcaffieri
Copy link
Member Author

Update

Integrating Allocation and provision with the Task Flow

@fcaffieri fcaffieri linked a pull request Jan 10, 2024 that will close this issue
@fcaffieri
Copy link
Member Author

fcaffieri commented Jan 15, 2024

Update

The PoC was carried out with @davidjiglesias, @jnasselle, @rauldpm, @QU3B1M and @fcaffieri.
The following improvements were found to be implemented with the next iteration:

General

  1. Document the usage of each module (TaskFlow, Allocation, Provision, Test and Observability)
  2. Generate class or flow diagrams for each module
  3. Improve validations and error handling, since it is not clear when a module fails, the reason for the failure.
    3.1 TaskFlow
    3.2 Allocation
    3.3 Provision
    3.3 Test
  4. Define and implement a Logger
    4.1. Define centralized log
    4.2. Format
    4.3. Levels
    4.4. Output file for module (level debug) + Jenkins log (level info)

TaskFlow

  1. Delete the schema validator parameter and use it internally

Allocation

  1. Move the Inventory model to module generics so every module uses the same Inventory model
  2. Add more sizes and OS for Vagrant providers
  3. Validate the working OS in Vagrant
  4. Add more sizes and OS for AWS
  5. Validate the working OS in AWS
  6. Special VMS
  7. Enable custom VM config for providers for both vagrant and aws
  8. Improve or remove the function to load an existing Credential for a VM (currently is not working) Only for Vagrant
  9. AWS instances add name and type labels to perform cost calculations and have them controlled
  10. Unify size types for Vagrant and AWS

Provision

  1. Add the uninstaller action by parameter to uninstall the desired component
  2. Allow installing any version of wazuh with Package (Currently only allowed with AIO)
  3. Get ansible_os_family to render templates with jinja2. This makes it easier to reuse templates
  4. Validate dependency tree
    4.1. Validate the working OS in Vagrant
    4.2. Validate the working OS in AWS
    4.3. Adapt the dependencies installed for the tests so that they work on other systems such as CentOS 8
  5. Special VMS
  6. Improve or remove the function to load an existing Credential for a VM (currently is not working) Only for Vagrant

Testing

  1. Add Utils to test using the Wazuh API
  2. Add Utils to check all file permissions and ownership
  3. Add test for manager
  4. Test uninstall
  5. Remove the usage of the Playbook class to use just Ansible

Observability

  1. Define the usage of pytest-influxdb plugin for the test
    1.1 If we decide to use it, carry out the implementation
  2. Define the new dashboards to be implemented according to the new definitions of the modules. Requires analysis and definition of the dashboards
  3. Obtain new logs from the modules to view them on a dashboard. Depends on General 4
  4. Investigate to generate a dashboard that shows the DAG generated by Taskkflow

Jenkins

  1. Adapt the Jenkins pipeline to execute the Taskflow with dry-run to generate the DAG
  2. Adapt the Jenkins pipeline to execute the Taskflow to stop the process running

@QU3B1M
Copy link
Member

QU3B1M commented Jan 15, 2024

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment