Skip to content

cloudera.cloud - an Ansible collection for Cloudera Data Platform (CDP) for Public and Private Cloud

License

Notifications You must be signed in to change notification settings

cloudera-labs/cloudera.cloud

Repository files navigation

cloudera.cloud - Cloudera Data Platform (CDP) for Public Cloud

API documentation

cloudera.cloud is an Ansible collection that lets you manage your Cloudera Data Platform (CDP) Public Cloud resources. With this collection, you can:

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.

Quickstart

  1. Install the collection
  2. Install the requirements
  3. Use the collection

API

See the API documentation for details for each plugin and role within the collection.

Roadmap

If you want to see what we are working on or have pending, check out:

Are we missing something? Let us know by creating a new issue or posting a new idea!

Contribute

For more information on how to get involved with the cloudera.cloud Ansible collection, head over to CONTRIBUTING.md.

Installation

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.

Option #1: Install from GitHub

Create or edit your requirements.yml file in your project with the following:

collections:
  - name: https://github.com/cloudera-labs/cloudera.cloud.git
    type: git
    version: main

And then run in your project:

ansible-galaxy collection install -r requirements.yml

You can also install the collection directly:

ansible-galaxy collection install git+https://github.com/cloudera-labs/cloudera.cloud.git@main

Option #2: Install the tarball

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

ansible-galaxy collection install <collection-tarball>

See Building the Collection for details on creating a local tarball.

Requirements

cloudera.cloud expects ansible-core>=2.10.

The collection also requires the following Python libraries install to operate its modules:

The collection's Python dependencies alone, not the required Python libraries of its collection dependencies, are in requirements.txt.

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.

See the Collection Metadata section for further details on how to install (and manage) collection dependencies.

You may wish to use a virtual environment to manage the Python dependencies.

Using the Collection

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

For example, here we use the cloudera.cloud.env_info module to list all available CDP environments:

- hosts: localhost
  connection: local
  gather_facts: no
  tasks:
    - name: List all CDP environments
      cloudera.cloud.env_info:
      register: output

    - name: Display the resulting JSON
      ansible.builtin.debug:
        var: output

Important

The CDP modules expect standard CDP authentication configurations, e.g. CDP_PROFILE, as described by the Configuring section of CDP CLI/SDK.

Building the Collection

To create a local collection tarball, run:

ansible-galaxy collection build

Building the API Documentation

To create a local copy of the API documentation, first make sure the collection is in your ANSIBLE_COLLECTIONS_PATHS. Then run the following:

# change into the /docsbuild directory
cd docsbuild

# install the build requirements (antsibull-docs); you may want to set up a
# dedicated virtual environment
pip install ansible-core https://github.com/cloudera-labs/antsibull-docs/archive/cldr-docsite.tar.gz

# Install the collection's build dependencies
pip install -r requirements.txt

# Then run the build script
./build.sh

Your local documentation will be found at docsbuild/build/html.

License and Copyright

Copyright 2023, Cloudera, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

cloudera.cloud - an Ansible collection for Cloudera Data Platform (CDP) for Public and Private Cloud

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages