Skip to content

Commit 50bf280

Browse files
committed
Add PVC playbooks
Signed-off-by: Webster Mudge <wmudge@cloudera.com>
1 parent fb517c7 commit 50bf280

File tree

5 files changed

+726
-0
lines changed

5 files changed

+726
-0
lines changed

playbooks/pvc_base_postfix.yml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
---
2+
3+
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# STARTBLOCK # Fix Auto-TLS
18+
- name: Auto-TLS Services Setup
19+
hosts: "{{ target | default('cloudera_manager') }}"
20+
gather_facts: no
21+
roles:
22+
- role: cloudera.cluster.cloudera_manager.cms_tls
23+
when: autotls is defined and autotls == True
24+
tags:
25+
- autotls
26+
- never
27+
# ENDBLOCK # Fix Auto-TLS
28+
29+
# STARTBLOCK # Setup HDFS Encryption
30+
- name: Setup KTS HA
31+
hosts: "{{ target | default('localhost') }}"
32+
become: yes
33+
gather_facts: no
34+
tasks:
35+
- ansible.builtin.include_role:
36+
name: cloudera.cluster.deployment.services.kts_high_availability
37+
public: yes
38+
apply:
39+
tags:
40+
- kts
41+
- full_cluster
42+
when:
43+
- "'kts_active' in groups"
44+
- "'kts_passive' in groups"
45+
tags:
46+
- kts
47+
- full_cluster
48+
49+
- name: Handle KMS services
50+
hosts: "{{ target | default('localhost') }}"
51+
gather_facts: no
52+
become: yes
53+
roles:
54+
- role: cloudera.cluster.deployment.services.kms
55+
when: "'kms_servers' in groups"
56+
- role: cloudera.cluster.deployment.services.kms_ha
57+
when: "'kms_servers' in groups"
58+
tags:
59+
- kms
60+
- full_cluster
61+
62+
- name: Handle KMS services
63+
hosts: "{{ target | default('cloudera_manager') }}"
64+
gather_facts: no
65+
become: no
66+
roles:
67+
- role: cloudera.cluster.operations.refresh_ranger_kms_repo
68+
when: "'kms_servers' in groups"
69+
tags:
70+
- kms
71+
- full_cluster
72+
73+
- name: Restart and re-deploy stale client configs
74+
hosts: "{{ target | default('localhost') }}"
75+
gather_facts: no
76+
roles:
77+
- role: cloudera.cluster.operations.restart_stale
78+
when: "'kms_servers' in groups"
79+
vars:
80+
client_config_timeout: "{{ restart_client_config_timeout | default(300) }}"
81+
tags:
82+
- kms
83+
- restart_stale
84+
- full_cluster
85+
# ENDBLOCK # Setup HDFS Encryption
86+
87+
# STARTBLOCK # WXM Setup
88+
- name: Handle WXM Setup
89+
hosts: "{{ target | default('cluster_master_nodes[0]') }}"
90+
gather_facts: yes
91+
tags:
92+
- wxm
93+
- full_cluster
94+
tasks:
95+
- name: Setup WXM
96+
when:
97+
- use_wxm | default(False)
98+
- altus_key_id | length > 0
99+
- altus_private_key | length > 0
100+
import_role:
101+
name: cloudera.cluster.deployment.services.wxm
102+
# ENDBLOCK # WXM Setup
103+
104+
- name: Post-Install for PvC on all cluster hosts
105+
hosts: "{{ target | default('cloudera_manager, cluster, ecs_nodes') }}"
106+
gather_facts: yes
107+
tags:
108+
- pvc
109+
tasks:
110+
- name: Add missing ExtJS for Oozie UI
111+
include_role:
112+
name: cloudera.cluster.config.services.oozie_ui
113+
when: oozie_service_exists | default(false)
114+
115+
- name: Post-Install Cloudera Manager and Cluster
116+
hosts: "{{ target | default('cloudera_manager') }}"
117+
gather_facts: yes
118+
tags:
119+
- pvc
120+
tasks:
121+
- name: Refresh CM Services Info
122+
include_role:
123+
name: cloudera.cluster.cloudera_manager.services_info
124+
public: yes
125+
vars:
126+
cluster_name: "{{ cluster_name_base }}"
127+
128+
- name: Fix Hue ticket lifetime for Free IPA
129+
include_role:
130+
name: cloudera.cluster.config.services.hue_ticket_lifetime
131+
when:
132+
- hue_service_exists | default(false)
133+
- krb5_kdc_type == 'Red Hat IPA'
134+
135+
- name: Set Cloudera Manager session timeout to 30d
136+
include_role:
137+
name: cloudera.cluster.cloudera_manager.session_timeout
138+
139+
## TODO Believe this is version specific, in 7.1.7Spx solr plugin is NOT missing, needs work
140+
# - name: Create missing Solr plugin for Ranger
141+
# include_role:
142+
# name: cloudera.cluster.config.services.solr_ranger_plugin
143+
# when:
144+
# - ranger_service_exists | default(false)
145+
# - solr_service_exists | default(false)
146+
147+
- name: Add Solr urls to Knox
148+
include_role:
149+
name: cloudera.cluster.config.services.solr_knox
150+
when: knox_service_exists | default(false) and solr_service_exists | default(false)
151+
152+
- name: Add missing TLS values for KMS
153+
when:
154+
- kms_service_exists | default(False)
155+
- (autotls | default(False))
156+
include_role:
157+
name: cloudera.cluster.config.services.kms_tls
158+
159+
## TODO Believe this is version specific, in 7.1.7SPx Ranger policies are duplicated, needs work
160+
# - name: Ranger extra policies to have enough rights with basic accounts
161+
# when: ranger_service_exists | default(false)
162+
# include_role:
163+
# name: cloudera.cluster.config.services.ranger_pvc_default_policies
164+
165+
# End run
166+
###

0 commit comments

Comments
 (0)