cloudera.cloud.df_service module – Enable or Disable CDP DataFlow Services

Note

This module is part of the cloudera.cloud collection (version 2.5.1).

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.cloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cloudera.cloud.df_service.

Synopsis

  • Enable or Disable CDP DataFlow Services

Requirements

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

  • cdpy

  • jmespath

Parameters

Parameter

Comments

cdp_region

aliases: cdp_endpoint_region, endpoint_region

string

Specify the Cloudera Data Platform endpoint region.

Default: "default"

cluster_subnets

list / elements=string

Subnet ids that will be assigned to the Kubernetes cluster

Mutually exclusive with the cluster_subnets_filter option

cluster_subnets_filter

string

JMESPath expression to filter the subnets to be used for the Kubernetes cluster

The expression will be applied to the full list of subnets for the specified environment

Each subnet in the list is an object with the following attributes: subnetId, subnetName, availabilityZone, cidr

The filter expression must only filter the list, but not apply any attribute projection

Mutually exclusive with the cluster_subnets option.

debug

aliases: debug_endpoints

boolean

Capture the CDP SDK debug log.

Choices:

  • false ← (default)

  • true

delay

aliases: polling_delay

integer

The internal polling interval (in seconds) while the module waits for the Dataflow Service to achieve the declared state.

Default: 15

df_crn

string

The CRN of the DataFlow Service, if available

Required when state=absent

env_crn

aliases: name

string

The CRN of the CDP Environment to host the Dataflow Service

The environment name can also be provided, instead of the CRN

Required when state=present

force

aliases: force_delete

boolean

Flag to indicate if the DataFlow deletion should be forced.

Choices:

  • false

  • true

k8s_ip_ranges

list / elements=string

The IP ranges authorized to connect to the Kubernetes API server

loadbalancer_ip_ranges

list / elements=string

The IP ranges authorized to connect to the load balancer

loadbalancer_subnets

list / elements=string

Subnet ids that will be assigned to the load balancer

Mutually exclusive with the loadbalancer_subnets_filter option

loadbalancer_subnets_filter

string

JMESPath expression to filter the subnets to be used for the load balancer

The expression will be applied to the full list of subnets for the specified environment

Each subnet in the list is an object with the following attributes: subnetId, subnetName, availabilityZone, cidr

The filter expression must only filter the list, but not apply any attribute projection

Mutually exclusive with the loadbalancer_subnets option.

nodes_max

aliases: max_k8s_node_count

integer

The maximum number of kubernetes nodes that environment may scale up under high-demand situations.

Default: 3

nodes_min

aliases: min_k8s_node_count

integer

The minimum number of kubernetes nodes needed for the environment. Note that the lowest minimum is 3 nodes.

Default: 3

persist

boolean

Whether or not to retain the database records of related entities during removal.

Choices:

  • false ← (default)

  • true

private_cluster

aliases: enable_private_cluster

boolean

Flag to specify if a private K8s cluster should be created.

Choices:

  • false ← (default)

  • true

profile

string

If provided, the CDP SDK will use this value as its profile.

public_loadbalancer

aliases: use_public_load_balancer

boolean

Indicates whether or not to use a public load balancer when deploying dependencies stack.

Choices:

  • false

  • true

state

string

The declarative state of the Dataflow Service

Choices:

  • "present" ← (default)

  • "absent"

tags

dictionary

Tags to apply to the DataFlow Service

terminate

boolean

Whether or not to terminate all deployments associated with this DataFlow service

Choices:

  • false ← (default)

  • true

timeout

aliases: polling_timeout

integer

The internal polling timeout (in seconds) while the module waits for the Dataflow Service to achieve the declared state.

Default: 3600

verify_endpoint_tls

aliases: endpoint_tls

boolean

Verify the TLS certificates for the CDP endpoint.

Choices:

  • false

  • true ← (default)

wait

boolean

Flag to enable internal polling to wait for the Dataflow Service to achieve the declared state.

If set to FALSE, the module will return immediately.

Choices:

  • false

  • true ← (default)

Notes

Note

  • This feature this module is for is in Technical Preview

Examples

# Note: These examples do not set authentication details.

# Create a Dataflow Service
- cloudera.cloud.df_service:
    name: my-service
    nodes_min: 3
    nodes_max: 10
    public_loadbalancer: True
    cluster_subnets_filter: "[?contains(subnetName, 'pvt')]"
    loadbalancer_subnets_filter: "[?contains(subnetName, 'pub')]"
    k8s_ip_ranges: ['192.168.0.1/24']
    state: present
    wait: yes

# Remove a Dataflow Service with Async wait
- cloudera.cloud.df_service:
    name: my-service
    persist: False
    state: absent
    wait: yes
  async: 3600
  poll: 0
  register: __my_teardown_request

Return Values

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

Key

Description

sdk_out

string

Returns the captured CDP SDK log.

Returned: when supported

sdk_out_lines

list / elements=string

Returns a list of each line of the captured CDP SDK log.

Returned: when supported

services

list / elements=complex

The information about the named DataFlow Service or DataFlow Services

Returned: always

activeErrorAlertCount

integer

Current count of active alerts classified as an error.

Returned: always

activeWarningAlertCount

integer

Current count of active alerts classified as a warning.

Returned: always

authorizedIpRanges

list / elements=string

The authorized IP Ranges.

Returned: always

cloudPlatform

string

The cloud platform of the environment.

Returned: always

clusterId

string

Cluster id of the environment.

Returned: if enabled

crn

string

The DataFlow Service’s parent environment CRN.

Returned: always

deploymentCount

string

The deployment count.

Returned: always

dfLocalUrl

string

The URL of the environment local DataFlow application.

Returned: always

instanceType

string

The instance type of the kubernetes nodes currently in use by DataFlow for this environment.

Returned: always

k8sNodeCount

integer

The number of kubernetes nodes currently in use by DataFlow for this environment.

Returned: always

maxK8sNodeCount

string

The maximum number of kubernetes nodes that environment may scale up under high-demand situations.

Returned: always

minK8sNodeCount

integer

The minimum number of Kubernetes nodes that need to be provisioned in the environment.

Returned: always

name

string

The DataFlow Service’s parent environment name.

Returned: always

region

string

The region of the environment.

Returned: always

status

dictionary

The status of a DataFlow enabled environment.

Returned: always

message

string

A status message for the environment.

Returned: always

state

string

The state of the environment.

Returned: always

Authors

  • Dan Chaffelson (@chaffelson)