Forge Home

stream_replicator

Install and configure the Choria NATS Stream Replicator

12,014 downloads

4,993 latest version

3.1 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.4.1 (latest)
  • 0.4.0
  • 0.3.0
  • 0.2.0
  • 0.1.1
  • 0.1.0
  • 0.0.8
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
released May 14th 2019
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'choria-stream_replicator', '0.4.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add choria-stream_replicator
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install choria-stream_replicator --version 0.4.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

choria/stream_replicator — version 0.4.1 May 14th 2019

choria/stream_replicator

Overview

The Choria NATS Stream Replicator is a tool to replicate a topic from one NATS Streaming cluster to another. It's has different modes of operation for preserving order or scaling horizontally and vertically.

Module Description

The module installs, configures and manages the associated services.

In order to install the package you have to add the Choria YUM repository to your system, the choria/choria module can do this, you can also arrange for it to be installed on your own as below:

[choria_release]
name=choria_release
baseurl=https://packagecloud.io/choria/release/el/$releasever/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/choria/release/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

Usage

class{"stream_replicator":
  managed_topics          => ["cmdb", "jobs"],
  topics                  => {
    "cmdb"                => {
      "topic"             => "acme.cmdb",
      "source_url"        => "nats://nats1.dc1.acme.net:4222",
      "source_cluster_id" => "dc1",
      "target_url"        => "nats://nats1.dc2.acme.net:4222",
      "target_cluster_id" => "dc2",
    },
    "jobs"                => {
      "topic"             => "acme.jobs",
      "source_url"        => "nats://nats1.dc1.acme.net:4222",
      "source_cluster_id" => "dc1",
      "target_url"        => "nats://nats1.dc2.acme.net:4222",
      "target_cluster_id" => "dc2",
    },
  }
}

Full reference about the available options for configuring topics can be found in the project documentation.

TLS

While this module support configuring TLS properties such as paths to certificates it cannot create these for you, you have to arrange another means of delivering the SSL keys, certificates etc to the host - perhaps in your profile class.

If you use the Puppet scheme you can configure it as below and use the stream-replicator enroll command to create the SSL files:

class{"stream_replicator":
  managed_topics          => ["cmdb", "jobs"],
  tls                     => {
    "identity"            => $facts["fqdn"],
    "scheme"              => "puppet",
    "ssl_dir"             => "/etc/stream-replicator/ssl"
  },
  topics                  => {
    # as above
  }
}

If you have another CA you can configure it manually:

class{"stream_replicator":
  managed_topics          => ["cmdb", "jobs"],
  tls                     => {
    "identity"            => $facts["fqdn"],
    "scheme"              => "manual",
    "ca"                  => "/path/to/ca.pem",
    "cert"                => "/path/to/cert.pem",
    "key"                 => "/path/to/key.pem"
  },
  topics                  => {
    # as above
  }
}