Role - metrics_qdr

Role Documentation

Welcome to the “tripleo_metrics_qdr” role documentation.

Role Defaults

This section highlights all of the defaults and variables set within the “tripleo_metrics_qdr” role.

# Corresponds to MetricsQdrAddresses in THT
# Addresses configuration (array of hashes).
tripleo_metrics_qdr_addresses:
- prefix: collectd
  distribution: multicast
- prefix: ceilometer
  distribution: multicast

# Corresponds to MetricsQdrAutoLinks in THT
# AutoLinks for the Configured Addresses
tripleo_metrics_qdr_autolink_addresses: []

# Where to write the config file
tripleo_metrics_qdr_conf_output_dir: /var/lib/config-data/ansible-generated/metrics_qdr

# Corresponds to MetricsQdrConnectors in THT
# Connectors configuration (array of hashes).
tripleo_metrics_qdr_connectors: []

# Set to edge-only or controller-mesh
tripleo_metrics_qdr_deployment_mode: edge-only

tripleo_metrics_qdr_extra_listeners: []

tripleo_metrics_qdr_extra_ssl_profiles: []

# Corresponds to MetricsQdrAuthenticateClient in THT
# Authenticate the client using SSL/TLS
tripleo_metrics_qdr_listener_auth_peer: false

# Corresponds to MetricsQdrPort in THT
# Service name or port number on which the qdrouterd will accept connections.
tripleo_metrics_qdr_listener_port: 5666

# Corresponds to MetricsQdrUseSSL in THT
# Set to true if required to use SSL or TLS on the connection for listener.
tripleo_metrics_qdr_listener_require_ssl: false

# Corresponds to MetricsQdrSaslMechanisms in THT
# List of SASL auth mechanisms for listener as of comma separated list.
tripleo_metrics_qdr_listener_sasl_mech: ANONYMOUS

# Corresponds to MetricsQdrSslCertFile in THT
# Path to SSL certificate file for listener.
tripleo_metrics_qdr_listener_ssl_cert_file: /etc/pki/tls/certs/metrics_qdr.crt

# Corresponds to MetricsQdrSslCertDb in THT
# Path to SSL certificate db for listener.
tripleo_metrics_qdr_listener_ssl_cert_db: /etc/pki/tls/certs/ca-bundle.crt

# Corresponds to MetricsQdrSslKeyFile in THT
# Path to SSL private key file for listener.
tripleo_metrics_qdr_listener_ssl_key_file: /etc/pki/tls/certs/metrics_qdr.key

# Corresponds to MetricsQdrSslPassword in THT
# SSL password to be supplied for listener.
tripleo_metrics_qdr_listener_ssl_password:

# Corresponds to MetricsQdrSslPwFile in THT
# Path to SSL password file for certificate key for listener.
tripleo_metrics_qdr_listener_ssl_pw_file:

# Corresponds to MetricsQdrTrustedCerts in THT
# Path to file containing trusted certificates for listener.
tripleo_metrics_qdr_listener_trusted_certs:

# Corresponds to MetricsQdrUseEncryption in THT
# Set to true if it is required to encrypt connection to the peer for listener.
tripleo_metrics_qdr_listener_use_encryption: false

tripleo_metrics_qdr_log_output: /var/log/qdrouterd/metrics_qdr.log

# Corresponds to MetricsQdrPassword in THT
# Password which should be used to authenticate to the deployed qdrouterd.
tripleo_metrics_qdr_password: guest

tripleo_metrics_qdr_router_mode: edge

# Corresponds to MetricsQdrSSLProfiles in THT
# SSL Profiles for the connectors (array of hashes).
tripleo_metrics_qdr_ssl_profiles:
- name: sslProfile

tripleo_metrics_qdr_ssl_profile_base_mesh: {}

# Corresponds to MetricsQdrUsername in THT
# Username which should be used to authenticate to the deployed qdrouterd.
tripleo_metrics_qdr_username: guest

# Corresponds to MetricsQdrExternalEndpoint in THT
# Whether QDR should listen on external network interface. To enable listening
# on external network one must deploy QDRs in mesh mode.
metrics_qdr_external_endpoint: false

# Corresponds to EnableInternalTLS in THT
tripleo_enable_internal_tls: false

# Corresponds to InternalTLSCAFile in THT
# Specifies the default CA cert to use if TLS is used for services in the
# internal network.
tripleo_internal_tlscafile: /etc/ipa/ca.crt

Molecule Scenarios

Molecule is being used to test the “tripleo_metrics_qdr” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.

Scenario: controller-mesh-edge-node

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      ubi:
        ansible_python_interpreter: /usr/bin/python3
    vars:
      ansible_user: root
      tripleo_metrics_qdr_conf_output_dir: /etc/qpid-dispatch/
