Skip to content

Commit e1d43b9

Browse files
committed
Merge branch 'release/v1.5.0'
2 parents 33779b0 + 9dcac31 commit e1d43b9

File tree

86 files changed

+2564
-178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2564
-178
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Keep the Galaxy builds
22
!cloudera-exe-*.tar.gz
33

4+
# Remove ansible-test output
5+
tests/output
6+
7+
# Remove molecule testing deployments
8+
**/molecule/*/deployment
9+
410
### Python template
511
# Byte-compiled / optimized / DLL files
612
__pycache__/

docs/configuration.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,24 @@ datahub:
1515
suffix:
1616
tags:
1717
de:
18+
definitions:
19+
suffix:
20+
tags:
21+
force_delete:
22+
vc_suffix:
1823
df:
1924
suffix:
2025
min_k8s_nodes:
2126
max_k8s_nodes:
2227
public_loadbalancer:
23-
ip_ranges:
28+
loadbalancer_ip_ranges:
29+
kube_ip_ranges:
30+
cluster_subnets:
31+
loadbalancer_subnets:
2432
teardown:
2533
persist:
34+
force_delete:
35+
terminate_deployments:
2636
dw:
2737
definitions:
2838
suffix:
@@ -37,6 +47,7 @@ env:
3747
log:
3848
ranger_audit_s3:
3949
suffix:
50+
tags:
4051
role:
4152
label:
4253
cross_account:
@@ -51,8 +62,10 @@ env:
5162
log:
5263
ranger_audit:
5364
suffix:
65+
tags:
5466
storage:
5567
suffix:
68+
tags:
5669
azure:
5770
app:
5871
name:
@@ -182,12 +195,14 @@ globals:
182195
dynamic_inventory:
183196
vm:
184197
count:
198+
os:
185199
gcloud_credential_file:
186200
infra_type:
187201
labels:
188202
admin:
189203
app:
190204
cml:
205+
cde:
191206
credential:
192207
cross_account:
193208
data:
@@ -212,6 +227,7 @@ globals:
212227
table:
213228
user:
214229
vpc:
230+
vpce:
215231
name_prefix:
216232
namespace_cdp:
217233
region:
@@ -243,6 +259,13 @@ infra:
243259
vpc_id:
244260
public_subnet_ids:
245261
private_subnet_ids:
262+
role:
263+
tags:
264+
policy:
265+
tags:
266+
storage:
267+
tags:
268+
private_endpoints:
246269
azure:
247270
metagroup:
248271
name:
@@ -277,7 +300,6 @@ infra:
277300
tag_key:
278301
tag_value:
279302
vm:
280-
os:
281303
suffix:
282304
type:
283305
gcp:
@@ -294,6 +316,9 @@ infra:
294316
knox:
295317
name:
296318
suffix:
319+
vpce:
320+
name:
321+
suffix:
297322
storage:
298323
name:
299324
path:
@@ -361,4 +386,4 @@ data:
361386
suffix:
362387
teardown:
363388
delete_policies:
364-
delete_roles:
389+
delete_roles:

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:

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ urllib3>1.24.2
77
cryptography>=2.3.1
88

99
# Ansible
10-
jmespath # community.general.json_query
11-
netaddr # ansible.netcommon.ipaddr
10+
jmespath # community.general.json_query
11+
netaddr # ansible.netcommon.ipaddr
12+
molecule[lint]==3.4 # Pinned due to https://github.com/ansible-community/molecule/issues/3243
1213

1314
# CDPCLI / cdpy
1415
git+git://github.com/cloudera-labs/cdpy@main#egg=cdpy

roles/common/defaults/main.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ common__public_suffix: "{{ globals.labels.public | default('p
3434
common__private_suffix: "{{ globals.labels.private | default('pvt') }}"
3535
common__security_group_knox_suffix: "{{ globals.labels.knox | default('knox') }}"
3636
common__security_group_default_suffix: "{{ globals.labels.default | default('default') }}"
37+
common__security_group_vpce_suffix: "{{ globals.labels.vpce | default('vpce') }}"
3738
common__role_suffix: "{{ globals.labels.role | default('role') }}"
3839
common__policy_suffix: "{{ globals.labels.policy | default('policy') }}"
3940
common__storage_suffix: "{{ globals.labels.storage | default('storage') }}"
@@ -45,6 +46,7 @@ common__external_data_suffix: "{{ globals.labels.external_data | def
4546
common__datalake_admin_suffix: "{{ globals.labels.datalake_admin | default('dladmin') }}"
4647
common__ranger_audit_suffix: "{{ globals.labels.ranger_audit | default('audit') }}"
4748
common__cml_suffix: "{{ globals.labels.cml | default('cml') }}"
49+
common__cde_suffix: "{{ globals.labels.cde | default('cde') }}"
4850
common__igw_suffix: "{{ globals.labels.internet_gateway | default('igw') }}"
4951
common__app_suffix: "{{ globals.labels.app | default('app') }}"
5052
common__group_suffix: "{{ globals.labels.group | default('group') }}"
@@ -72,9 +74,11 @@ common__vpc_public_subnets_suffix: "{{ infra.vpc.private_subnets_suffix |
7274

7375
common__security_group_knox_name: "{{ infra.security_group.knox.name | default([common__namespace, common__security_group_knox_name_suffix] | join('-')) }}"
7476
common__security_group_default_name: "{{ infra.security_group.default.name | default([common__namespace, common__security_group_default_name_suffix] | join('-')) }}"
77+
common__security_group_vpce_name: "{{ infra.security_group.vpce.name | default([common__namespace, common__security_group_vpce_name_suffix] | join('-')) }}"
7578

7679
common__security_group_knox_name_suffix: "{{ infra.security_group.knox.suffix | default(common__security_group_knox_suffix) }}"
7780
common__security_group_default_name_suffix: "{{ infra.security_group.default.suffix | default(common__security_group_default_suffix) }}"
81+
common__security_group_vpce_name_suffix: "{{ infra.security_group.vpce.suffix | default(common__security_group_vpce_suffix) }}"
7882

7983
common__ml_path: "{{ infra.storage.path.ml | default('datasci') }}"
8084
common__de_path: "{{ infra.storage.path.de | default('dataeng') }}"
@@ -83,6 +87,9 @@ common__data_path: "{{ infra.storage.path.data | default(
8387
common__ranger_audit_path: "{{ infra.storage.path.ranger_audit | default('ranger/audit') }}"
8488

8589
# AWS Infra
90+
common__aws_vpc_id: "{{ infra.aws.vpc.existing.vpc_id | default('') }}"
91+
common__aws_public_subnet_ids: "{{ infra.aws.vpc.existing.public_subnet_ids | default([]) }}"
92+
common__aws_private_subnet_ids: "{{ infra.aws.vpc.existing.private_subnet_ids | default([]) }}"
8693
common__aws_region: "{{ infra.aws.region | default('eu-west-1') }}"
8794
common__aws_profile: "{{ infra.aws.profile | default('') }}"
8895
common__aws_role_suffix: "{{ infra.aws.role.suffix | default(common__role_suffix) }}"
@@ -141,4 +148,4 @@ common__include_datahub: "{{ datahub is defined | bool }}"
141148
common__include_opdb: "{{ opdb is defined | bool }}"
142149

143150
# Teardown
144-
common__force_teardown: "{{ globals.force_teardown | default(False) }}" # WARNING: This will purge your namespace and anything related to it, use with extreme caution
151+
common__force_teardown: "{{ globals.force_teardown | default(False) }}" # WARNING: This will purge your namespace and anything related to it, use with extreme caution

roles/freeipa_host_group/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ freeipa_host_group__env_name: "{{ common__env_name }}"
2323
freeipa_host_group__infra_type: "{{ common__infra_type }}"
2424
freeipa_host_group__region: "{{ common__region }}"
2525

26+
freeipa_host_group__gcp_project: "{{ common__gcp_project }}"
27+
2628
# Outputs
2729
freeipa_host_group__host_group_name: "freeipa_server_hosts"

roles/freeipa_host_group/tasks/main.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,22 @@
4646
# when: freeipa_host_group__infra_type == "azure"
4747
# block:
4848

49-
# TODO: A block per cloud provider - GCP
5049
# Get instance details for specific infra_type - GCP
51-
# - name: Gather FreeIPA instance details on GCP
52-
# when: freeipa_host_group__infra_type == "gcp"
53-
# block:
50+
- name: Gather FreeIPA instance details on GCP
51+
when: freeipa_host_group__infra_type == "gcp"
52+
block:
53+
- name: Gather Address information used by FreeIPA GCP instance
54+
google.cloud.gcp_compute_address_info:
55+
region: "{{ freeipa_host_group__region }}"
56+
project: "{{ freeipa_host_group__gcp_project }}"
57+
# Filter on the freeipa instance name with the timestamp stripped
58+
filters:
59+
- "name : {{ __freeipa_server_instance_id | regex_replace('[^-]+$', '') }}*"
60+
register: __gcp_freeipa_address_info
61+
62+
- name: Set facts for the FreeIPA server IP
63+
ansible.builtin.set_fact:
64+
__freeipa_server_public_ip: "{{ __gcp_freeipa_address_info.resources | map(attribute='address') }}"
5465

5566
# Add the FreeIPA server and username to the inventory
5667
- name: Add FreeIPA servers to inventory

roles/info/tasks/main.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
- name: Set fact for the artifacts directory path
3535
ansible.builtin.set_fact:
3636
__artifacts_directory_path: "{{ __artifacts_directory_create.path }}"
37-
37+
3838
- name: Validate artifacts directory if it does exist
3939
when: __artifacts_directory.stat.exists
4040
block:
@@ -70,6 +70,11 @@
7070
env: "{{ info__env_name }}"
7171
register: __ml_info
7272

73+
- name: Query CDP DE Services
74+
cloudera.cloud.de_info:
75+
env: "{{ info__env_name }}"
76+
register: __de_info
77+
7378
- name: Query CDP Operational DBs
7479
cloudera.cloud.opdb_info:
7580
env: "{{ info__env_name }}"
@@ -82,11 +87,12 @@
8287
datalake: "{{ __datalake_info.datalakes | first | default({}) }}"
8388
datahubs: "{{ __datahubs_info.datahubs }}"
8489
workspaces: "{{ __ml_info.workspaces }}"
90+
services: "{{ __de_info.services }}"
8591
operational_dbs: "{{ __opdb_info.databases }}"
8692

8793
- name: Save the CDP deployment details locally
8894
when: info__create_deployment_details
8995
ansible.builtin.copy:
9096
content: "{{ { 'deployment': deployment } | to_nice_yaml(indent=2) }}"
9197
dest: "{{ __artifacts_directory_path | default('.') }}/deployment_info.yml"
92-
delegate_to: localhost
98+
delegate_to: localhost

roles/infrastructure/defaults/main.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ infra__public_endpoint_access: "{{ common__public_endpoint_access }}"
3434
# Dynamic Inventory for Clusters
3535
infra__private_key_file: "{{ globals.ssh.private_key_file | default('') }}"
3636
infra__dynamic_inventory_count: "{{ globals.dynamic_inventory.vm.count | default(0) }}"
37+
infra__dynamic_inventory_os: "{{ globals.dynamic_inventory.vm.os | default('el7') }}"
3738
infra__dynamic_inventory_vm_suffix: "{{ infra.dynamic_inventory.vm.suffix | default('vm') }}"
38-
infra__dynamic_inventory_os: "{{ infra.dynamic_inventory.vm.os | default('centos7') }}"
3939
infra__dynamic_inventory_vm_type: "{{ infra.dynamic_inventory.vm.type | default('std') }}"
4040
infra__dynamic_inventory_storage_type: "{{ infra.dynamic_inventory.storage.type | default('std') }}"
4141
infra__dynamic_inventory_storage_size: "{{ infra.dynamic_inventory.storage.size | default('200') }}"
@@ -89,13 +89,15 @@ infra__aws_private_subnet_ids: "{{ infra.aws.vpc.existing.private_subnet_id
8989

9090
infra__security_group_knox_name: "{{ common__security_group_knox_name }}"
9191
infra__security_group_default_name: "{{ common__security_group_default_name }}"
92+
infra__security_group_vpce_name: "{{ common__security_group_vpce_name }}"
9293

9394
infra__ml_deploy: "{{ common__include_ml }}"
9495
infra__ml_path: "{{ common__ml_path }}"
9596

9697
infra__de_deploy: "{{ common__include_de }}"
9798
infra__de_path: "{{ common__de_path }}"
9899

100+
# AWS
99101
infra__aws_profile: "{{ common__aws_profile }}"
100102
infra__aws_vpc_az_count: "{{ infra.aws.vpc.az_count | default(3) }}"
101103
infra__aws_igw_name: "{{ infra.aws.vpc.internet_gateway.name | default([infra__namespace, infra__aws_igw_suffix] | join('-')) }}"
@@ -109,6 +111,11 @@ infra__aws_private_route_table_name: "{{ infra.aws.vpc.labels.private_route_tabl
109111
infra__aws_nat_gateway_name: "{{ infra.aws.vpc.nat_gateway.name | default([infra__namespace, infra__aws_nat_gateway_suffix] | join('-')) }}"
110112
infra__aws_nat_gateway_suffix: "{{ infra.aws.vpc.nat_gateway.suffix | default(common__ngw_suffix) }}"
111113

114+
infra__aws_role_tags: "{{ infra.aws.role.tags | default({}) }}"
115+
infra__aws_policy_tags: "{{ infra.aws.policy.tags | default({}) }}"
116+
infra__aws_storage_tags: "{{ infra.aws.storage.tags | default({}) }}"
117+
infra__aws_private_endpoints: "{{ infra.aws.vpc.private_endpoints | default(common__tunnel) }}"
118+
112119
# GCP
113120
infra__gcp_project: "{{ common__gcp_project }}"
114121

roles/infrastructure/tasks/initialize_aws.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767

6868
- name: Set facts for existing AWS Private Subnet IDs and associate VPC ID
6969
ansible.builtin.set_fact:
70-
infra__aws_private_subnet_ids: "{{ infra__aws_private_subnet_ids }}"
7170
infra__aws_subnet_ids: "{{ infra__aws_private_subnet_ids }}"
7271
infra__aws_vpc_id: "{{ __aws_private_subnets_info.subnets | map(attribute='vpc_id') | list | first }}"
7372

0 commit comments

Comments
 (0)