ansible_role_emq

EMQ

A ansible role for installing emq on VMs.

Role Variables

All necessary defaults variables are inside defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role.

Details

Cluster

  • cluster_name: Cluster name.

  • cluster_proto_dist: Specify the erlang distributed protocol.

    • Value:
      • inet_tcp: the default; handles TCP streams with IPv4 addressing.
      • inet6_tcp: handles TCP with IPv6 addressing.
      • inet_tls: using TLS for Erlang Distribution.
  • cluster_discovery: Cluster auto-discovery strategy.

    • Value:
      • manual: Manual join command (default)
      • static: Static node list
      • mcast: IP Multicast
      • dns: DNS A Record
      • etcd: etcd
      • k8s: Kubernetes
  • cluster_autoheal: Enable cluster autoheal from network partition.

    • Value:
      • on (default)
      • off
  • cluster_autoclean: Autoclean down node. A down node will be removed from the cluster if this value > 0.

    • Value: h=hour, m=minutes and s=second (default: 5m).

Cluster: using static node list

Cluster: using IP Multicast

  • cluster_mcast_addr: IP Multicast Address.
  • cluster_mcast_ports: Multicast Ports.
  • cluster_mcast_iface: Multicast Iface (default: 0.0.0.0).
  • cluster_mcast_ttl: Multicast Ttl.
    • Value: 0-255
  • cluster_mcast_loop: Multicast loop.
    • Value:
      • on
      • off

Cluster: using DNS A records.

  • cluster_dns_name: DNS name.
  • cluster_dns_app: The App name is used to build 'node.name' with IP address.

Cluster: using etcd.

  • cluster_etcd_server: Etcd server list, seperated by ','.
  • cluster_etcd_prefix: The prefix helps build nodes path in etcd. Each node in the cluster will create a path in etcd: v2/keys//<cluster.name>/<node.name>
  • cluster_etcd_node_ttl: The TTL for node's path in etcd (default: 1m).
  • cluster_etcd_ssl_keyfile: Path to a file containing the client's private PEM-encoded key.
  • cluster_etcd_ssl_certfile: The path to a file containing the client's certificate.
    • Example:
      • cluster_etcd_ssl_certfile: /etc/emqx/certs/client-key.pem
  • cluster_etcd_ssl_cacertfile: Path to the file containing PEM-encoded CA certificates. The CA certificates are used during server authentication and when building the client certificate chain.
    • Example:
      • cluster_etcd_ssl_cacertfile: /etc/emqx/certs/ca.pem

Cluster: using Kubernetes

  • cluster_k8s_apiserver: Kubernetes API server list, seperated by ','.
  • cluster_k8s_service_name: The service name helps lookup EMQ nodes in the cluster.
  • cluster_k8s_address_type: The address type is used to extract host from k8s service.
  • cluster_k8s_app_name: The app name helps build 'node.name'.
  • cluster_k8s_suffix: The suffix added to dns and hostname get from k8s service.
  • cluster_k8s_namespace: Kubernetes Namespace.

ClientId Authentication Plugin

  • auth_client_password_hash: Password hash.
    • Value: plain | md5 | sha | sha256.

HTTP Auth/ACL Plugin

Authentication request.

  • auth_http_auth_req: HTTP URL API path for authentication request
  • auth_http_auth_req_method:
    • Value:
      • post
      • get
  • auth_http_auth_req_content_type: It only works when method=post.
    • Value:
      • json
      • x-www-form-urlencoded
  • auth_http_auth_req_params:
    • Value:
      • %u: username
      • %c: clientid
      • %a: ipaddress
      • %r: protocol
      • %P: password
      • %p: sockport of server accepted
      • %C: common name of client TLS cert
      • %d: subject of client TLS cert
    • Example:
      • auth_http_auth_req_params = clientid=%c,username=%u,password=%P

EMQ X monitoring

emqx_prometheus for EMQ X

  • prometheus_push_gateway_server: The Prometheus Push Gateway URL address, Note: You can comment out this line to disable it.
  • prometheus_interval: The metrics data push interval (millisecond) (default: 15000).
About

Emq ansible role for Ubuntu.

Install
ansible-galaxy install narcislinux/ansible-role-emq
GitHub repository
License
mit
Downloads
25