Puppet Class: emqx

Defined in:
manifests/init.pp

Summary

A basic module for managing emqx

Overview

Installs and configures the emqx package and service

Examples:

include emqx

Parameters:

  • install_package_source (String) (defaults to: 'https://www.emqx.com/en/downloads/broker')

    The location to source the package from.

  • install_version (String) (defaults to: '5.0.25')

    The version of emqx. Default: ‘5.0.25’

  • install_platform (String) (defaults to: 'el8')

    The os platform in order to download the required package.

  • install_package_extension (String) (defaults to: 'rpm')

    The file extension for the package.

  • service_ensure (Variant[Enum['running', 'stopped'], Boolean]) (defaults to: 'running')

    The state of the service.

  • service_enable (Boolean) (defaults to: true)

    Boolean for enabling/disabling the service.

  • manage_config (Boolean) (defaults to: true)

    Boolean for setting whether to manage emqx.conf.

  • config_node_name (String[1]) (defaults to: 'emqx@127.0.0.1')

    String for setting the name field for the node config path.

  • config_node_cookie (Sensitive[String[1]]) (defaults to: Sensitive('emqxsecretcookie'))

    Sensitive string for setting the cookie field for the node config path.

  • config_node_data_dir (String) (defaults to: '/var/lib/emqx')

    String for setting the data_dir field for the node config path.

  • config_node_options (Hash) (defaults to: {})

    Hash for setting additional fields under the node config path. Note: Do not set name, cooke and data_dir fields here.

  • config_cluster_name (String[1]) (defaults to: 'emqxcl')

    String for setting the name field for the cluster config path.

  • config_cluster_discovery_strategy (Enum['manual','static','mcast','dns','etcd','k8s']) (defaults to: 'manual')

    Enum String for setting the discovery_strategy field for the cluster config path.

  • config_cluster_options (Hash) (defaults to: {})

    Hash for setting additional fields under the cluster config path. Note: Do not set name, cooke and data_dir fields here. Note: Do not set name and discovery_strategy fields here.

  • config_dashboard_listeners_ssl (Boolean) (defaults to: false)

    Boolean for setting ssl for the dashboard listener configuration. i.e. Use config path if true dashboard.listeners.https, else dashboard.listeners.http.

  • config_dashboard_listeners_bind (Variant[Integer,String[1]]) (defaults to: 18083)

    Integer or String for setting the emqx dashboard bind address as either a port or bind ip:port respectively.

  • config_dashboard_listeners_options (Hash) (defaults to: {})

    Hash for setting additional fields under the dashboard.listeners.http or dashboard.listeners.https config path. Note: Do not set bind and option fields here.

  • config_authorization_options (Hash) (defaults to: { deny_action => 'ignore', no_match => 'allow', cache => '{ enable = true }', })

    Hash for setting additional fields under the authorization config path.

  • config_additional_configs (Hash) (defaults to: {})

    Hash for setting additional config paths and fields. Note: Do not set the following config_paths here: node, cluster, dashboard, authorization.



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'manifests/init.pp', line 87

class emqx (
  String                                             $install_package_source              = 'https://www.emqx.com/en/downloads/broker',
  String                                             $install_version                     = '5.0.25',
  String                                             $install_platform                    = 'el8',
  String                                             $install_package_extension           = 'rpm',
  Variant[Enum['running', 'stopped'], Boolean]       $service_ensure                      = 'running',
  Boolean                                            $service_enable                      = true,
  Boolean                                            $manage_config                       = true,
  String[1]                                          $config_node_name                    = 'emqx@127.0.0.1',
  Sensitive[String[1]]                               $config_node_cookie                  = Sensitive('emqxsecretcookie'),
  String                                             $config_node_data_dir                = '/var/lib/emqx',
  Hash                                               $config_node_options                 = {},
  String[1]                                          $config_cluster_name                 = 'emqxcl',
  Enum['manual','static','mcast','dns','etcd','k8s'] $config_cluster_discovery_strategy   = 'manual',
  Hash                                               $config_cluster_options              = {},
  Boolean                                            $config_dashboard_listeners_ssl      = false,
  Variant[Integer,String[1]]                         $config_dashboard_listeners_bind     = 18083,
  Hash                                               $config_dashboard_listeners_options  = {},
  Hash                                               $config_authorization_options        = {
    deny_action => 'ignore',
    no_match => 'allow',
    cache => '{ enable = true }',
  },
  Hash                                               $config_additional_configs           = {},
) {
  include emqx::install
  include emqx::config
  include emqx::service

  Class['emqx::install'] -> Class['emqx::config'] -> Class['emqx::service']
}