glusterfs
Install, enable and configure GlusterFS servers and clients.
Version information
released Dec 24th 2017
Start using this module
Add this module to your Puppetfile:
mod 'maxadamo-glusterfs', '0.0.5'
Learn more about managing modules with a PuppetfileDocumentation
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
2013-05-24 - 0.0.3
- Update README and use markdown.
- Change to 2-space indent.
2012-09-25 - 0.0.2
- Add peers, volumes and mount support.
2012-09-20 - 0.0.1
- Initial module release.
Copyright (C) 2012-2013 Matthias Saou Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.