Skip to content

Commit 9e513ae

Browse files
authored
Extensible tagging for Cloudera Experiences (#48)
* Update to allow tagging for Cloudera Experiences Signed-off-by: Raddish18 <[email protected]>
1 parent fc1155b commit 9e513ae

File tree

8 files changed

+135
-2
lines changed

8 files changed

+135
-2
lines changed

docs/design.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,20 @@ For example, to add a pre-deploy role:
109109
- plat
110110
- run
111111
- animals
112+
- ml
113+
- dw
114+
- opdb
115+
- dh
112116
tags:
113117
- validate
114118
- infra
115119
- plat
116120
- run
117121
- animals
122+
- ml
123+
- dw
124+
- opdb
125+
- dh
118126
- name: Import the core Runlevels (and their tags)
119127
ansible.builtin.import_role:
120128
name: cloudera.exe.sequence
@@ -158,12 +166,20 @@ For example, adding an explicit `install` tag to execute the [Installation](runl
158166
- plat
159167
- run
160168
- install
169+
- ml
170+
- dw
171+
- opdb
172+
- dh
161173
tags:
162174
- validate
163175
- infra
164176
- plat
165177
- run
166178
- install
179+
- ml
180+
- dw
181+
- opdb
182+
- dh
167183
168184
- name: Validate Platform Configuration
169185
ansible.builtin.include_role:
@@ -175,11 +191,19 @@ For example, adding an explicit `install` tag to execute the [Installation](runl
175191
- plat
176192
- run
177193
- install
194+
- ml
195+
- dw
196+
- opdb
197+
- dh
178198
tags:
179199
- validate
180200
- plat
181201
- run
182202
- install
203+
- ml
204+
- dw
205+
- opdb
206+
- dh
183207
184208
- name: Validate Runtime Configuration
185209
ansible.builtin.include_role:
@@ -190,10 +214,18 @@ For example, adding an explicit `install` tag to execute the [Installation](runl
190214
- validate
191215
- run
192216
- install
217+
- ml
218+
- dw
219+
- opdb
220+
- dh
193221
tags:
194222
- validate
195223
- run
196224
- install
225+
- ml
226+
- dw
227+
- opdb
228+
- dh
197229
198230
- name: Validate Installation Configuration
199231
ansible.builtin.include_role:

roles/runtime/tasks/initialize_base.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959

6060
- name: Prepare for CDP Datahub clusters
6161
when: run__include_datahub
62+
tags: dh
6263
block:
6364
- name: Retrieve Image Catalog File
6465
ansible.builtin.uri:
@@ -121,6 +122,7 @@
121122
loop: "{{ run__datahub_configs }}"
122123

123124
- name: Prepare for CDP OpDB experiences
125+
tags: opdb
124126
when: run__include_opdb
125127
block:
126128
- name: Construct OpDB Configurations
@@ -136,6 +138,7 @@
136138
label: "{{ config.name }}"
137139

138140
- name: Prepare for CDP ML Workspace experiences
141+
tags: ml
139142
when: run__include_ml
140143
block:
141144
- name: Construct CDP ML Workspace configurations

roles/runtime/tasks/initialize_setup.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616

1717
- name: Include provider-specific tasks to initialize Runtime setup
1818
ansible.builtin.include_tasks: "initialize_setup_{{ run__infra_type }}.yml"
19+
tags:
20+
- ml
21+
- dw
22+
- opdb
23+
- dh
1924

2025
- name: Initialize CDP Runtime setup
2126
ansible.builtin.include_tasks: "initialize_base.yml"
27+
tags:
28+
- ml
29+
- dw
30+
- opdb
31+
- dh

roles/runtime/tasks/setup.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616

1717
- name: Include Tasks to Setup CDP Public Runtimes
1818
ansible.builtin.include_tasks: "setup_base.yml"
19+
tags:
20+
- ml
21+
- dw
22+
- opdb
23+
- dh
1924

2025
- name: Include Tasks to Setup provider-specific CDP Public Runtimes
2126
ansible.builtin.include_tasks: "setup_{{ run__infra_type }}.yml"
27+
tags:
28+
- dw
29+
- dh

roles/runtime/tasks/setup_aws.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
- name: Set up AWS EC2 metadata for CDP Datahubs
1818
when: run__include_datahub
19+
tags: dh
1920
block:
2021
- name: Retrieve AWS EC2 instance details
2122
community.aws.ec2_instance_info:
@@ -36,6 +37,7 @@
3637

3738
- name: Setup CDP DW cluster on AWS
3839
when: run__include_dw
40+
tags: dw
3941
block:
4042
- name: Execute CDP DW cluster setup
4143
cloudera.cloud.dw_cluster:

roles/runtime/tasks/setup_base.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
- name: Request CDP Datahub deployments
1818
when: run__include_datahub
19+
tags: dh
1920
cloudera.cloud.datahub_cluster:
2021
name: "{{ __datahub_config_item.name }}"
2122
env: "{{ run__env_name }}"
@@ -37,6 +38,7 @@
3738

3839
- name: Execute CDP ML Workspace experiences setup
3940
when: run__include_ml
41+
tags: ml
4042
cloudera.cloud.ml:
4143
name: "{{ __ml_config_item.name }}"
4244
env: "{{ run__env_name }}"
@@ -89,6 +91,7 @@
8991

9092
- name: Execute CDP OpDB setup
9193
when: run__include_opdb
94+
tags: opdb
9295
cloudera.cloud.opdb:
9396
name: "{{ __opdb_config_item.name }}"
9497
env: "{{ run__env_name }}"
@@ -104,6 +107,7 @@
104107

105108
- name: Execute CDP Dataflow setup
106109
when: run__include_df
110+
tags: df
107111
cloudera.cloud.df_service:
108112
env_crn: "{{ run__cdp_env_crn }}"
109113
nodes_min: "{{ run__df_nodes_min }}"
@@ -118,6 +122,7 @@
118122

119123
- name: Wait for CDP Datahub deployments to complete
120124
when: run__include_datahub
125+
tags: dh
121126
ansible.builtin.async_status:
122127
jid: "{{ __datahub_build_item.ansible_job_id }}"
123128
loop_control:
@@ -131,6 +136,7 @@
131136

132137
- name: Wait for CDP ML Workspace experiences to complete
133138
when: run__include_ml
139+
tags: ml
134140
ansible.builtin.async_status:
135141
jid: "{{ __ml_build.ansible_job_id }}"
136142
loop_control:
@@ -157,6 +163,7 @@
157163

158164
- name: Wait for CDP OpDB deployments to complete
159165
when: run__include_opdb
166+
tags: opdb
160167
ansible.builtin.async_status:
161168
jid: "{{ __opdb_build.ansible_job_id }}"
162169
loop_control:
@@ -170,6 +177,7 @@
170177

171178
- name: Wait for CDP Dataflow deployment to complete
172179
when: run__include_df
180+
tags: df
173181
cloudera.cloud.df_service:
174182
env_crn: "{{ run__cdp_env_crn }}"
175183
wait: yes

roles/runtime/tasks/validate_base.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# limitations under the License.
1616

1717
- name: Check OpDB database names
18+
tags: opdb
1819
when:
1920
- run__include_opdb
2021
- "'name' in __opdb_definition"
@@ -29,6 +30,7 @@
2930
loop: "{{ run__opdb_definitions }}"
3031

3132
- name: Check Datahub names
33+
tags: dh
3234
when:
3335
- run__include_datahub
3436
- "'name' in __datahub_definition"

roles/sequence/tasks/main.yml

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,20 @@
2626
- infra
2727
- plat
2828
- run
29+
- ml
30+
- dw
31+
- opdb
32+
- dh
2933
tags:
3034
- validate
3135
- infra
3236
- plat
3337
- run
34-
38+
- ml
39+
- dw
40+
- opdb
41+
- dh
42+
3543
- name: Validate Platform Configuration
3644
ansible.builtin.include_role:
3745
name: cloudera.exe.platform
@@ -41,10 +49,18 @@
4149
- validate
4250
- plat
4351
- run
52+
- ml
53+
- dw
54+
- opdb
55+
- dh
4456
tags:
4557
- validate
4658
- plat
4759
- run
60+
- ml
61+
- dw
62+
- opdb
63+
- dh
4864

4965
- name: Validate Runtime Configuration
5066
ansible.builtin.include_role:
@@ -54,9 +70,17 @@
5470
tags:
5571
- validate
5672
- run
73+
- ml
74+
- dw
75+
- opdb
76+
- dh
5777
tags:
5878
- validate
5979
- run
80+
- ml
81+
- dw
82+
- opdb
83+
- dh
6084

6185
- name: Initialize Runtime Teardown
6286
ansible.builtin.include_role:
@@ -147,11 +171,19 @@
147171
- infra
148172
- plat
149173
- run
174+
- ml
175+
- dw
176+
- opdb
177+
- dh
150178
tags:
151179
- init
152180
- infra
153181
- plat
154182
- run
183+
- ml
184+
- dw
185+
- opdb
186+
- dh
155187

156188
- name: Setup Infrastructure
157189
when: sequence__setup_infra | bool
@@ -163,10 +195,18 @@
163195
- infra
164196
- plat
165197
- run
198+
- ml
199+
- dw
200+
- opdb
201+
- dh
166202
tags:
167203
- infra
168204
- plat
169205
- run
206+
- ml
207+
- dw
208+
- opdb
209+
- dh
170210

171211
- name: Initialize Platform Setup
172212
when: sequence__setup_plat | bool
@@ -178,10 +218,18 @@
178218
- init
179219
- plat
180220
- run
221+
- ml
222+
- dw
223+
- opdb
224+
- dh
181225
tags:
182226
- init
183227
- plat
184228
- run
229+
- ml
230+
- dw
231+
- opdb
232+
- dh
185233

186234
- name: Setup Platform
187235
when: sequence__setup_plat | bool
@@ -192,9 +240,17 @@
192240
tags:
193241
- plat
194242
- run
243+
- ml
244+
- dw
245+
- opdb
246+
- dh
195247
tags:
196248
- plat
197249
- run
250+
- ml
251+
- dw
252+
- opdb
253+
- dh
198254

199255
- name: Initialize Runtime Setup
200256
when: sequence__setup_runtime | bool
@@ -205,9 +261,17 @@
205261
tags:
206262
- init
207263
- run
264+
- ml
265+
- dw
266+
- opdb
267+
- dh
208268
tags:
209269
- init
210270
- run
271+
- ml
272+
- dw
273+
- opdb
274+
- dh
211275

212276
- name: Setup Runtime
213277
when: sequence__setup_runtime | bool
@@ -218,4 +282,8 @@
218282
tags:
219283
- run
220284
tags:
221-
- run
285+
- run
286+
- ml
287+
- dw
288+
- opdb
289+
- dh

0 commit comments

Comments
 (0)