-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement(#5229): Enhancement of os validation
- Loading branch information
Showing
4 changed files
with
157 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
version: 0.1 | ||
description: This workflow is used to test agents' deployment for DDT1 PoC | ||
variables: | ||
agent-os: | ||
- linux-oracle-9-amd64 | ||
|
||
manager-os: linux-ubuntu-22.04-amd64 | ||
infra-provider: vagrant | ||
working-dir: /tmp/dtt1-poc | ||
|
||
tasks: | ||
# Unique manager allocate task | ||
- task: "allocate-manager-{manager-os}" | ||
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" | ||
- label-termination-date: "1d" | ||
- label-team: "qa" | ||
on-error: "abort-all" | ||
cleanup: | ||
this: process | ||
with: | ||
path: python3 | ||
args: | ||
- modules/allocation/main.py | ||
- action: delete | ||
- track-output: "{working-dir}/manager-{manager-os}/track.yaml" | ||
|
||
# Unique agent allocate task | ||
- task: "allocate-agent-{agent}" | ||
description: "Allocate resources for the agent." | ||
do: | ||
this: process | ||
with: | ||
path: python3 | ||
args: | ||
- 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" | ||
- label-termination-date: "1d" | ||
- label-team: "qa" | ||
foreach: | ||
- variable: agent-os | ||
as: agent | ||
cleanup: | ||
this: process | ||
with: | ||
path: python3 | ||
args: | ||
- modules/allocation/main.py | ||
- action: delete | ||
- track-output: "{working-dir}/agent-{agent}/track.yaml" | ||
depends-on: | ||
- "provision-manager-{manager-os}" | ||
|
||
# Unique manager provision task | ||
- task: "provision-manager-{manager-os}" | ||
description: "Provision the manager." | ||
do: | ||
this: process | ||
with: | ||
path: python3 | ||
args: | ||
- modules/provision/main.py | ||
- inventory: "{working-dir}/manager-{manager-os}/inventory.yaml" | ||
- install: | ||
- component: wazuh-manager | ||
type: assistant | ||
version: 4.7.3 | ||
live: True | ||
depends-on: | ||
- "allocate-manager-{manager-os}" | ||
|
||
|
||
# Generic agent test task | ||
- task: "run-agent-{agent}-tests" | ||
description: "Run tests install for the agent {agent}." | ||
do: | ||
this: process | ||
with: | ||
path: python3 | ||
args: | ||
- modules/testing/main.py | ||
- targets: | ||
- wazuh-1: "{working-dir}/manager-{manager-os}/inventory.yaml" | ||
- agent: "{working-dir}/agent-{agent}/inventory.yaml" | ||
- tests: "install,registration,restart,stop,uninstall" | ||
- component: "agent" | ||
- wazuh-version: "4.7.3" | ||
- wazuh-revision: "40714" | ||
- live: "True" | ||
foreach: | ||
- variable: agent-os | ||
as: agent | ||
depends-on: | ||
- "allocate-agent-{agent}" |
34 changes: 34 additions & 0 deletions
34
deployability/modules/workflow_engine/examples/agent/vagrant/test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: 0.1 | ||
description: Test agent restart with provisioning agents' with provision module | ||
variables: | ||
agent-os: | ||
- macos-ventura-13.4.1-arm64 | ||
manager-os: linux-ubuntu-18.04-amd64 | ||
infra-provider: aws | ||
working-dir: /tmp/dtt1-poc | ||
|
||
tasks: | ||
|
||
|
||
|
||
# Generic agent test task | ||
- task: "run-agent-{agent}-tests" | ||
description: "Run tests install for the agent {agent}." | ||
do: | ||
this: process | ||
with: | ||
path: python3 | ||
args: | ||
- modules/testing/main.py | ||
- targets: | ||
- wazuh-1: "{working-dir}/manager-{manager-os}/inventory.yaml" | ||
- agent: "{working-dir}/agent-{agent}/inventory.yaml" | ||
- tests: "install,registration,restart,stop,uninstall" | ||
- component: "agent" | ||
- wazuh-version: "4.7.3" | ||
- wazuh-revision: "40714" | ||
- live: "True" | ||
foreach: | ||
- variable: agent-os | ||
as: agent | ||
|