Skip to content

Commit cd8647a

Browse files
authored
Add support for DFX Tech Preview (#12)
* Add basic DF support Signed-off-by: Daniel Chaffelson <chaffelson@gmail.com>
1 parent 4736c32 commit cd8647a

File tree

5 files changed

+61
-2
lines changed

5 files changed

+61
-2
lines changed

docs/configuration.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ datahub:
1515
suffix:
1616
tags:
1717
de:
18+
df:
19+
suffix:
20+
min_k8s_nodes:
21+
max_k8s_nodes:
22+
public_loadbalancer:
23+
ip_ranges:
24+
teardown:
25+
persist:
1826
dw:
1927
definitions:
2028
suffix:

roles/common/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,6 @@ common__env_admin_password: "{{ globals.admin_password | man
127127
common__include_ml: "{{ ml is defined | bool }}"
128128
common__include_dw: "{{ dw is defined | bool }}"
129129
common__include_de: "{{ de is defined | bool }}"
130+
common__include_df: "{{ df is defined | bool }}"
130131
common__include_datahub: "{{ datahub is defined | bool }}"
131132
common__include_opdb: "{{ opdb is defined | bool }}"

roles/runtime/defaults/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,16 @@ run__ml_tags: "{{ ml.tags | default(common__tags) }}"
5454
run__dw_definitions: "{{ dw.definitions | default([{}]) }}"
5555
run__dw_suffix: "{{ dw.suffix | default('dw') }}"
5656

57+
run__df_nodes_min: "{{ df.min_k8s_nodes | default(3) }}"
58+
run__df_nodes_max: "{{ df.max_k8s_nodes | default(5) }}"
59+
run__df_public_loadbalancer: "{{ df.public_loadbalancer | default(True) }}"
60+
run__df_ip_ranges: "{{ df.ip_ranges | default([]) }}"
61+
run__df_persist: "{{ df.teardown.persist | default(False) }}"
62+
5763
# Deploy
5864
run__include_ml: "{{ common__include_ml }}"
5965
run__include_dw: "{{ common__include_dw }}"
6066
run__include_de: "{{ common__include_de }}"
67+
run__include_df: "{{ common__include_df }}"
6168
run__include_datahub: "{{ common__include_datahub }}"
6269
run__include_opdb: "{{ common__include_opdb }}"

roles/runtime/tasks/setup_base.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,20 @@
7474
poll: 0
7575
register: __opdb_builds
7676

77+
- name: Execute CDP Dataflow setup
78+
when: run__include_df
79+
cloudera.cloud.df:
80+
name: "{{ run__env_name }}"
81+
nodes_min: "{{ run__df_nodes_min }}"
82+
nodes_max: "{{ run__df_nodes_max }}"
83+
public_loadbalancer: "{{ run__df_public_loadbalancer }}"
84+
ip_ranges: "{{ run__df_ip_ranges }}"
85+
state: present
86+
wait: yes
87+
async: 3600 # 1 hour timeout
88+
poll: 0
89+
register: __df_build
90+
7791
- name: Wait for CDP Datahub deployments to complete
7892
when: run__include_datahub
7993
ansible.builtin.async_status:
@@ -111,4 +125,13 @@
111125
register: __opdb_builds_async
112126
until: __opdb_builds_async.finished
113127
retries: 120
114-
delay: 30
128+
delay: 30
129+
130+
- name: Wait for CDP Dataflow deployment to complete
131+
when: run__include_df
132+
ansible.builtin.async_status:
133+
jid: "{{ __df_build.ansible_job_id }}"
134+
register: __df_build_async
135+
until: __df_build_async.finished
136+
retries: 120
137+
delay: 30

roles/runtime/tasks/teardown_base.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@
5353
poll: 0
5454
register: __dw_teardowns_info
5555

56+
- name: Execute CDP Dataflow teardown
57+
when: run__include_df
58+
cloudera.cloud.df:
59+
name: "{{ run__env_name }}"
60+
persist: "{{ run__df_persist }}"
61+
state: absent
62+
wait: yes
63+
async: 3600 # 1 hour timeout
64+
poll: 0
65+
register: __df_teardown_info
66+
5667
- name: Execute CDP ML Workspace teardown
5768
when: run__include_ml
5869
cloudera.cloud.ml:
@@ -117,4 +128,13 @@
117128
register: __opdb_teardowns_async
118129
until: __opdb_teardowns_async.finished
119130
retries: 120
120-
delay: 30
131+
delay: 30
132+
133+
- name: Wait for CDP Dataflow deployment to decommission
134+
when: run__include_df
135+
ansible.builtin.async_status:
136+
jid: "{{ __df_teardown_info.ansible_job_id }}"
137+
register: __df_teardown_async
138+
until: __df_teardown_async.finished
139+
retries: 120
140+
delay: 30

0 commit comments

Comments
 (0)