Forge Home

glusterfs

Install, enable and configure GlusterFS servers and clients.

664,478 downloads

664,339 latest version

4.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.0.5 (latest)
  • 0.0.4
released Dec 24th 2017

Start using this module

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

Add this module to your Puppetfile:

mod 'maxadamo-glusterfs', '0.0.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add maxadamo-glusterfs
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install maxadamo-glusterfs --version 0.0.5

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

maxadamo/glusterfs — version 0.0.5 Dec 24th 2017

puppet-glusterfs

Overview

Install, enable and configure GlusterFS.

  • glusterfs::server : Class to install and enable the server.
  • glusterfs::peer : Definition to add a server peer. Used by the server class' $peer parameter.
  • glusterfs::volume : Definition to create server volumes.
  • glusterfs::client : Class to install and enable the client. Included from the mount definition.
  • glusterfs::mount : Definition to create client mounts.

You will need to open TCP ports 24007:24009 and 38465:38466 on the servers.

Examples

Complete server with two redundant nodes, on top of existing kickstart created vg0 LVM VGs. Note that the first runs will fail since the volume creation won't work until the peers know each other, and that requires the service to be running:

    $mypeer = $::hostname ? {
      'server1' => '192.168.0.2',
      'server2' => '192.168.0.1',
    }
    file { [ '/export', '/export/gv0' ]:
      ensure  => directory,
      seltype => 'usr_t',
    }
    logical_volume { 'lv_glusterfs':
      ensure       => present,
      volume_group => 'rootvg',
      size         => '4G';
    }
    filesystem { '/dev/mapper/rootvg-lv_glusterfs':
      ensure  => present,
      fs_type => 'ext4',
      require => Logical_volume['lv_glusterfs'];
    }
    mount { '/export/gv0':
      ensure  => mounted,
      device  => '/dev/mapper/rootvg-lv_glusterfs',
      fstype  => 'ext4',
      options => 'defaults',
      require => [
        Filesystem['/dev/mapper/rootvg-lv_glusterfs'],
        File['/export/gv0']
      ];
    }
    class { 'glusterfs::server':
      peers => $::hostname ? {
        'server1' => '192.168.0.2',
        'server2' => '192.168.0.1',
      },
    }
    glusterfs::volume { 'gv0':
      create_options => 'replica 2 192.168.0.1:/export/gv0 192.168.0.2:/export/gv0',
      require        => Mount['/export/gv0'],
    }

Client mount (the client class is included automatically). Note that clients are virtual machines on the servers above, so make each of them use the replica on the same hardware for optimal performance and optimal fail-over :

    file { '/var/www': ensure => directory }
    glusterfs::mount { '/var/www':
      device => $::hostname ? {
        'client1' => '192.168.0.1:/gv0',
        'client2' => '192.168.0.2:/gv0',
      }
    }

Note

This is a fork of thias-glusterfs. It's merely the same, apart from:

  • yes command prepended to volume creation, to skip the user interaction to confirm the operation.
  • minor fixes against puppet-lint