stream_replicator

Install and configure the Choria NATS Stream Replicator

Choria Orchestrator

choria

9,484 downloads

3,412 latest version

3.1 quality score

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
  • CentOS
    ,
    OracleLinux
    ,
    RedHat

Start using this module

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
  }
}