Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.4.x
- Puppet >= 4.9.0
- , , ,
This module has been deprecated by its author since May 15th 2020.
The author has suggested choria-choria as its replacement.
Start using this module
Documentation
NATS.io module for AIO Puppet 4
This is a basic module to configure NATS.io for use with Puppet 4, it's intended as
a companion module to the ripienaar/mcollective
module.
DEPRECATED: This module is now deprecated, you should use the Broker features
provided by the choria/choria
module.
To remove the files this module added while moving to choria/choria
set ensure => absent
on this module.
Overview
This module will install the NATS binary on your machine via source from inside the module file directory, create a config dir, config file and configure the NATS daemon for standalone or clustered use.
It only supports verified TLS connections and defaults to using the Puppet certificates and CA.
Usage
It's recommended that you define a cluster of servers equal to 3 nodes, but it can run standalone too.
By default clients will listen on ::
, use port 4222
, monitoring will be on port 8222
and
cluster comms will use port 4223
.
This module installs the included gnatsd
binary to /usr/sbin/gnatsd
by
default and manages either a SysV init script (nats::service_type => 'init'
), an Upstart job (nats::service_type => 'upstart'
) or a Systemd
Unit file (nats::service_type => 'systemd'
) depending on the underlying
operating system.
Default logging is to syslog for systemd
, to /var/log/upstart/gnatsd.log
for
upstart
and to /var/log/gnatsd-stderr.log
and /var/log/gnatsd-stdout.log
for init
. Various other paths can be configured via the class properties.
It may happen that you run in a high amount of TCP connections. The default amount of open files is 1024 (each TCP connection is a file descriptor => is a file). You can increase this if you use the systemd init system. The option is limit_nofile. You can check the amount of open TCP connections by:
lsof -p $(pgrep --pidfile /var/run/gnatsd.pid) | grep TCP -c
Cluster of 3 Servers
Given 3 servers with cluster ports 4223
and password S3cret
you configure the the
class with the FQDNs of your 3 servers and a password
class{"nats":
servers => ["nats1.example.net", "nats2.example.net", "nats3.example.net"],
routes_password => "S3cret"
}
Standalone Server
If you do not specify servers, it becomes a standalone node:
include nats
Change the service type manually (systemd
, upstart
redhat
or init
)
The module installs a Systemd Unit file, an Upstart Job or a classic SysV init script, depending on the underlying operating system. Usually there is no need to set the service type manually.
class { 'nats':
service_type => 'systemd', # or 'upstart', `redhat` or 'init'
}
Collectd Stats
If you use the puppet/collectd
module to manage collectd this module can configure a metrics
poller for your NATS instances
class{"nats":
servers => ["nats1.example.net", "nats2.example.net", "nats3.example.net"],
routes_password => "S3cret",
manage_collectd => true
}
Compatibility
The module supports Debian, Ubuntu and RedHat/CentOS. You should be able to use
it on other operating systems not directly supported as well, provided you set
the nats::service_type
parameter (it defaults to init
).
For Systemd support the module depends on the camptocamp/systemd
module.
Date | Issue | Description |
---|---|---|
2018/03/21 | Release 0.4.0 | |
2018/03/02 | 71 | Deprecate this module in favour of choria/choria module and the new Choria Broker |
2018/02/25 | Release 0.3.0 | |
2018/01/29 | 68 | Support Debian Stretch |
2017/11/17 | 63 | Ensure systemd is being used on OEL7 |
2017/11/07 | 61 | Support disabling TLS |
2017/10/19 | Release 0.2.0 | |
2017/10/12 | 59 | Allow latest systemd module to be used |
2017/10/03 | 52 | Allow write_deadline to be configured |
2017/10/03 | 54 | Update to NATS 1.0.4 |
2017/09/21 | Release 0.1.0 | |
2017/09/08 | 50 | Support FreeBSD |
2017/07/25 | Release 0.0.12 | |
2017/06/12 | Make the TLS timeouts configurable using tls_timeout and cluster_tls_timeout |
|
2017/07/14 | 46 | Update NATS to 1.0.0 |
2017/06/12 | 45 | Add listen_address option |
2017/06/01 | Release 0.0.11 | |
2017/06/01 | 40 | Use Hiera 5 to avoid deprecation notices and require Puppet >= 4.9.0 |
2017/05/29 | 38 | Notify instead of fail when Hiera data is missing |
2017/05/22 | 37 | Improve handling of passwords containing special characters |
2017/05/19 | Release 0.0.10 | |
2017/05/17 | 33 | Allow NATS to run as a user |
2017/03/17 | Release 0.0.9 | |
2017/04/13 | 28 | Allow setting number of open files for systemd based machines using limit_nofile |
2017/03/28 | Release 0.0.8 | |
2017/03/24 | 25 | Fix NATS installation on RedHat based non systemd nodes |
2017/03/24 | 23 | Default to clientcert rather than FQDN for certs |
2017/03/05 | Release 0.0.7 | |
2017/03/02 | 20 | Fix the selection of service provider |
2017/02/11 | Release 0.0.6 and move to choria-io project |
|
2016/12/21 | Release 0.0.5 | |
2016/12/21 | 16 | Update NATS to 0.9.6 |
2016/12/21 | 15 | Support sysvinit and upstart init systems (thank you @antaflos) |
2016/10/26 | Release 0.0.4 | |
2016/10/26 | 8,9 | Make max_connections, max_payload and max_pending_size configurable |
2016/08/19 | Release 0.0.3 | |
2016/08/19 | 5 | Support NATS 0.9.4 cluster announce feature, off by default |
2016/08/19 | 3 | Upgrade NATS to 0.9.4 |
2016/07/30 | 1 | Optionally write collectd configuration to fetch stats from NATS |
Dependencies
- puppetlabs/stdlib (>= 4.24.0 < 5.0.0)
- camptocamp/systemd (>= 1.1.1 < 2.0.0)