Forge Home

gluster

Basic module to manage Gluster

14,847 downloads

12,833 latest version

5.0 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.2.2 (latest)
  • 0.2.1
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Mar 3rd 2016
This version is compatible with:
  • Puppet Enterprise 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=3.4.0

Start using this module

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

Add this module to your Puppetfile:

mod 'praekeltfoundation-gluster', '0.2.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add praekeltfoundation-gluster
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install praekeltfoundation-gluster --version 0.2.2

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

praekeltfoundation/gluster — version 0.2.2 Mar 3rd 2016

puppet-gluster

Puppet module for managing glusterfs.

Unlike other glusterfs modules, this one uses custom types and providers to avoid needing multiple runs to set up interdependent resources and to gracefully handle missing peers.

This is particularly useful when provisioning VMs with vagrant.

WARNING

This is pretty much just a prototype at the moment. Its functionality is quite limited and it hasn't been tested on a wide variety of environments. It meets our fairly basic needs, but we wouldn't recommend using it in production without hammering on it a bit first.

Usage

The gluster class manages the installation and running of the glusterfs-server service. Repo and package management is only implemented for Ubuntu, however.

class { 'gluster':
  package_ensure => 'latest',
  service_ensure => 'running',
}

For a full list of options see the manifest source.

In most cases the defaults should be suitable and a simple include gluster will suffice.

gluster::client

Hosts that only need a client can use gluster::client.

class { 'gluster::client':
  ensure => 'latest',
}

gluster_peer

The gluster_peer resource sets up peer relationships between the nodes by running gluster peer probe as necessary. If a peer can't be reached, the resource will log a warning and pretend success to avoid unnecessary failures during cluster bootstrapping.

gluster_peer { ['gfs1.local', 'gfs2.local']:
    ensure => present,
}

Peers may be removed by setting ensure to absent.

gluster_peer { oldgfs1.local':
    ensure => absent,
}

To avoid continually probing localhost, gluster_peer ignores peers that match the fqdn and hostname facts. Other peer names can be ignored with the local_peer_aliases param, which can be useful if a host has multiple names.

gluster_peer { ['gfs1.local', 'gfs2.local']:
    ensure             => present,
    local_peer_aliases => [$gfs_host_alias],
}

The gluster_peer resource sets up peer relationships between the nodes by running gluster peer probe as necessary.

gluster_volume

The gluster_volume resource manages a glusterfs volume. If any hosts mentioned in the bricks list aren't active peers, the resource will log a message and pretend to be in sync to avoid unnecessary failures during cluster bootstrapping.

Gluster_peer resources for all hosts mentioned in the bricks list will be autorequired, as will File resources for the parent directories of brick paths on the local peer.

gluster_volume { 'volume1':
    bricks => [
        'gfs1.local:/data/brick1',
        'gfs2.local:/data/brick1',
    ],
}

As with gluster_peer, aliases for the local peer can be provided.

gluster_volume { 'volume1':
    local_peer_aliases => [$gfs_host_alias],
    bricks             => [
        'gfs1.local:/data/brick1',
        'gfs2.local:/data/brick1',
    ],
}

Currently, the only volume type parameter accepted is replica. (We expect to support the others in the future.)

gluster_volume { 'volume1':
    replica => 2,
    bricks  => [
        'gfs1.local:/data/brick1',
        'gfs2.local:/data/brick1',
    ],
}

The ensure parameter accepts the values present, absent, and stopped. present indicates that the volume should be running, absent indicates that the volume should not exist, and stopped indicates that the volume should exist but not be running.