Skip to content

Commit 9523f3e

Browse files
committed
add documentation
1 parent 400aa76 commit 9523f3e

File tree

5 files changed

+161
-12
lines changed

5 files changed

+161
-12
lines changed

docs/_sources/index.rst.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ cloudera.cloud Ansible Collection
4242
ml_workspace_access <ml_workspace_access>
4343
opdb <opdb>
4444
opdb_info <opdb_info>
45+
de <de>
46+
de_info <de_info>
4547

4648
This repository hosts the ``cloudera.cloud`` Ansible collection. The collection includes modules and other Ansible
4749
assets to help automate the provisioning and use of Cloudera Data Platform (CDP) experiences, datalakes, and
@@ -148,4 +150,4 @@ More Information
148150
.. _CdpCliPip: https://pypi.org/project/cdpcli/
149151
.. _CdpApiAccessKey: https://docs.cloudera.com/management-console/cloud/user-management/topics/mc-generating-an-api-access-key.html
150152
.. _CdpAwsRequirements: https://docs.cloudera.com/management-console/cloud/requirements-aws/topics/mc-requirements-aws.html
151-
.. _CdpAzureRequirements: https://docs.cloudera.com/management-console/cloud/requirements-azure/topics/mc-azure-requirements.html
153+
.. _CdpAzureRequirements: https://docs.cloudera.com/management-console/cloud/requirements-azure/topics/mc-azure-requirements.html

docsrc/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ cloudera.cloud Ansible Collection
4646
ml_workspace_access <ml_workspace_access>
4747
opdb <opdb>
4848
opdb_info <opdb_info>
49+
de <de>
50+
de_info <de_info>
4951

5052
This repository hosts the ``cloudera.cloud`` Ansible collection. The collection includes modules and other Ansible
5153
assets to help automate the provisioning and use of Cloudera Data Platform (CDP) experiences, datalakes, and
@@ -152,4 +154,4 @@ More Information
152154
.. _CdpCliPip: https://pypi.org/project/cdpcli/
153155
.. _CdpApiAccessKey: https://docs.cloudera.com/management-console/cloud/user-management/topics/mc-generating-an-api-access-key.html
154156
.. _CdpAwsRequirements: https://docs.cloudera.com/management-console/cloud/requirements-aws/topics/mc-requirements-aws.html
155-
.. _CdpAzureRequirements: https://docs.cloudera.com/management-console/cloud/requirements-azure/topics/mc-azure-requirements.html
157+
.. _CdpAzureRequirements: https://docs.cloudera.com/management-console/cloud/requirements-azure/topics/mc-azure-requirements.html

plugins/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ modules employ the underlying SDK contained within the `cdpy` Python package.
4646
| [ml_info](./modules/ml_info.py) | Gather information about CDP Machine Learning experiences |
4747
| [ml_workspace_access](./modules/ml_workspace_access.py) | Grant and revoke user access to and from CDP Machine Learning experiences |
4848
| [opdb](./modules/opdb.py) | Create, manage, and destroy CDP Operational Database experiences |
49-
| [opdb_info](./modules/opdb_info.py) | Gather information about CDP Operational Database experiences |
49+
| [opdb_info](./modules/opdb_info.py) | Gather information about CDP Operational Database experiences |
50+
| [de](./modules/de.py) | Create, manage, and destroy CDP Data Engineering experiences |
51+
| [de_info](./modules/de_info.py) | Gather information about CDP Data Engineering experiences |

plugins/modules/de.py

Lines changed: 146 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
description:
3030
- Enable or Disable CDP Data Engineering Service
3131
author:
32-
- "Curtis Howard (@curtis)"
32+
- "Curtis Howard (@curtishoward)"
33+
- "Alan Silva (@acsjumpi)"
3334
requirements:
3435
- cdpy
3536
options:
@@ -181,8 +182,150 @@
181182
- polling_timeout
182183
'''
183184

184-
# TODO: dcoument 'EXAMPLES' for DE
185-
# TODO: document 'RETURN' for DE
185+
EXAMPLES = r'''
186+
# Sample definition for a DE service
187+
de:
188+
definitions:
189+
- name: cde-cloudera-deploy-example
190+
instance_type: "m5.2xlarge"
191+
minimum_instances: 2
192+
maximum_instances: 4
193+
minimum_spot_instances: 0
194+
maximum_spot_instances: 0
195+
enable_public_endpoint: yes
196+
enable_workload_analytics: yes
197+
initial_instances: 2
198+
initial_spot_instances: 0
199+
root_volume_size: 100
200+
chart_value_overrides: [{"chartName":"dex-app", "overrides":"dexapp.api.gangScheduling.enabled:true"}]
201+
skip_validation: yes
202+
tags: {"cde-cloudera-deploy-example":"v0.0.1"}
203+
use_ssd: yes
204+
'''
205+
206+
RETURN = r'''
207+
service:
208+
description: DE service description
209+
type: complex
210+
returned: always
211+
contains:
212+
clusterId:
213+
description: Cluster Id of the CDE Service.
214+
returned: always
215+
type: str
216+
creatorEmail:
217+
description: Email Address of the CDE creator.
218+
returned: always
219+
type: str
220+
enablingTime:
221+
description: Timestamp of service enabling.
222+
returned: always
223+
type: str
224+
environmentName:
225+
description: CDP Environment Name.
226+
returned: always
227+
type: str
228+
name:
229+
description: Name of the CDE Service.
230+
returned: always
231+
type: str
232+
status:
233+
description: Status of the CDE Service.
234+
returned: always
235+
type: str
236+
chartValueOverrides:
237+
description: Status of the CDE Service.
238+
returned: always
239+
type: array
240+
elements: complex
241+
contains:
242+
ChartValueOverridesResponse:
243+
type: list
244+
returned: always
245+
contains:
246+
chartName:
247+
description: Name of the chart that has to be overridden.
248+
returned: always
249+
type: str
250+
overrides:
251+
description: Space separated key value-pairs for overriding chart values (colon separated)
252+
returned: always
253+
type: str
254+
cloudPlatform:
255+
description: The cloud platform where the CDE service is enabled.
256+
returned: always
257+
type: str
258+
clusterFqdn:
259+
description: FQDN of the CDE service.
260+
returned: always
261+
type: str
262+
creatorCrn:
263+
description: CRN of the creator.
264+
returned: always
265+
type: str
266+
dataLakeAtlasUIEndpoint:
267+
description: Endpoint of Data Lake Atlas.E
268+
returned: always
269+
type: str
270+
dataLakeFileSystems:
271+
description: The Data lake file system.
272+
returned: always
273+
type: str
274+
environmentCrn:
275+
description: CRN of the environment.
276+
returned: always
277+
type: str
278+
logLocation:
279+
description: Location for the log files of jobs.
280+
returned: always
281+
type: str
282+
resources:
283+
description: Resources details of CDE Service.
284+
returned: always
285+
type: complex
286+
contains:
287+
ServiceResources:
288+
description: Object to store resources for a CDE service.
289+
returned: always
290+
type: complex
291+
contains:
292+
initial_instances:
293+
description: Initial instances for the CDE service.
294+
returned: always
295+
type: str
296+
initial_spot_instances:
297+
description: Initial Spot Instances for the CDE Service.
298+
returned: always
299+
type: str
300+
instance_type:
301+
description: Instance type of the CDE service.
302+
returned: always
303+
type: str
304+
max_instances:
305+
description: Maximum instances for the CDE service.
306+
returned: always
307+
type: str
308+
max_spot_instances:
309+
description: Maximum Number of Spot instances.
310+
returned: always
311+
type: str
312+
min_instances:
313+
description: Minimum Instances for the CDE service.
314+
returned: always
315+
type: str
316+
min_spot_instances:
317+
description: Minimum number of spot instances for the CDE service.
318+
returned: always
319+
type: str
320+
root_vol_size:
321+
description: Root Volume Size.
322+
returned: always
323+
type: str
324+
tenantId:
325+
description: CDP tenant ID.
326+
returned: always
327+
type: str
328+
'''
186329

187330
class DEService(CdpModule):
188331
def __init__(self, module):

plugins/modules/de_info.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
type: str
9292
enablingTime:
9393
description: Timestamp of service enabling.
94-
returned: always
94+
returned: always
9595
type: str
9696
environmentName:
9797
description: CDP Environment Name.
@@ -107,7 +107,7 @@
107107
type: str
108108
chartValueOverrides:
109109
description: Status of the CDE Service.
110-
returned: if full service description
110+
returned: if full service description
111111
type: array
112112
elements: complex
113113
contains:
@@ -125,22 +125,22 @@
125125
type: str
126126
cloudPlatform:
127127
description: The cloud platform where the CDE service is enabled.
128-
returned: if full service description
128+
returned: if full service description
129129
type: str
130130
clusterFqdn:
131131
description: FQDN of the CDE service.
132132
returned: if full service description
133133
type: str
134134
creatorCrn:
135-
description: CRN of the creator.
135+
description: CRN of the creator.
136136
returned: if full service description
137137
type: str
138138
dataLakeAtlasUIEndpoint:
139139
description: Endpoint of Data Lake Atlas.E
140140
returned: if full service description
141141
type: str
142142
dataLakeFileSystems:
143-
description: The Data lake file system.
143+
description: The Data lake file system.
144144
returned: if full service description
145145
type: str
146146
environmentCrn:
@@ -194,7 +194,7 @@
194194
returned: always
195195
type: str
196196
tenantId:
197-
description: CDP tenant ID.
197+
description: CDP tenant ID.
198198
returned: if full service description
199199
type: str
200200
'''

0 commit comments

Comments
 (0)