Forge Home

csync2

Csync2 cluster file synchronization module

11,825 downloads

11,613 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.

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.