diff --git a/deployability/modules/workflow_engine/README.md b/deployability/modules/workflow_engine/README.md index b513275416..2bcfe94b09 100755 --- a/deployability/modules/workflow_engine/README.md +++ b/deployability/modules/workflow_engine/README.md @@ -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}" @@ -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" @@ -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." @@ -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" @@ -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." @@ -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 @@ -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." @@ -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: @@ -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." @@ -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: @@ -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." @@ -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 @@ -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: @@ -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" diff --git a/deployability/modules/workflow_engine/examples/dtt1-agents-poc.yaml b/deployability/modules/workflow_engine/examples/dtt1-agents-poc.yaml index d1b7572acd..0773ccc4cd 100755 --- a/deployability/modules/workflow_engine/examples/dtt1-agents-poc.yaml +++ b/deployability/modules/workflow_engine/examples/dtt1-agents-poc.yaml @@ -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" @@ -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" @@ -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 @@ -82,7 +82,7 @@ tasks: with: path: python3 args: - - allocation/main.py + - modules/allocation/main.py - action: create - provider: "{infra-provider}" - size: large @@ -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" @@ -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: @@ -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: @@ -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 \ No newline at end of file