Skip to content

Commit 95bd084

Browse files
authored
Configure documentation toolchain and update for v2.0.0 (#109)
* Add initial antsibull-docs configuration and remove obsolete docs. * Update verify_tls to verify_endpoint_tls to avoid naming conflicts * Move cdp_service to module_utils * Update imports and remove invalid documentation entries * Add datalake_instance lookup plugin * Update documentation based on antsibull-docs linting * Add workflow to build docs via antsibull-docs * Move docs construction to separate workflow * Update antsibull-docs to use a hosted version to address page construction and formatting * Update theme options for topbar links, VCS page view, last update footer * Fix unprefixed module reference * Configure antsibull-docs logging * Update bug and feature buttons, remove comms * Update example extra docs * Remove envvar_directives * Add log file artifact * Fix input parameter types * Add workflow for linting docs for PR submissions * Update to use working-directory * Add always() for antsibull-log-upload conditional * Add parameters for namespace.name * Convert to use shared workflow built with Ansible Community actions * Add antsibull-docs repo and version for install * Remove obsolete Python requirements * Update to use common reusable workflows * Comment out additional API docs sections * Update README for API and installation instructions * Add pointer for building a local tarball of the collection * Remove unused example documentation * Update top links to point at Cloudera.com sites * Split out contribute guidance into a separate file * Update the collection metadata to remove authors at this level * Update the README with a preamble, roadmap, and revamp contribution section * Update formatting * Update backlog docs and query * Format galaxy.yml for consistency * Add note about ansible-builder and adjust some formatting * Update branching instructions for clarity * Clarify the use of ansible-builder for Python dependencies * Update copyright date * Clarify ansible-builder operations and Python dependencies * Add note about Collection Metadata usage and update callout formatting * Update to use the public TF quickstart module Signed-off-by: Webster Mudge <wmudge@cloudera.com>
1 parent 426beba commit 95bd084

File tree

293 files changed

+901
-86127
lines changed

Some content is hidden

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

293 files changed

+901
-86127
lines changed

.github/workflows/publish_docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
3+
name: Publish documentation
4+
5+
on:
6+
push:
7+
branches:
8+
- 'main'
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-ansible-docs:
14+
name: Build Ansible Docs
15+
uses: cloudera-labs/github-actions/.github/workflows/construct-ansible-docs.yml@v1
16+
with:
17+
pages-upload: true
18+
directory-upload: true
19+
antsibull-log-upload: true
20+
21+
publish-ansible-docs:
22+
name: Publish Ansible Docs
23+
needs: build-ansible-docs
24+
runs-on: ubuntu-latest
25+
permissions:
26+
pages: write
27+
id-token: write
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
steps:
32+
- name: Deploy Github Pages
33+
id: deployment
34+
uses: actions/deploy-pages@v2
35+
with:
36+
artifact_name: github-pages
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
3+
name: Validate Pull Request documentation
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- 'release/**'
9+
- 'devel'
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
validate-docs:
15+
name: Validate Ansible Docs
16+
uses: cloudera-labs/github-actions/.github/workflows/lint-ansible-docs.yml@v1
17+
with:
18+
antsibull-log-upload: true
19+
collection-namespace: cloudera
20+
collection-name: cloud

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ tests/integration/inventory
2525
# Ignore Terraform builds
2626
tests/integration/**/.terraform*
2727
tests/integration/**/terraform.tfstate*
28+
tests/integration/**/terraform.tfvars
2829

2930
# Remove the Sphinx build directory
3031
site/_build

CONTRIBUTING.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Contributing to cloudera.cloud
2+
3+
Thank you for considering contributions to the `cloudera.cloud` Ansible collection!
4+
5+
## Submitting a pull request
6+
7+
You can start work on issues that are not yet part of a [Milestone](https://github.com/cloudera-labs/cloudera.cloud/milestones) -- anything in our issue tracker that isn't assigned to a Milestone is considered the [backlog](https://github.com/cloudera-labs/cloudera.cloud/issues?q=is%3Aopen+is%3Aissue+no%3Amilestone).
8+
9+
Before you start working, please announce that you want to do so by commenting on the issue. _([Create an issue](https://github.com/cloudera-labs/cloudera.cloud/issues/new?labels=enhancement) if there isn't one yet, and you can also check out our [Discussions](https://github.com/cloudera-labs/cloudera.cloud/discussions) for ideas.)_ We try to ensure that all active work is assigned to a Milestone in order to keep our backlog accurate.
10+
11+
**When your work is ready for review, create a branch in your own forked repository from the `devel` branch and submit a pull request against `devel`, referencing your the issue.**
12+
13+
As a _best practice_, you can prefix your branches with:
14+
15+
|prefix|Description|Example|
16+
|------|-----------|-------|
17+
|`feature/`|A new feature or changes existing to existing code or documentation|`feature/update-this-modules-params`|
18+
|`fix/`|A non-urgent bug fix|`fix/refactor-module-output-params`|
19+
|`hotfix/`|An urgent bug fix|`hotfix/patch-insecure-module`|
20+
21+
> [!NOTE]
22+
> :fire_extinguisher: A **hotfix** should branch from `main`. It will then be committed to both the `main` and `devel` branches.
23+
24+
## Signing your commits
25+
26+
Note that we require signed commits inline with [Developer Certificate of Origin](https://developercertificate.org/) best-practices for open source collaboration.
27+
28+
A signed commit is a simple one-liner at the end of your commit message that states that you wrote the patch or otherwise have the right to pass the change into open source. Signing your commits means you agree to:
29+
30+
```
31+
Developer Certificate of Origin
32+
Version 1.1
33+
34+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
35+
660 York Street, Suite 102,
36+
San Francisco, CA 94110 USA
37+
38+
Everyone is permitted to copy and distribute verbatim copies of this
39+
license document, but changing it is not allowed.
40+
41+
42+
Developer's Certificate of Origin 1.1
43+
44+
By making a contribution to this project, I certify that:
45+
46+
(a) The contribution was created in whole or in part by me and I
47+
have the right to submit it under the open source license
48+
indicated in the file; or
49+
50+
(b) The contribution is based upon previous work that, to the best
51+
of my knowledge, is covered under an appropriate open source
52+
license and I have the right under that license to submit that
53+
work with modifications, whether created in whole or in part
54+
by me, under the same open source license (unless I am
55+
permitted to submit under a different license), as indicated
56+
in the file; or
57+
58+
(c) The contribution was provided directly to me by some other
59+
person who certified (a), (b) or (c) and I have not modified
60+
it.
61+
62+
(d) I understand and agree that this project and the contribution
63+
are public and that a record of the contribution (including all
64+
personal information I submit with it, including my sign-off) is
65+
maintained indefinitely and may be redistributed consistent with
66+
this project or the open source license(s) involved.
67+
```
68+
69+
(See [developercertificate.org](https://developercertificate.org/))
70+
71+
To agree, make sure to add line at the end of every git commit message, like this:
72+
73+
```
74+
Signed-off-by: John Doe <jdoe@example.com>
75+
```
76+
77+
> [!NOTE]
78+
> :rocket: Add the sign-off automatically when creating the commit via the `-s` flag, e.g. `git commit -s`.
79+
80+
## Still have questions? Opinions? Comments?
81+
82+
Come find us on our [Discussions](https://github.com/cloudera-labs/cloudera.cloud/discussions)!

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2021 Cloudera, Inc.
189+
Copyright 2023 Cloudera, Inc.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 85 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,52 @@
1-
# cloudera.cloud - Cloudera Data Platform (CDP) for Public and Private Cloud
1+
# cloudera.cloud - Cloudera Data Platform (CDP) for Public Cloud
22

3-
Readme last updated: 2021-05-25
3+
[![API documentation](https://github.com/cloudera-labs/cloudera.cloud/actions/workflows/publish_docs.yml/badge.svg?branch=main&event=push)](https://github.com/cloudera-labs/cloudera.cloud/actions/workflows/publish_docs.yml)
44

5-
# Quickstart
5+
`cloudera.cloud` is an Ansible collection that lets you manage your **[Cloudera Data Platform (CDP)](https://www.cloudera.com/products/cloudera-data-platform.html) Public Cloud** resources. With this collection, you can:
6+
7+
* Create and manage [Datalakes](https://www.cloudera.com/products/open-data-lakehouse.html) and Environments.
8+
* Manage Users and Groups.
9+
* Create and manage [Data Hubs](https://www.cloudera.com/products/data-hub.html) and Data Services, such as:
10+
* [Cloudera Data Flow (CDF)](https://www.cloudera.com/products/dataflow.html)
11+
* [Cloudera Data Engineering (CDE)](https://www.cloudera.com/products/data-engineering.html)
12+
* [Cloudera Data Warehouse (CDW)](https://www.cloudera.com/products/data-warehouse.html)
13+
* [Cloudera Machine Learning (CML)](https://www.cloudera.com/products/machine-learning.html)
14+
* [Cloudera Operational Database](https://www.cloudera.com/products/operational-db.html)
15+
* [Cloudera Stream Processing (CSP)](https://www.cloudera.com/products/stream-processing.html)
16+
17+
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.cloud/discussions).
18+
19+
## Quickstart
620

721
1. [Install the collection](#installation)
822
2. [Install the requirements](#requirements)
923
3. [Use the collection](#using-the-collection)
1024

11-
# API
25+
## API
26+
27+
See the [API documentation](https://cloudera-labs.github.io/cloudera.cloud/) for details for each plugin and role within the collection.
28+
29+
## Roadmap
30+
31+
If you want to see what we are working on or have pending, check out:
32+
33+
* the [Milestones](https://github.com/cloudera-labs/cloudera.cloud/milestones) and [active issues](https://github.com/cloudera-labs/cloudera.cloud/issues?q=is%3Aissue+is%3Aopen+milestone%3A*) to see our current activity,
34+
* the [issue backlog](https://github.com/cloudera-labs/cloudera.cloud/issues?q=is%3Aopen+is%3Aissue+no%3Amilestone) to see what work is pending or under consideration, and
35+
* read up on the [Ideas](https://github.com/cloudera-labs/cloudera.cloud/discussions/categories/ideas) we have in mind.
36+
37+
Are we missing something? Let us know by [creating a new issue](https://github.com/cloudera-labs/cloudera.cloud/issues/new) or [posting a new idea](https://github.com/cloudera-labs/cloudera.cloud/discussions/new?category=ideas)!
1238

13-
See the [API documentation](https://cloudera-labs.github.io/cloudera.cloud/) for details for each module within the collection.
39+
## Contribute
1440

15-
# Installation
41+
For more information on how to get involved with the `cloudera.cloud` Ansible collection, head over to [CONTRIBUTING.md](CONTRIBUTING.md).
1642

17-
To install the `cloudera.cloud` collection, you have several options. Please
18-
note that to date, we have not yet published this collection to the public
19-
Galaxy server, so you cannot install it via direct namespace, rather you must
20-
specify a Git project and (optionally) branch.
43+
## Installation
2144

22-
## Option #1: Install from GitHub
45+
To install the `cloudera.cloud` 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.
2346

24-
Create or edit the `collections/requirements.yml` file in your project with the
47+
### Option #1: Install from GitHub
48+
49+
Create or edit your `requirements.yml` file in your project with the
2550
following:
2651

2752
```yaml
@@ -34,90 +59,97 @@ collections:
3459
And then run in your project:
3560
3661
```bash
37-
ansible-galaxy collection install -r collections/requirements.yml
62+
ansible-galaxy collection install -r requirements.yml
63+
```
64+
65+
You can also install the collection directly:
66+
67+
```bash
68+
ansible-galaxy collection install git+https://github.com/cloudera-labs/cloudera.cloud.git@main
3869
```
3970

40-
## Option #2: Install the tarball
71+
### Option #2: Install the tarball
4172

4273
Periodically, the collection is packaged into a distribution which you can
4374
install directly:
4475

4576
```bash
46-
ansible-galaxy collection install <collection-tarball> -p collections/
77+
ansible-galaxy collection install <collection-tarball>
4778
```
4879

49-
# Requirements
80+
See [Building the Collection](#building-the-collection) for details on creating a local tarball.
5081

51-
`cloudera.cloud` expects Ansible Base/Core `2.10.0` or higher.
82+
## Requirements
5283

53-
The collection also requires the following Python libraries install to operate
54-
its modules:
84+
`cloudera.cloud` expects `ansible-core>=2.10`.
5585

56-
```pip
57-
cdpy # Located on Cloudera Labs
58-
```
86+
The collection also requires the following Python libraries install to operate its modules:
5987

60-
The [`requirements.txt`](./requirements.txt) file declares these libraries. You
61-
can install them via `pip`:
88+
* [`cdpy`](https://github.com/cloudera-labs/cdpy)
6289

63-
```bash
64-
pip install -r requirements.txt
65-
```
90+
The collection's Python dependencies alone, _not_ the required Python libraries of its collection dependencies, are in `requirements.txt`.
6691

67-
# Using the Collection
92+
`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.
93+
94+
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.
95+
96+
You may wish to use a _virtual environment_ to manage the Python dependencies.
97+
98+
## Using the Collection
6899

69100
Once installed, reference the collection in your playbooks and roles.
70101

71102
For example, here we use the
72-
[cloudera.cloud.env_info module](./plugins/modules/env_info.py) to list all
73-
available CDP environments:
103+
[`cloudera.cloud.env_info` module](https://cloudera-labs.github.io/cloudera.cloud/env_info_module.html) to list all available CDP environments:
74104

75105
```yaml
76-
---
77-
78106
- hosts: localhost
79107
connection: local
80108
gather_facts: no
81-
82-
collections:
83-
- cloudera.cloud
84-
85109
tasks:
86110
- name: List all CDP environments
87-
env_info:
111+
cloudera.cloud.env_info:
88112
register: output
89113

90114
- name: Display the resulting JSON
91-
debug:
115+
ansible.builtin.debug:
92116
var: output
93117
```
118+
> [!IMPORTANT]
119+
> The CDP modules expect standard CDP authentication configurations, e.g. `CDP_PROFILE`, as described by the *Configuring* section of [CDP CLI/SDK](https://github.com/cloudera/cdpcli#configuring).
94120

95-
> **NOTE:** The CDP modules expect standard CDP authentication configurations,
96-
e.g. `CDP_PROFILE`, as described by the *Configuring* section of
97-
[CDP CLI/SDK](https://github.com/cloudera/cdpcli#configuring).
98-
99-
## Available Modules
100-
101-
See the [README](./plugins/README.md) in the `plugins` directory.
102-
103-
# Building the Collection
121+
## Building the Collection
104122

105123
To create a local collection tarball, run:
106124

107125
```bash
108126
ansible-galaxy collection build
109127
```
110128

111-
For the site documentation, please see the
112-
[BUILDING DOCS](./site/BUILDING_DOCS.md) instructions.
129+
## Building the API Documentation
130+
131+
To create a local copy of the API documentation, first make sure the collection is in your `ANSIBLE_COLLECTIONS_PATHS`. Then run the following:
132+
133+
```bash
134+
# change into the /docsbuild directory
135+
cd docsbuild
113136
114-
# Getting Involved
137+
# install the build requirements (antsibull-docs); you may want to set up a
138+
# dedicated virtual environment
139+
pip install ansible-core https://github.com/cloudera-labs/antsibull-docs/archive/cldr-docsite.tar.gz
140+
141+
# Install the collection's build dependencies
142+
pip install requirements.txt
143+
144+
# Then run the build script
145+
./build.sh
146+
```
115147

116-
Contribution instructions are coming soon!
148+
Your local documentation will be found at `docsbuild/build/html`.
117149

118-
# License and Copyright
150+
## License and Copyright
119151

120-
Copyright 2021, Cloudera, Inc.
152+
Copyright 2023, Cloudera, Inc.
121153

122154
```
123155
Licensed under the Apache License, Version 2.0 (the "License");

docs/.buildinfo

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)