Skip to content

Commit b101f16

Browse files
committed
Update to allow tagging for Cloudera Experiences
1 parent 063dec3 commit b101f16

File tree

8 files changed

+139
-6
lines changed

8 files changed

+139
-6
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: 12 additions & 4 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,8 +107,9 @@
104107

105108
- name: Execute CDP Dataflow setup
106109
when: run__include_df
107-
cloudera.cloud.df_service:
108-
env_crn: "{{ run__cdp_env_crn }}"
110+
tags: df
111+
cloudera.cloud.df:
112+
name: "{{ run__cdp_env_crn }}"
109113
nodes_min: "{{ run__df_nodes_min }}"
110114
nodes_max: "{{ run__df_nodes_max }}"
111115
public_loadbalancer: "{{ run__df_public_loadbalancer }}"
@@ -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,8 +177,9 @@
170177

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

177185
- name: Create CDP DE Virtual clusters

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"

0 commit comments

Comments
 (0)