Forge Home

csync2

Csync2 cluster file synchronization module

11,938 downloads

11,711 latest version

3.4 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.1.1 (latest)
  • 0.1.0
released Apr 16th 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'thias-csync2', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add thias-csync2
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install thias-csync2 --version 0.1.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

thias/csync2 — version 0.1.1 Apr 16th 2013

puppet-csync2

Overview

Install, enable and configure csync2. For more information, see http://oss.linbit.com/csync2/

  • csync2 : Main class to install and enable the server.
  • csync2::cfg : Simple definition to manage pre-created configuration files.
  • csync2::key : Simple definition to manage pre-created shared keys.

This module requires another module to manage the xinetd configuration. See examples below for the thias-xinetd module.

You will also need to allow all nodes to access 30865/tcp on each node.

Examples

To generate a key file that you can then deploy using puppet :

csync2 -k example.key

Typical module invocation :

class { 'csync2':
  cfg_source => 'puppet:///modules/example/csync2/csync2.cfg',
  key_source => 'puppet:///modules/example/csync2/csync2.key',
}

With the content of csync2.cfg being :

group example {
  host www01.example.com@192.168.12.1;
  host www02.example.com@192.168.12.2;
  host www03.example.com@192.168.12.3;
  key /etc/csync2/csync2.key;
  include /var/www;
}

Once all nodes have been configured by puppet, run the following on all :

csync2 -xv

From here, you should either run csync2 -x from cron, or have it triggered by some other program which watches directories for changes using inotify, such as lsyncd.

If you have more than one configuration on a node, you will want to use the csync2::cfg and csync2::key definitions to manage its files :

csync2::cfg { 'example2':
  source => 'puppet:///modules/example/csync2/csync2_example2.cfg',
}
csync2::key { 'example2':
  source => 'puppet:///modules/example/csync2/csync2_example2.key',
}

Note that in this case, all files have the csync2_ prefix automatically added, in order to make things work with the csync2 -C example2 -xv syntax.