Forge Home

pacemaker

Puppet module to provide configuration managent of pacemaker and associated resources

11,598 downloads

10,233 latest version

0.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.2.0 (latest)
  • 0.1.0
  • 0.0.3
  • 0.0.2
  • 0.0.1
released May 1st 2014

Start using this module

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

Add this module to your Puppetfile:

mod 'radez-pacemaker', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add radez-pacemaker
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install radez-pacemaker --version 0.2.0

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
Tags: ha, pacemaker, pcs

Documentation

radez/pacemaker — version 0.2.0 May 1st 2014

Pacemaker module for puppet

This module manages pacemaker on Linux distros with the pcs tool.

License

Apache 2.0

Support & Contact

Please log tickets and issues at https://github.com/radez/puppet-pacemaker

Description

This module uses the fact osfamily which is supported by Facter 1.6.1+. If you do not have facter 1.6.1 in your environment, the following manifests will provide the same functionality in site.pp (before declaring any node):

if ! $::osfamily {
  case $::operatingsystem {
    'RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL': {
      $osfamily = 'RedHat'
    }
    'ubuntu', 'debian': {
      $osfamily = 'Debian'
    }
    'SLES', 'SLED', 'OpenSuSE', 'SuSE': {
      $osfamily = 'Suse'
    }
    'Solaris', 'Nexenta': {
      $osfamily = 'Solaris'
    }
    default: {
      $osfamily = $::operatingsystem
    }
  }
}

This module is based on work by Dan Radez

Usage

pacemaker

Installs Pacemaker and corosync and creates a cluster

class {"pacemaker::corosync":
    cluster_name => "cluster_name",
    cluster_members => "192.168.122.3 192.168.122.7",
}

The pacemaker::corosync resource must be executed on each node

Disable stonith

class {"pacemaker::stonith":
    disable => true,
}

Add a stonith device

class {"pacemaker::stonith::ipmilan":
    address => "10.10.10.100",
    user => "admin",
    password => "admin",
}

Resources

Any of the following resources support a group propery. This will create the group, if the group doesn't exist, and add the resource to the group. This has been demonstrated on the ip address example, but is not a required propery.

Add a floating ip

pacemaker::resource::ip { "192.168.122.223":
    ip_address => "192.168.122.223",
    group => "my_group",
}

Manage a Linux Standard Build service

That will get created after the floating ip

pacemaker::resource::lsb { "http":
    require => Pacemaker::Resource::Ip['192.168.122.223'],
}

Manage a MySQL server

pacemaker::resource::mysql { "da-database": }

Manage a shared filesystem

pacemaker::resource::filesystem { "apache share":
    device => "192.168.122.1:/var/www/html",
    directory => "/mnt",
    fstype => "nfs",
}