-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo-setup-vars.yml
318 lines (305 loc) · 11.7 KB
/
demo-setup-vars.yml
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
aap2_insights_credentials:
- name: SC23 Demo - Insights Credentials
insights_username: "{{ rhsm_account_username }}"
insights_password: "{{ rhsm_account_password }}"
# ------------------------------------
# ------------------------------------
aap2_projects:
- name: "SC23 Demo"
scm_url: "https://github.com/redhat-italy/redhat-sc23-eda.git"
scm_branch: "main"
# ------------------------------------
# ------------------------------------
- name: "SC23 Demo - Insights"
scm_url: "https://cloud.redhat.com"
scm_credential: "SC23 Demo - Insights Credentials"
scm_type: "insights"
# ------------------------------------
# ------------------------------------
aap2_machine_credentials:
- name: SC23 Demo - Linux Credentials
username: sysadmin
password: redhat
# ------------------------------------
# ------------------------------------
aap2_custom_credentials:
- credential_type: SC23 Demo - ServiceNow Auth
name: SC23 Demo - ServiceNow Credentials
credential_type_inputs:
fields:
- id: snow_url
type: string
label: "ServiceNow URL"
secret: false
- id: snow_user
type: string
label: "ServiceNow username"
secret: false
- id: snow_pwd
type: string
label: "ServiceNow password"
secret: true
required:
- snow_url
- snow_user
- snow_pwd
credential_type_injectors:
extra_vars:
snow_instance: !unsafe "{{ snow_url }}"
snow_username: !unsafe "{{ snow_user }}"
snow_password: !unsafe "{{ snow_pwd }}"
credential_inputs:
snow_url: "{{ servicenow_instance_url }}"
snow_user: "{{ servicenow_instance_username }}"
snow_pwd: "{{ servicenow_instance_password }}"
# ------------------------------------
- credential_type: SC23 Demo - OCP Auth
name: SC23 Demo - OCP Credentials
credential_type_inputs:
fields:
- id: ocp_admin_username
type: string
label: "OCP Username"
secret: false
- id: ocp_admin_password
type: string
label: "OCP Password"
secret: true
- id: ocp_api_url
type: string
label: "OCP API URL"
secret: false
required:
- ocp_api_url
- ocp_username
- ocp_admin_password
credential_type_injectors:
extra_vars:
ocp_api_url: !unsafe "{{ ocp_api_url }}"
ocp_admin_username: !unsafe "{{ ocp_admin_username }}"
ocp_admin_password: !unsafe "{{ ocp_admin_password }}"
credential_inputs:
ocp_api_url: "{{ openshift_api_url }}"
ocp_admin_username: "{{ openshift_admin_username }}"
ocp_admin_password: "{{ openshift_admin_password }}"
# ------------------------------------
- credential_type: SC23 Demo - RHSM Auth
name: SC23 Demo - RHSM Credentials
credential_type_inputs:
fields:
- id: rhsm_user
type: string
label: RHSM Username
secret: false
- id: rhsm_password
type: string
label: RHSM Password
secret: true
required:
- rhsm_user
- rhsm_password
credential_type_injectors:
extra_vars:
rhsm_user: !unsafe "{{ rhsm_user }}"
rhsm_password: !unsafe "{{ rhsm_password }}"
env:
INSIGHTS_USER: !unsafe "{{ rhsm_user }}"
INSIGHTS_PASSWORD: !unsafe "{{ rhsm_password }}"
credential_inputs:
rhsm_user: "{{ rhsm_account_username }}"
rhsm_password: "{{ rhsm_account_password }}"
# ------------------------------------
- credential_type: SC23 Demo - Controller Auth
credential_type_inputs:
fields:
- id: aap2_url
type: string
label: "AAP2 Controller URL"
secret: false
- id: aap2_user
type: string
label: "AAP2 Controller username"
secret: false
- id: aap2_pwd
type: string
label: "AAP2 Controller password"
secret: true
required:
- aap2_url
- aap2_user
- aap2_pwd
credential_type_injectors:
env:
CONTROLLER_HOST: !unsafe "{{ aap2_url }}"
CONTROLLER_USERNAME: !unsafe "{{ aap2_user }}"
CONTROLLER_PASSWORD: !unsafe "{{ aap2_pwd }}"
name: SC23 Demo - AAP2 Controller Credentials
credential_inputs:
aap2_url: "{{ aap2_controller_url }}"
aap2_user: "{{ aap2_controller_username }}"
aap2_pwd: "{{ aap2_controller_password }}"
# ------------------------------------
# ------------------------------------
aap2_inventories:
- aap2_inventory_name: SC23 Demo - Insights Inventory
# ------------------------------------
- aap2_inventory_name: SC23 Demo - SCM Inventory
# ------------------------------------
# ------------------------------------
aap2_inventory_sources:
- aap2_inventory_source_name: SC23 Demo - SCM Inventory Source
aap2_inventory_source_inventory: SC23 Demo - SCM Inventory
aap2_inventory_source_type: scm
aap2_inventory_source_project: "SC23 Demo"
aap2_inventory_source_path: inventory
# ------------------------------------
- aap2_inventory_source_name: SC23 Demo - Insights source
aap2_inventory_source_inventory: SC23 Demo - Insights Inventory
aap2_inventory_source_type: insights
aap2_inventory_source_credential: "SC23 Demo - Insights Credentials"
aap2_inventory_source_vars:
get_patches: true
get_tags: true
groups:
insights_hosts: insights_id != ''
patching: insights_patching.enabled
stale: insights_patching.stale
bug_patch: insights_patching.rhba_count > 0
security_patch: insights_patching.rhsa_count > 0
enhancement_patch: insights_patching.rhea_count > 0
keyed_groups:
- key: insights_tags['insights-client']['group']
separator: ""
# ------------------------------------
# ------------------------------------
aap2_templates:
### EDA ###
- aap2_template_name: "[EDA][Insights] Handle Advisories"
aap2_template_playbook: playbooks/insights_advisory_handle.yml
aap2_template_credentials:
- SC23 Demo - AAP2 Controller Credentials
- SC23 Demo - RHSM Credentials
- SC23 Demo - Linux Credentials
aap2_template_inventory: SC23 Demo - Insights Inventory
aap2_template_ask_vars: true
aap2_template_project: SC23 Demo
# ------------------------------------
- aap2_template_name: "[EDA][Alertmanager][OCP] - Report OCPVirtLowDisk alert"
aap2_template_playbook: playbooks/alertmanager_ocp_ocpvirtlowdisk_report.yml
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_ask_vars: true
aap2_template_credentials: "SC23 Demo - ServiceNow Credentials"
aap2_template_project: SC23 Demo
# ------------------------------------
- aap2_template_name: "[EDA][Alertmanager][OCP] - Resolve OCPVirtLowDisk alert"
aap2_template_playbook: playbooks/alertmanager_ocp_ocpvirtlowdisk_fix.yml
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_ask_vars: true
aap2_template_credentials: "SC23 Demo - Linux Credentials"
aap2_template_project: SC23 Demo
# ------------------------------------
# ------------------------------------
- aap2_template_name: "[EDA][OCP] Deploy VM on OCP"
aap2_template_playbook: playbooks/ocp_vm_deploy.yml
aap2_template_credentials:
- SC23 Demo - OCP Credentials
aap2_template_survey_spec: "{{ lookup('file', 'survey_templates/survey_spec_ocp_virt.json') }}"
aap2_template_survey_enabled: true
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_project: SC23 Demo
# ------------------------------------
- aap2_template_name: "[EDA][OCP] VM - Configure monitoring"
aap2_template_playbook: playbooks/ocp_vm_configure_monitoring.yml
aap2_template_credentials:
- SC23 Demo - OCP Credentials
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_project: SC23 Demo
# ------------------------------------
- aap2_template_name: "[EDA][OCP] Destroy VM on OCP"
aap2_template_playbook: playbooks/ocp_vm_destroy.yml
aap2_template_credentials:
- SC23 Demo - OCP Credentials
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_project: SC23 Demo
# ------------------------------------
# ------------------------------------
- aap2_template_name: "[EDA][Linux] Register RH VM"
aap2_template_playbook: playbooks/linux_subscribe_system.yml
aap2_template_ask_vars: true
aap2_template_credentials:
- "SC23 Demo - Linux Credentials"
- "SC23 Demo - RHSM Credentials"
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_project: SC23 Demo
# ------------------------------------
- aap2_template_name: "[EDA][Linux] Configure system with Insights"
aap2_template_playbook: playbooks/linux_insights_configure.yml
aap2_template_credentials: "SC23 Demo - Linux Credentials"
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_ask_vars: true
aap2_template_project: SC23 Demo
# ------------------------------------
- aap2_template_name: "[EDA][Linux] Configure node-exporter on VM"
aap2_template_playbook: playbooks/linux_configure_node_exporter.yml
aap2_template_ask_vars: true
aap2_template_credentials: "SC23 Demo - Linux Credentials"
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_project: SC23 Demo
# ------------------------------------
# ------------------------------------
# ------------------------------------
- aap2_template_name: "[EDA][Kafka] Shutdown Engine"
aap2_template_playbook: playbooks/kafka_shutdown_engine.yml
aap2_template_ask_vars: true
aap2_template_credentials:
- SC23 Demo - Linux Credentials
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_project: SC23 Demo
# ------------------------------------
- aap2_template_name: "[EDA][Kafka] Report Engine shutdown with a ticket"
aap2_template_playbook: playbooks/snow_report.yml
aap2_template_ask_vars: true
aap2_template_credentials:
- SC23 Demo - ServiceNow Credentials
aap2_template_inventory: SC23 Demo - SCM Inventory
aap2_template_project: SC23 Demo
# ------------------------------------
# ------------------------------------
aap2_workflows:
- aap2_workflow_name: "[EDA][OCP] Create VM and configure monitoring"
aap2_workflow_project: SC23 Demo
aap2_workflow_survey_spec: "{{ lookup('file', 'survey_templates/survey_spec_ocp_virt.json') }}"
aap2_workflow_survey_enabled: true
aap2_workflow_nodes:
- node_name: ocp-vm-create
nodes_on_success:
- ocp-configure-monitoring
node_job_template: "[EDA][OCP] Deploy VM on OCP"
- node_name: ocp-configure-monitoring
node_job_template: "[EDA][OCP] VM - Configure monitoring"
####### EDA CONTROLLER VARIABLES ########
eda_projects:
- name: "SC23 Demo"
git_url: https://github.com/redhat-italy/redhat-sc23-eda.git
description: "Demo project to show EDA in action"
eda_decision_envs:
- name: "kubealex-eda"
image_url: quay.io/kubealex/eda-decision-env
eda_activations:
- name: eda-alertmanager
rulebook: eda-rulebook-alertmanager.yml
project_name: "SC23 Demo"
decision_env: "kubealex-eda"
- name: eda-kafka
rulebook: eda-rulebook-kafka.yml
project_name: "SC23 Demo"
decision_env: "kubealex-eda"
extra_vars: "kafka_host: {{ kafka_host }}\nkafka_port: {{ kafka_port }}\nkafka_topic: {{ kafka_topic }}"
- name: eda-insights
rulebook: eda-rulebook-insights.yml
project_name: "SC23 Demo"
decision_env: "kubealex-eda"
- name: eda-webhook
rulebook: eda-rulebook-webhook.yml
project_name: "SC23 Demo"
decision_env: "kubealex-eda"