-
Notifications
You must be signed in to change notification settings - Fork 32
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 3 - Allocation module - Module documentation #4870
Comments
UpdateUser documentationThe execution of the allocation is carried out through the Workflow library, or by executing them manually through commands. Initially, Python libraries must be installed. It is recommended to use virtual environments. Follow the technical documentation at https://docs.python.org/3/library/venv.html.
source {venv directory}/bin/activate
Navigate to the project directory and switch to the project branch: cd wazuh-qa
git checkout {project-branch}
pip3 install -r deployability/deps/requirements.txt Now, it is possible to use worklow engine library to launch provision module doing the following steps:
While in wazuh-qa: cd modules
pip3 uninstall -y workflow_engine && pip3 install .
Execute the command by referencing the parameters required by the library (launcher). python3 -m workflow_engine {.yaml fixture path} Example python3 -m workflow_engine modules/workflow_engine/examples/dtt1-agents-poc.yaml
If one wishes to execute the allocaation module without installing the workflow engine, they can proceed by using the launcher (module/allocation/main.py):
While in wazuh-qa/deployability python3 modules/allocation/main.py --action '{{}}' --provider '{{ vagrant }}' --size '{{ large }}' --composite-name '{{ composite-name }}' --inventory-output '{{ inventory }}' --track-output '{{ track }}'
Example: python3 modules/allocation/main.py --action create --provider vagrant --size large --composite-name linux-ubuntu-22.04-amd64 --inventory-output "/tmp/dtt1-poc/agent-linux-ubuntu-22.04-amd64/inventory.yaml" --track-output "/tmp/dtt1-poc/agent-linux-ubuntu-22.04-amd64/track.yaml" Technical documentationThe allocation module allows creating infrastructure on both AWS and locally (using Vagrant). Instructions can be initiated from the fixture and executed through the Workflow Engine or executed using Python commands. In either case, the following information will be needed: # Unique manager allocate task
- task: "allocate-manager"
description: "Allocate resources for the manager."
do:
this: process
with:
path: python3
args:
- modules/allocation/main.py
- action: create
- provider: "{infra-provider}"
- size: large
- composite-name: "{manager-os}"
- inventory-output: "{working-dir}/manager-{manager-os}/inventory.yaml"
- track-output: "{working-dir}/manager-{manager-os}/track.yaml" In the provided fixture fragment, it is evident that to execute the Allocation module launcher ( For manual execution, an example command would be: python3 modules/allocation/main.py --action create --provider vagrant --size large --composite-name linux-ubuntu-22.04-amd64 --inventory-output "/tmp/dtt1-poc/agent-linux-ubuntu-22.04-amd64/inventory.yaml" --track-output "/tmp/dtt1-poc/agent-linux-ubuntu-22.04-amd64/track.yaml" The module is comprised of: General-specific functions:
Provider-specific functions:
Each provider will contain:
LicenseWAZUH Copyright (C) 2015 Wazuh Inc. (License GPLv2) |
LGTM! I recommend that someone from outside DTT1 team also review it. |
LGTM |
A few general comments about this doc:
|
Moved issue from QA to DevOps due to Allocator module ownership |
Update reportUpdated diagrams. |
Description
This issue aims to generate usage and technical documentation for the Allocation module.
Tasks
The text was updated successfully, but these errors were encountered: