Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 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
Add this module to your Puppetfile:
mod 'praekeltfoundation-gluster', '0.2.2'
Learn more about managing modules with a PuppetfileDocumentation
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.
Types in this module release
0.2.2 2016-03-04
Features
- Documentation!
gluster::client
added.
0.2.1 2016-02-11
Features
- Support for Puppet 4.x.
Fixes
- Missing require added so the providers now work deliberately instead of accidentally.
- Test helper now excludes
gluster peer status
from configured errors to avoid breaking prefetch in integration tests.
0.2.0 2016-02-10
Features
gluster::repo
,gluster::install
, andgluster::service
classes to manage the installation and operation of gluster and a a top-levelgluster
class to wrap them.
0.1.1 - 2016-02-05
Fixes
gluster_peer
andgluster_volume
now autorequirePackage[gluster-server]
.gluster_volume
now autorequires the parent directories of any bricks on the current node.
0.1.0 - 2016-02-04
Initial release
gluster_peer
resource to configure cluster peersgluster_volume
resource to create volumes
Dependencies
Copyright (c) 2016, Praekelt Foundation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of puppet-gluster nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.