cloudera.cluster.control_plane module – Manage Cloudera control planes

Note

This module is part of the cloudera.cluster collection (version 5.0.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install cloudera.cluster. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cloudera.cluster.control_plane.

New in cloudera.cluster 5.0.0

Synopsis

  • Manage the lifecycle and state of control planes in Cloudera on-premise deployments.

  • Install, uninstall, and manage both normal and K8s embedded control planes.

  • Check for existing control planes and handle idempotency.

Requirements

The below requirements are needed on the host that executes this module.

  • cm-client

Parameters

Parameter

Comments

agent_header

aliases: user_agent

string

Set the HTTP user agent header when interacting with the CM API endpoint.

Default: "ClouderaFoundry"

control_plane_config

aliases: values_yaml

dictionary

The content of the values YAML used to configure the control plane.

Required when state=present.

datalake_cluster_name

string

The name of the datalake base cluster associated with the control plane.

Required when creating state=present for embedded control plane type=embedded.

debug

aliases: debug_endpoints

boolean

Capture the HTTP interaction logs with the CM API endpoint.

Choices:

  • false ← (default)

  • true

delay

aliases: polling_interval

integer

Delay (interval), in seconds, between check for control plane commandstatus check.

Default: 15

features

aliases: selected_features

list / elements=string

The list of features to enable in the control plane.

Only used during creation state=present of embedded control planes type=embedded.

force_tls

boolean

Flag to force TLS during CM API endpoint discovery.

If False, discovery will first try HTTP and follow any redirects.

Choices:

  • false ← (default)

  • true

host

aliases: hostname

string

Hostname of the CM API endpoint.

If set, the host parameter will trigger CM API endpoint discovery, which will follow redirects.

Mutually exclusive with url.

kubeconfig

string

The content of the kubeconfig file of the kubernetes environment on which the install will be performed.

Required for external control planes, type=external.

kubernetes_type

aliases: external_k8s_type

string

The Kubernetes type on which the control plane should run.

Required for external control planes, type=external.

name

aliases: containerized_cluster_name, control_plane_name

string

The name of the Experience Cluster associated with the control plane.

Required for type=embedded control planes.

namespace

string

The Kubernetes namespace where the control plane should be installed.

Required for external control planes, type=external.

override

boolean

Flag to specify if the control plane installation override existing configurations.

Only used during creation state=present of external control planes type=external.

Choices:

  • false

  • true

password

string / required

Password for access to the CM API endpoint.

This parameter is set to no_log.

port

integer

Port of the CM API endpoint.

If set, CM API endpoint discovery will connect to the designated port first and will follow redirects.

Default: 7180

proxy_server

aliases: proxy, http_proxy

string

Set the HTTP/S proxy server when interacting with the CM API endpoint.

remote_repo_url

string

The URL of the remote repository where the artifacts used to install the control plane are hosted.

Required when state=present

ssl_ca_cert

aliases: tls_cert, ssl_cert

path

Path to SSL CA certificate to use for validation.

state

string

The desired state of the control plane.

If state=present, the control plane will be installed if it does not exist.

If state=absent, the control plane will be uninstalled if it exists.

Choices:

  • "present" ← (default)

  • "absent"

type

string / required

The type of control plane to manage.

external for external control plane installation.

embedded for embedded control plane installation.

Choices:

  • "external"

  • "embedded"

url

aliases: endpoint, cm_endpoint_url

string

The CM API endpoint URL and should include scheme, host, port, and API root path.

Mutually exclusive with host.

username

aliases: user

string / required

Username for access to the CM API endpoint.

verify_tls

boolean

Verify the TLS certificates for the CM API endpoint.

Choices:

  • false

  • true ← (default)

version

aliases: api_version

string

API version of the CM API endpoint.

Default: "True"

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped.

diff_mode

Support: full

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode

platform

Platforms: all

Target OS/families that can be operated against

Notes

Note

  • Removing an embedded control plane is not possible with this module.

  • Instead use the cloudera.cluster.cluster module to remove embedded control planes.

See Also

See also

cloudera.cluster.control_plane_info

Retrieve information about control planes.

cloudera.cluster.cluster

Manage the lifecycle and state of a cluster.

Examples

- name: Install a external control plane
  cloudera.cluster.control_plane:
    host: "example.cloudera.host"
    username: "admin"
    password: "admin_password"
    state: present
    type: external
    namespace: "example-namespace"
    remote_repo_url: "https://archive.cloudera.com/p/cdp-pvc-ds/1.5.5-h1"
    kubernetes_type: "openshift"
    kubeconfig: "{{ lookup('ansible.builtin.file', 'kubeconfig.yml') }}"
    control_plane_config:
      ContainerInfo:
        Mode: public
        CopyDocker: false
      Database:
        Mode: embedded
        EmbeddedDbStorage: 200
      Vault:
        Mode: embedded
        EmbeddedDbStorage: 20

- name: Install an embedded control plane
  cloudera.cluster.control_plane:
    host: "example.cloudera.host"
    username: "admin"
    password: "admin_password"
    state: present
    name: "example-embedded-cp"
    type: embedded
    datalake_cluster_name: "example-base-cluster"
    remote_repo_url: "https://archive.cloudera.com/p/cdp-pvc-ds/1.5.5-h1"
    control_plane_config:
      ContainerInfo:
        Mode: public
        CopyDocker: false
      Database:
        Mode: embedded
        EmbeddedDbStorage: 200
      Vault:
        Mode: embedded
        EmbeddedDbStorage: 20

- name: Uninstall a control plane
  cloudera.cluster.control_plane:
    host: "example.cloudera.host"
    username: "admin"
    password: "admin_password"
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

control_plane

dictionary

Details about the control plane.

Returned: always

kubernetes_type

string

The Kubernetes type on which the control plane is running.

Returned: when available

namespace

string

The Kubernetes namespace where the control plane is installed.

Returned: when available

remote_repo_url

string

The URL of the remote repository.

Returned: when available

tags

list / elements=dictionary

Tags associated with the control plane.

Returned: when available

uuid

string

The universally unique ID of this control plane.

Returned: when available

version

string

The CDP version of the control plane.

Returned: when available

Authors

  • Jim Enright (@jimright)