Skip to content

Commit eef0b24

Browse files
authored
Update README for 5.0.0 (#328)
* Update module APIs for documentation linting errors * Update README for 5.0.0 Signed-off-by: Webster Mudge <wmudge@cloudera.com>
1 parent d8c9eeb commit eef0b24

File tree

8 files changed

+79
-134
lines changed

8 files changed

+79
-134
lines changed

README.md

Lines changed: 48 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
# cloudera.cluster - Cloudera Data Platform (CDP) for Private Cloud and Cloudera Manager (CM)
1+
# cloudera.cluster - Cloudera on premise and Cloudera Manager
22

33
[![API documentation](https://github.com/cloudera-labs/cloudera.cluster/actions/workflows/publish_docs.yml/badge.svg?branch=main&event=push)](https://github.com/cloudera-labs/cloudera.cluster/actions/workflows/publish_docs.yml)
44

5-
`cloudera.cluster` is an Ansible collection that lets you manage your **[Cloudera Data Platform (CDP)](https://www.cloudera.com/products/cloudera-data-platform.html) Private Cloud** resources and interact with Cloudera Manager for both Private Cloud installations and Public Cloud Data Hub deployments. With this collection, you can:
5+
`cloudera.cluster` is an Ansible collection that lets you manage your **[Cloudera Platform](https://www.cloudera.com/products/cloudera-data-platform.html) on premise (Private Cloud)** resources and interact with Cloudera Manager for both on premise installations and cloud Data Hub deployments. With this collection, you can:
66

7-
* Create and manage [Private Cloud](https://www.cloudera.com/products/cloudera-data-platform.html) deployments and Public Cloud [Data Hubs](https://www.cloudera.com/products/data-hub.html), including:
8-
* Manage services like Impala, NiFi, and Ozone
9-
* Configure Cloudera Manager and `cm_agent`-enabled hosts
7+
* Manager clusters, from `base` to `compute`
8+
* Manage services like Impala, NiFi, Ranger, and Ozone
9+
* Configure Cloudera Manager and `cm_agent`-enabled hosts
1010

1111
If you have any questions, want to chat about the collection's capabilities and usage, need help using the collection, or just want to stay updated, join us at our [Discussions](https://github.com/cloudera-labs/cloudera.cluster/discussions).
1212

1313
## Quickstart
1414

15+
See the [API documentation](https://cloudera-labs.github.io/cloudera.cluster/) for details for each plugin and role within the collection.
16+
1517
1. [Install the collection](#installation)
1618
2. [Install the requirements](#requirements)
1719
3. [Use the collection](#using-the-collection)
1820

19-
## API
20-
21-
See the [API documentation](https://cloudera-labs.github.io/cloudera.cluster/) for details for each plugin and role within the collection.
22-
2321
## Roadmap
2422

2523
If you want to see what we are working on or have pending, check out:
@@ -36,12 +34,16 @@ For more information on how to get involved with the `cloudera.cluster` Ansible
3634

3735
## Installation
3836

39-
To install the `cloudera.cluster` collection, you have several options. Please note that we have not yet published this collection to the public Ansible Galaxy server, so you cannot install it via direct namespace, rather you must specify by Git project and (optionally) branch.
37+
To install the `cloudera.cluster` collection, you have several options.
38+
39+
The preferred method is to install via Ansible Galaxy; in your `requirements.yml` file, add the following:
4040

41-
### Option #1: Install from GitHub
41+
```yaml
42+
collections:
43+
- name: cloudera.cluster
44+
```
4245
43-
Create or edit your `requirements.yml` file in your project with the
44-
following:
46+
If you want to install from GitHub, add to your `requirements.yml` file the following:
4547

4648
```yaml
4749
collections:
@@ -59,102 +61,59 @@ ansible-galaxy collection install -r requirements.yml
5961
You can also install the collection directly:
6062

6163
```bash
62-
ansible-galaxy collection install git+https://github.com/cloudera-labs/cloudera.cluster.git@main
64+
# From Ansible Galaxy
65+
ansible-galaxy collection install cloudera.cluster
6366
```
6467

65-
### Option #2: Install the tarball
66-
67-
Periodically, the collection is packaged into a distribution which you can
68-
install directly:
69-
7068
```bash
71-
ansible-galaxy collection install <collection-tarball>
69+
# From GitHub
70+
ansible-galaxy collection install git+https://github.com/cloudera-labs/cloudera.cluster.git@main
7271
```
7372

74-
See [Building the Collection](#building-the-collection) for details on creating a local tarball.
75-
76-
## Requirements
77-
78-
`cloudera.cluster` expects `ansible-core>=2.10,<2.13`.
79-
80-
> [!WARNING]
81-
> The current `import_template` functionality does not yet work with Ansible version `2.13` and later.
82-
83-
The collection has the following _required_ dependencies:
84-
85-
| Name | Type | Version |
86-
|------|------|---------|
87-
| `ansible.posix` | collection | `1.3.0` |
88-
| `community.crypto` | collection | `2.2.1` |
89-
| `community.general` | collection | `4.5.0` |
90-
91-
There are a number of _optional_ dependencies for the collection:
92-
93-
| Name | Type | Version |
94-
|------|------|---------|
95-
| `community.mysql` | collection | `3.1.0` |
96-
| `community.postgresql` | collection | `1.6.1` |
97-
| `freeipa.ansible_freeipa` | collection | `1.11.1` |
98-
| `geerlingguy.postgresql` | role | `2.2.0` |
99-
| `geerlingguy.mysql` (patched) | role | `master` |
100-
101-
The collection also requires the following Python libraries to operate its modules:
102-
103-
* [jmespath](https://jmespath.org/)
104-
* [cm_client](https://cloudera.github.io/cm_api/docs/python-client-swagger/)
105-
106-
The collection's Python dependencies alone, _not_ the required Python libraries of its collection dependencies, are in `requirements.txt`.
107-
108-
All collection dependencies, required and optional, can be found in `requirements.yml`; only the _required_ dependencies are in `galaxy.yml`. `ansible-galaxy` will install only the _required_ collection dependencies; you will need to add the _optional_ collection dependencies as needed (see above).
109-
11073
`ansible-builder` can discover and install all Python dependencies - current collection and dependencies - if you wish to use that application to construct your environment. Otherwise, you will need to read each collection and role dependency and follow its installation instructions.
11174

11275
See the [Collection Metadata](https://ansible.readthedocs.io/projects/builder/en/latest/collection_metadata/) section for further details on how to install (and manage) collection dependencies.
11376

11477
You may wish to use a _virtual environment_ to manage the Python dependencies.
11578

116-
See the `base` *Execution Environment* configuration in [`cloudera-labs/cldr-runner`](https://github.com/cloudera-labs/cldr-runner) as an example of how you can install the optional dependencies to suit your specific needs.
117-
11879
## Using the Collection
11980

120-
This collection is designed to work hand-in-hand with the [`cloudera-deploy` application](https://github.com/cloudera-labs/cloudera-deploy), which uses reference playbooks from the [`cloudera.exe` collection](https://github.com/cloudera-labs/cloudera.exe) and example definitions. Coming releases will decouple these collections further while maintaining backwards compatibility.
81+
This collection is designed to interact with only the Cloudera Manager endpoint -- on cloud and on premise. It is decidedly _non-opinionated_ -- that is, these roles and plugins do not make any assumptions about supporting resources and configurations.
12182

122-
Once installed, reference the collection in your playbooks and roles.
83+
Once installed, reference the collection in playbooks and roles.
12384

12485
For example, here we use the
125-
[`cloudera.cluster.cm_resource` module](https://cloudera-labs.github.io/cloudera.cluster/cm_resource_module.html) to patch the Hue service with updated Knox proxy hosts:
86+
[`cloudera.cluster.service` module](https://cloudera-labs.github.io/cloudera.cluster/service_module.html) to manage the HDFS service for a base cluster, specifically the _service-wide_ configurations and 3 _role configuration groups_:
12687

12788
```yaml
12889
- hosts: localhost
12990
connection: local
13091
gather_facts: no
131-
vars:
132-
cm_api: "{{ lookup('ansible.builtin.env', 'CM_API') }}"
133-
user: "{{ lookup('ansible.builtin.env', 'CM_USERNAME') }}"
134-
pwd: "{{ lookup('ansible.builtin.env', 'CM_PASSWORD') }}"
135-
cluster: "my-cluster"
13692
tasks:
137-
- name: Update Hue SSO (Knox Proxies)
138-
cloudera.cluster.cm_resource:
139-
url: "{{ cm_api }}"
140-
username: "{{ user }}"
141-
password: "{{ pwd }}"
142-
path: "v51/clusters/{{ cluster }}/services/hue/config"
143-
method: PUT
144-
parameters:
145-
message: "Patch Knox proxy hosts for Hue (Ansible)"
146-
body:
147-
items:
148-
- name: knox_proxyhosts
149-
value: "{{ ['master1', 'master2', 'master3'] | join(',') }}"
150-
```
151-
152-
## Building the Collection
153-
154-
To create a local collection tarball, run:
155-
156-
```bash
157-
ansible-galaxy collection build
93+
- name: Establish HDFS service
94+
cloudera.cluster.service:
95+
host: "cm.example.internal"
96+
port: 80
97+
username: admin
98+
password: "{{ admin_password }}"
99+
cluster: my-base-cluster
100+
name: my-hdfs
101+
type: HDFS
102+
config:
103+
dfs_encrypt_data_transfer_algorithm: AES/CTR/NoPadding
104+
hadoop_secure_web_ui: true
105+
core_connector: "my-cluster-core-settings-name"
106+
role_config_groups:
107+
- type: DATANODE
108+
config:
109+
dfs_data_dir_list: "/dfs/dn"
110+
- type: NAMENODE
111+
config:
112+
dfs_name_dir_list: "/dfs/nn"
113+
- type: SECONDARYNAMENODE
114+
config:
115+
fs_checkpoint_dir_list: "/dfs/snn"
116+
register: __hdfs
158117
```
159118

160119
## Building the API Documentation
@@ -178,11 +137,10 @@ hatch run docs:lint
178137
To prepare a version release, first set the following variables for `antsichaut`:
179138

180139
```bash
181-
export GITHUB_REPOSITORY=cloudera-labs/cloudera.cluster
182-
export GITHUB_TOKEN=some_gh_token_value
140+
export GITHUB_TOKEN=some_gh_token_value # Read-only scope
183141
```
184142

185-
Update the collection version using [`hatch version`](https://hatch.pypa.io/latest/version/). For example, to increment to the next minor release:
143+
Update the collection version using [`hatch version`](https://hatch.pypa.io/latest/version/). For example, to increment to the next _minor_ release:
186144

187145
```bash
188146
hatch version minor
@@ -196,50 +154,6 @@ hatch run docs:changelog
196154

197155
You can then examine (and update if needed) the resulting `changelog.yaml` and `CHANGELOG.rst` files before committing to the release branch.
198156

199-
## Tested Platforms
200-
201-
Active development is focused on **CDP Private Cloud** deployments and their respective platform compatibility matrices.
202-
203-
> [!NOTE]
204-
> While the collection's plugins and roles can be used to deploy CDH 5.x and CDH 6.x environments, it is only possible to install a subset of their supported platform components (i.e JDK and database versions) using this tooling.
205-
206-
### Cloudera Distributions
207-
208-
- Cloudera Manager / CDP Private Cloud Base 7.1.x
209-
- Cloudera Manager / CDP Private Cloud Base 7.0.3 (limited support)
210-
- Cloudera Manager / CDH 6.x
211-
- Cloudera Manager / CDH 5.x (limited support)
212-
213-
### Operating Systems
214-
215-
- Red Hat / CentOS 7.x
216-
- Red Hat / CentOS 8.x
217-
- Ubuntu 18.04 LTS (Bionic Beaver)
218-
- Ubuntu 20.04 LTS (Focal Fossa)
219-
220-
## Operational Features
221-
222-
> [!WARNING]
223-
> These operational features are deprecated as of version 4.x. If you want to use or build similar features and functions, head over to the [Discussions](https://github.com/cloudera-labs/cloudera.cluster/discussions) to learn more about using the collection to achieve your platform operations needs.
224-
225-
This collection includes support for:
226-
227-
- Upgrading Cloudera Manager Server and Cloudera Manager Agents
228-
- Upgrading CDH 5 and/or CDH6 to CDP Private Cloud Base
229-
- Refreshing the config for running clusters, including adding new services or updating the config of existing services.
230-
231-
These features are potentially very dangerous and can cause damage to running clusters if used incorrectly. If you plan to use these features, please ensure that you test thoroughly on a disposable environment.
232-
233-
Cloudera recommends that Cloudera Professional Services be engaged before using these features, particularly as none of these operational features are covered under Cloudera Support agreements.
234-
235-
In order to use these capabilities you will need some permutation of the following variables:
236-
- `cloudera_runtime_pre_upgrade` (specify the version of the legacy cluster - e.g. 5.16.2)
237-
- `update_services` (true if you want to update the config of existing services)
238-
- `upgrade_kts_cluster` (true to upgrade a kts cluster)
239-
- `activate_runtime_upgrade` (true to do a patch release activation)
240-
- `cdh_cdp_upgrade` (true to do a CDH to CDP upgrade)
241-
- `upgrade_runtime` (true to upgrade between versions of CDH or CDP)
242-
243157
## License and Copyright
244158

245159
Copyright 2025, Cloudera, Inc.

plugins/modules/cm_autotls_info.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
attributes:
3333
check_mode:
3434
support: full
35+
diff_mode:
36+
support: full
37+
platform:
38+
platforms: all
3539
notes:
3640
- This is a convenience module to retrieve Auto-TLS settings from the Cloudera Manager configuration.
3741
- Using the C(cm_config_info) module will return similar settings.

plugins/modules/cm_kerberos_info.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
attributes:
3333
check_mode:
3434
support: full
35+
diff_mode:
36+
support: full
37+
platform:
38+
platforms: all
3539
notes:
3640
- This is a convenience module to retrieve Kerberos settings from the Cloudera Manager configuration.
3741
- Using the C(cm_config_info) module will return similar settings.

plugins/modules/cm_service_info.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
- cloudera.cluster.cm_options
2929
- cloudera.cluster.cm_endpoint
3030
- ansible.builtin.action_common_attributes
31+
attributes:
32+
check_mode:
33+
support: full
34+
diff_mode:
35+
support: full
36+
platform:
37+
platforms: all
3138
requirements:
3239
- cm-client
3340
seealso:

plugins/modules/cm_service_role_config_group_info.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
attributes:
3838
check_mode:
3939
support: full
40+
diff_mode:
41+
support: full
42+
platform:
43+
platforms: all
4044
requirements:
4145
- cm-client
4246
seealso:

plugins/modules/cm_service_role_info.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
attributes:
3838
check_mode:
3939
support: full
40+
diff_mode:
41+
support: full
42+
platform:
43+
platforms: all
4044
requirements:
4145
- cm-client
4246
seealso:

plugins/modules/external_account_info.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
attributes:
4949
check_mode:
5050
support: full
51+
diff_mode:
52+
support: full
53+
platform:
54+
platforms: all
5155
requirements:
5256
- cm-client
5357
"""

plugins/modules/role_config_group_info.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
attributes:
6363
check_mode:
6464
support: full
65+
diff_mode:
66+
support: full
67+
platform:
68+
platforms: all
6569
requirements:
6670
- cm-client
6771
seealso:

0 commit comments

Comments
 (0)