-
Notifications
You must be signed in to change notification settings - Fork 32
/
dtt1-agents-aws.yaml
executable file
·142 lines (137 loc) · 4.1 KB
/
dtt1-agents-aws.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
version: 0.1
description: This workflow is used to test agents deployment por DDT1 PoC
variables:
agent-os:
- linux-ubuntu-18.04-amd64
- linux-ubuntu-20.04-amd64
- linux-ubuntu-22.04-amd64
- linux-debian-10-amd64
- linux-debian-11-amd64
- linux-debian-12-amd64
- linux-oracle-9-amd64
- linux-centos-7-amd64
- linux-centos-8-amd64
- linux-redhat-7-amd64
- linux-redhat-8-amd64
- linux-redhat-9-amd64
- linux-amazon-2-amd64
manager-os: linux-ubuntu-22.04-amd64
infra-provider: aws
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"
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"
# 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 provision task
- task: "provision-install-{agent}"
description: "Provision resources for the {agent} agent."
do:
this: process
with:
path: python3
args:
- modules/provision/main.py
- inventory: "{working-dir}/agent-{agent}/inventory.yaml"
- dependencies:
- manager: "{working-dir}/manager-{manager-os}/inventory.yaml"
- install:
- component: wazuh-agent
type: package
version: 4.7.3
live: True
depends-on:
- "allocate-agent-{agent}"
- "provision-manager-{manager-os}"
foreach:
- variable: agents-os
as: agent
# 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:
- "provision-manager-{manager-os}"
- "allocate-agent-{agent}"