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

Changing dtt-agents-poc-yaml and README #4974

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 32 additions & 16 deletions deployability/modules/workflow_engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
manager-os: linux-ubuntu-22.04-amd64
infra-provider: vagrant
working-dir: /tmp/dtt1-poc

tasks:
# Generic agent test task
- task: "run-agent-tests-{agent}"
Expand All @@ -63,9 +63,9 @@ Initially, Python libraries must be installed. It is recommended to use virtual
with:
path: python3
args:
- testing/main.py
- modules/testing/main.py
- inventory: "{working-dir}/agent-{agent}/inventory.yaml"
- dependencies:
- dependencies:
- manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
- agent: "{working-dir}/agent-{agent}/inventory.yaml"
- tests: "install,register,stop"
Expand All @@ -78,7 +78,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
foreach:
- variable: agents-os
as: agent

# Generic agent test task
- task: "run-agent-tests-uninstall-{agent}"
description: "Run tests uninstall for the {agent} agent."
Expand All @@ -87,7 +87,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
with:
path: python3
args:
- testing/main.py
- modules/testing/main.py
- inventory: "{working-dir}/agent-{agent}/inventory.yaml"
- dependencies:
- manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
Expand All @@ -101,7 +101,23 @@ Initially, Python libraries must be installed. It is recommended to use virtual
foreach:
- variable: agents-os
as: agent


# Unique manager provision task
- task: "provision-manager"
description: "Provision the manager."
do:
this: process
with:
path: python3
args:
- modules/provision/main.py
- inventory-manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
- install:
- component: wazuh-manager
type: package
depends-on:
- "allocate-manager"

# Unique manager allocate task
- task: "allocate-manager"
description: "Allocate resources for the manager."
Expand All @@ -110,7 +126,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
with:
path: python3
args:
- allocation/main.py
- modules/allocation/main.py
- action: create
- provider: "{infra-provider}"
- size: large
Expand All @@ -122,10 +138,10 @@ Initially, Python libraries must be installed. It is recommended to use virtual
with:
path: python3
args:
- allocation/main.py
- modules/allocation/main.py
- action: delete
- track-output: "{working-dir}/manager-{manager-os}/track.yaml"

# Generic agent provision task
- task: "provision-install-{agent}"
description: "Provision resources for the {agent} agent."
Expand All @@ -134,7 +150,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
with:
path: python3
args:
- provision/main.py
- modules/provision/main.py
- inventory-agent: "{working-dir}/agent-{agent}/inventory.yaml"
- inventory-manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
- install:
Expand All @@ -147,7 +163,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
foreach:
- variable: agents-os
as: agent

# Generic agent provision task
- task: "provision-uninstall-{agent}"
description: "Provision resources for the {agent} agent."
Expand All @@ -156,7 +172,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
with:
path: python3
args:
- provision/main.py
- modules/provision/main.py
- inventory-agent: "{working-dir}/agent-{agent}/inventory.yaml"
- inventory-manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
- uninstall:
Expand All @@ -167,7 +183,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
foreach:
- variable: agents-os
as: agent

# Generic agent allocate task
- task: "allocate-{agent}"
description: "Allocate resources for the {agent} agent."
Expand All @@ -176,7 +192,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
with:
path: python3
args:
- allocation/main.py
- modules/allocation/main.py
- action: create
- provider: "{infra-provider}"
- size: small
Expand All @@ -188,7 +204,7 @@ Initially, Python libraries must be installed. It is recommended to use virtual
with:
path: python3
args:
- allocation.py
- modules/allocation/main.py
- action: delete
- track-output: "{working-dir}/agent-{agent}/track.yaml"
foreach:
Expand Down Expand Up @@ -268,7 +284,7 @@ tasks:
with:
path: python3
args:
- testing/main.py
- modules/testing/main.py
- inventory: "{working-dir}/agent-{agent}/inventory.yaml"
- dependencies:
- manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
Expand Down
32 changes: 16 additions & 16 deletions deployability/modules/workflow_engine/examples/dtt1-agents-poc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tasks:
with:
path: python3
args:
- testing/main.py
- modules/testing/main.py
- inventory: "{working-dir}/agent-{agent}/inventory.yaml"
- dependencies:
- manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
Expand All @@ -43,7 +43,7 @@ tasks:
with:
path: python3
args:
- testing/main.py
- modules/testing/main.py
- inventory: "{working-dir}/agent-{agent}/inventory.yaml"
- dependencies:
- manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
Expand All @@ -66,7 +66,7 @@ tasks:
with:
path: python3
args:
- provision/main.py
- modules/provision/main.py
- inventory-manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
- install:
- component: wazuh-manager
Expand All @@ -82,7 +82,7 @@ tasks:
with:
path: python3
args:
- allocation/main.py
- modules/allocation/main.py
- action: create
- provider: "{infra-provider}"
- size: large
Expand All @@ -94,7 +94,7 @@ tasks:
with:
path: python3
args:
- allocation/main.py
- modules/allocation/main.py
- action: delete
- track-output: "{working-dir}/manager-{manager-os}/track.yaml"

Expand All @@ -106,7 +106,7 @@ tasks:
with:
path: python3
args:
- provision/main.py
- modules/provision/main.py
- inventory-agent: "{working-dir}/agent-{agent}/inventory.yaml"
- inventory-manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
- install:
Expand All @@ -128,7 +128,7 @@ tasks:
with:
path: python3
args:
- provision/main.py
- modules/provision/main.py
- inventory-agent: "{working-dir}/agent-{agent}/inventory.yaml"
- inventory-manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
- uninstall:
Expand All @@ -148,21 +148,21 @@ tasks:
with:
path: python3
args:
- allocation/main.py
- modules/allocation/main.py
- action: create
- provider: "{infra-provider}"
- size: small
- composite-name: "{agent}"
- inventory-output: "{working-dir}/agent-{agent}/inventory.yaml"
- track-output: "{working-dir}/agent-{agent}/track.yaml"
#cleanup:
# this: process
# with:
# path: python3
# args:
# - allocation.py
# - action: delete
# - track-output: "{working-dir}/agent-{agent}/track.yaml"
cleanup:
this: process
with:
path: python3
args:
- modules/allocation/main.py
- action: delete
- track-output: "{working-dir}/agent-{agent}/track.yaml"
foreach:
- variable: agents-os
as: agent