Example controller-mesh-edge-node playbook
- import_playbook: ../common/converge.yml

- name: Converge controller-mesh edge node config
  hosts: centos
  tasks:
  - name: Invoke tripleo_metrics_qdr for edge node
    include_role:
      name: '{{ playbook_dir }}/../../../tripleo_metrics_qdr'
      tasks_from: create_config
    vars:
      tripleo_metrics_qdr_connectors:
      - host: stf-default-interconnect-5671-service-telemetry.example.com
        port: 443
        role: edge
        sslProfile: sslProfile
        verifyHostname: false
      tripleo_metrics_qdr_deployment_mode: controller-mesh
      controller_node_ips: 10.0.0.20,10.0.0.30
      ctlplane_ip: 10.0.0.10
      internal_api_ip: '{{ ansible_default_ipv4.address }}'
      service_net_map:
        compute_metrics_qdr_network: internal_api
      tripleo_role_name: Compute

Scenario: controller-mesh-interior-node

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      ubi:
        ansible_python_interpreter: /usr/bin/python3
    vars:
      ansible_user: root
      tripleo_metrics_qdr_conf_output_dir: /etc/qpid-dispatch/
Example controller-mesh-interior-node playbook
- import_playbook: ../common/converge.yml

- name: Converge controller-mesh interior node config
  hosts: centos
  tasks:
  - name: Invoke tripleo_metrics_qdr for interior node
    include_role:
      name: '{{ playbook_dir }}/../../../tripleo_metrics_qdr'
      tasks_from: create_config
    vars:
      tripleo_metrics_qdr_connectors:
      - host: stf-default-interconnect-5671-service-telemetry.example.com
        port: 443
        role: edge
        sslProfile: sslProfile
        verifyHostname: false
      tripleo_metrics_qdr_deployment_mode: controller-mesh
      controller_node_ips: 10.0.0.20,10.0.0.30,10.0.0.40,{{ ansible_default_ipv4.address
        }}
      ctlplane_ip: '{{ ansible_default_ipv4.address }}'
      internal_api_ip: '{{ ansible_default_ipv4.address }}'
      service_net_map:
        controller_metrics_qdr_network: internal_api
      tripleo_role_name: Controller

Scenario: default

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      ubi:
        ansible_python_interpreter: /usr/bin/python3
    vars:
      ansible_user: root
      tripleo_metrics_qdr_conf_output_dir: /etc/qpid-dispatch/
Example default playbook
- import_playbook: ../common/converge.yml

- name: Converge edge-only config
  hosts: centos
  tasks:
  - name: Invoke tripleo_metrics_qdr for edge-only
    include_role:
      name: '{{ playbook_dir }}/../../../tripleo_metrics_qdr'
      tasks_from: create_config
    vars:
      tripleo_metrics_qdr_connectors:
      - host: stf-default-interconnect-5671-service-telemetry.example.com
        port: 443
        role: edge
        sslProfile: sslProfile
        verifyHostname: false
      controller_node_ips: 10.0.0.20,10.0.0.30,10.0.0.40
      ctlplane_ip: 10.0.0.10
      internal_api_ip: '{{ ansible_default_ipv4.address }}'
      service_net_map:
        standalone_metrics_qdr_network: internal_api
      tripleo_role_name: Standalone

Scenario: internal-tls

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      ubi:
        ansible_python_interpreter: /usr/bin/python3
    vars:
      ansible_user: root
      tripleo_metrics_qdr_conf_output_dir: /etc/qpid-dispatch/
Example internal-tls playbook
- import_playbook: ../common/converge.yml

- name: Converge edge-only config
  hosts: centos
  tasks:
  - name: Invoke tripleo_metrics_qdr for internal-tls interior node
    include_role:
      name: '{{ playbook_dir }}/../../../tripleo_metrics_qdr'
      tasks_from: create_config
    vars:
      tripleo_metrics_qdr_conf_output_dir: /etc/qpid-dispatch/
      tripleo_metrics_qdr_connectors:
      - host: stf-default-interconnect-5671-service-telemetry.example.com
        port: 443
        role: edge
        sslProfile: sslProfile
        verifyHostname: false
      tripleo_metrics_qdr_deployment_mode: controller-mesh
      controller_node_ips: 10.0.0.20,10.0.0.30,10.0.0.40,{{ ansible_default_ipv4.address
        }}
      ctlplane_ip: '{{ ansible_default_ipv4.address }}'
      internal_api_ip: '{{ ansible_default_ipv4.address }}'
      service_net_map:
        controller_metrics_qdr_network: internal_api
      tripleo_role_name: Controller
      tripleo_enable_internal_tls: true