Version information
This version is compatible with:
- Puppet 4.5.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.
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 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.
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 |
---|---|---|
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.12.0 < 5.0.0)
- camptocamp/systemd (>= 0.3.0 < 1.0.0)