Forge Home

nats

NATS.io module for the Choria Orchestrator

72,929 downloads

10,939 latest version

1.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.4.0 (latest)
  • 0.3.0
  • 0.2.0
  • 0.1.0
  • 0.0.12
  • 0.0.11
  • 0.0.10
  • 0.0.9
  • 0.0.8
  • 0.0.7
  • 0.0.6
released Mar 28th 2017
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

choria/nats — version 0.0.8 Mar 28th 2017

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.