Skip to content

Commit 88b7332

Browse files
authored
Merge pull request #204 from ekohl/puppet-strings
Rewrite docs to puppet-strings
2 parents d4b3b82 + 246437c commit 88b7332

File tree

11 files changed

+250
-313
lines changed

11 files changed

+250
-313
lines changed

manifests/client.pp

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
1-
# == Class: gluster::client
1+
# @summary Ensure that the Gluster FUSE client package is installed
22
#
3-
# Ensure that the Gluster FUSE client package is installed
4-
# Note: this is a convenience class to ensure that *just* the client
5-
# is installed. If you need both client and server, please use
6-
# ::gluster::install or ::gluster::init
3+
# @note This is a convenience class to ensure that *just* the client
4+
# is installed. If you need both client and server, please use
5+
# the main gluster class
76
#
8-
# === Parameters
7+
# @param repo
8+
# Whether to use the GlusterFS repository
9+
# @param client_package
10+
# The name of the client package to install.
11+
# @param version
12+
# The version of the client tools to install.
913
#
10-
# repo: boolean value to determine whether to use the GlusterFS repository
11-
# client_package: the name of the client package to install.
12-
# version: the version of the client tools to install.
14+
# @example
15+
# class { gluster::client:
16+
# repo => true,
17+
# client_package => 'glusterfs-fuse',
18+
# version => 'LATEST',
19+
# }
1320
#
14-
# === Example
15-
#
16-
# class { gluster::client:
17-
# repo => true,
18-
# client_package => 'glusterfs-fuse',
19-
# version => 'LATEST',
20-
# }
21-
#
22-
# === Authors
23-
#
24-
# Scott Merrill <[email protected]>
25-
#
26-
# === Copyright
27-
#
28-
# Copyright 2014 CoverMyMeds, unless otherwise noted
21+
# @author Scott Merrill <[email protected]>
22+
# @note Copyright 2014 CoverMyMeds, unless otherwise noted
2923
#
3024
class gluster::client (
31-
$repo = $gluster::params::repo,
32-
$client_package = $gluster::params::client_package,
33-
$version = $gluster::params::version,
34-
) inherits ::gluster::params {
25+
Boolean $repo = $gluster::params::repo,
26+
String $client_package = $gluster::params::client_package,
27+
String $version = $gluster::params::version,
28+
) inherits gluster::params {
3529

3630
class { 'gluster::install':
3731
server => false,

manifests/init.pp

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,45 @@
1-
# == Class: Gluster
1+
# @summary Installs GlusterFS and optionally creates a trusted storage pool
22
#
3-
# Installs GlusterFS and optionally creates a trusted storage pool
3+
# @param client
4+
# whether to install the Gluster client package(s)
5+
# @param pool
6+
# the name of the trusted storage pool to create
7+
# @param repo
8+
# whether to install and manage the upstream Gluster repo
9+
# @param server
10+
# whether to the install the Gluster server packages
11+
# @param use_exported_resources
12+
# whether or not to export this server's gluster::server and collect other
13+
# gluster::server resources
14+
# @param version
15+
# the version to install
16+
# @param volumes
17+
# optional list of volumes (and their properties) to create
418
#
5-
# === Parameters
6-
#
7-
# client: whether to install the Gluster client package(s)
8-
# pool: the name of the trusted storage pool to create
9-
# repo: whether to install and manage the upstream Gluster repo
10-
# server: whether to the install the Gluster server packages
11-
# use_exported_resources: whether or not to export this server's gluster::server and
12-
# collect other gluster::server resources
13-
# version: the version to install
14-
# volumes: optional list of volumes (and their properties) to create
15-
#
16-
# === Example
17-
#
18-
# class { ::gluster:
19-
# client => false,
20-
# server => true,
21-
# pool => 'production',
22-
# use_exported_resources => true,
23-
# version => '3.5',
24-
# volumes => { 'data1' => {
25-
# replica => 2,
26-
# bricks => [ 'srv1.local:/export/brick1/brick',
27-
# 'srv2.local:/export/brick1/brick',
28-
# 'srv3.local:/export/brick1/brick',
29-
# 'srv4.local:/export/brick1/brick', ],
30-
# options => [ 'server.allow-insecure: on',
31-
# 'nfs.disable: true', ],
19+
# @example
20+
# class { ::gluster:
21+
# client => false,
22+
# server => true,
23+
# pool => 'production',
24+
# use_exported_resources => true,
25+
# version => '3.5',
26+
# volumes => { 'data1' => {
27+
# replica => 2,
28+
# bricks => [ 'srv1.local:/export/brick1/brick',
29+
# 'srv2.local:/export/brick1/brick',
30+
# 'srv3.local:/export/brick1/brick',
31+
# 'srv4.local:/export/brick1/brick', ],
32+
# options => [ 'server.allow-insecure: on',
33+
# 'nfs.disable: true', ],
34+
# },
3235
# },
33-
# },
34-
# }
35-
#
36-
# === Authors
37-
#
38-
# Scott Merrill <[email protected]>
39-
#
40-
# === Copyright
36+
# }
4137
#
42-
# Copyright 2014 CoverMyMeds, unless otherwise noted
38+
# @author Scott Merrill <[email protected]>
39+
# @note Copyright 2014 CoverMyMeds, unless otherwise noted
4340
#
4441
class gluster (
45-
$client = $gluster::params::install_client,
42+
Boolean $client = $gluster::params::install_client,
4643
$client_package = $gluster::params::client_package,
4744
$pool = $gluster::params::pool,
4845
$repo = $gluster::params::repo,

manifests/install.pp

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
1-
# == Class gluster::install
1+
# @summary install the Gluster packages
2+
# @api private
23
#
3-
# install the Gluster packages
4+
# @param server
5+
# whether or not to install the server components
6+
# @param client
7+
# whether or not to install the client components
8+
# @param server_package
9+
# the server package name
10+
# @param client_package
11+
# the client package name
12+
# @param repo
13+
# whether or not to use a repo, or the distribution's default packages
14+
# @param version
15+
# the Gluster version to install
416
#
5-
# === Parameters
17+
# @example
18+
# class { gluster::install:
19+
# server => true,
20+
# client => true,
21+
# repo => true,
22+
# version => 3.5,
23+
# }
624
#
7-
# server: whether or not to install the server components
8-
# client: whether or not to install the client components
9-
# server_package: the server package name
10-
# client_package: the client package name
11-
# repo: whether or not to use a repo, or the distribution's default packages
12-
# version: the Gluster version to install
13-
#
14-
# === Example
15-
#
16-
# class { gluster::install:
17-
# server => true,
18-
# client => true,
19-
# repo => true,
20-
# version => 3.5,
21-
# }
22-
#
23-
# === Authors
24-
#
25-
# Scott Merrill <[email protected]>
26-
#
27-
# === Copyright
28-
#
29-
# Copyright 2014 CoverMyMeds, unless otherwise noted
25+
# @author Scott Merrill <[email protected]>
26+
# @note Copyright 2014 CoverMyMeds, unless otherwise noted
3027
#
3128
class gluster::install (
3229
Boolean $server = $gluster::params::install_server,
@@ -35,7 +32,7 @@
3532
String $version = $gluster::params::version,
3633
String $server_package = $gluster::params::server_package,
3734
String $client_package = $gluster::params::client_package,
38-
) inherits ::gluster::params {
35+
) inherits gluster::params {
3936

4037
if $repo {
4138
# install the correct repo

manifests/mount.pp

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1+
# @summary Mounts a Gluster volume
12
#
2-
# == Class gluster::mount
3+
# @param volume
4+
# the volume to mount, in "server:/volname" format
5+
# @param log_level
6+
# the GlusterFS log level to use
7+
# @param log_file
8+
# the file to which to log this volume
9+
# @param transport
10+
# TCP or RDMA
11+
# @param direct_io_mode
12+
# whether or not to use direct io mode
13+
# @param readdirp
14+
# whether or not to use readdirp
15+
# @param atboot
16+
# whether to add this volume to /etc/fstab
17+
# @param options
18+
# a comma-separated list of GlusterFS mount options
19+
# @param dump
20+
# enable or disable dump in /etc/fstab
21+
# @param pass
22+
# the sequence value for fsck for this volume in /etc/fstab
23+
# @param ensure
24+
# the state to ensure
325
#
4-
# Mounts a Gluster volume
26+
# @example
27+
# gluster::mount { 'data1':
28+
# ensure => present,
29+
# volume => 'srv1.local:/data1',
30+
# transport => 'tcp',
31+
# atboot => true,
32+
# dump => 0,
33+
# pass => 0,
34+
# }
535
#
6-
# === Parameters
7-
#
8-
# volume: the volume to mount, in "server:/volname" format
9-
# log_level: the GlusterFS log level to use
10-
# log_file: the file to which to log this volume
11-
# transport: TCP or RDMA
12-
# direct_io_mode: whether or not to use direct io mode
13-
# readdirp: whether or not to use readdirp
14-
# atboot: whether to add this volume to /etc/fstab
15-
# options: a comma-separated list of GlusterFS mount options
16-
# dump: enable or disable dump in /etc/fstab
17-
# pass: the sequence value for fsck for this volume in /etc/fstab
18-
# ensure: one of: defined, present, unmounted, absent, mounted
19-
#
20-
# === Examples
21-
#
22-
# gluster::mount { 'data1':
23-
# ensure => present,
24-
# volume => 'srv1.local:/data1',
25-
# transport => 'tcp',
26-
# atboot => true,
27-
# dump => 0,
28-
# pass => 0,
29-
# }
30-
#
31-
# === Authors
32-
#
33-
# Scott Merrill <[email protected]>
34-
#
35-
# === Copyright
36-
#
37-
# Copyright 2014 CoverMyMeds, unless otherwise noted
36+
# @author Scott Merrill <[email protected]>
37+
# @note Copyright 2014 CoverMyMeds, unless otherwise noted
3838
#
3939
define gluster::mount (
4040
String $volume,

manifests/params.pp

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1-
#
2-
# == Class gluster::params
3-
#
4-
# establishes various defaults for use in other gluster manifests
5-
#
6-
# === Parameters
7-
#
8-
# None!
9-
#
10-
# === Examples
11-
#
12-
# None! This class should not be called in your manifests.
13-
#
14-
# === Authors
15-
#
16-
# Scott Merrill <[email protected]>
17-
#
18-
# === Copyright
19-
#
20-
# Copyright 2014 CoverMyMeds, unless otherwise noted
1+
# @summary establishes various defaults for use in other gluster manifests
2+
# @api private
3+
# @author Scott Merrill <[email protected]>
4+
# @note Copyright 2014 CoverMyMeds, unless otherwise noted
215
#
226
class gluster::params {
237

manifests/peer.pp

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,38 @@
1-
# == Define: gluster::peer
2-
#
31
# Connects to a Gluster peer. Intended to be exported by each member of
4-
# a Gluster Trusted Storage Pool. Each server should also collect all
2+
# a Gluster Trusted Storage Pool. Each server should also collect all
53
# such exported resources for local realization.
64
#
75
# If the title of the exported resource is NOT the FQDN of the host
86
# on which the resource is being realized, then try to initiate a
97
# Gluster peering relationship.
108
#
11-
# === Pamameters
12-
#
13-
# pool: the name of the storage pool to which this server should be assigned.
14-
#
15-
# === Examples
16-
#
17-
# Export this host's gluster::peer resource, and then collect all others:
18-
# @@gluster::peer { $::fqdn:
19-
# pool => 'production',
20-
# }
21-
# Gluster::Peer <<| pool == 'production' |>>
22-
#
23-
# You can also explicitly define peers:
24-
# gluster::peer { 'gluster1.example.com':
25-
# pool => 'pool1',
26-
# }
27-
#
28-
# === Authors
9+
# @summary Connects to a Gluster peer.
2910
#
30-
# Scott Merrill <[email protected]>
11+
# @param pool
12+
# the name of the storage pool to which this server should be assigned.
13+
# @param fqdn
14+
# the name of this peer to use in the pool
3115
#
32-
# === Copyright
16+
# @example Export this host's gluster::peer resource, and then collect all others:
17+
# @@gluster::peer { $::fqdn:
18+
# pool => 'production',
19+
# }
20+
# Gluster::Peer <<| pool == 'production' |>>
3321
#
34-
# Copyright 2014 CoverMyMeds, unless otherwise notes
22+
# @example explicitly define peers:
23+
# gluster::peer { 'gluster1.example.com':
24+
# pool => 'pool1',
25+
# }
3526
#
27+
# @author Scott Merrill <[email protected]>
3628
#
37-
# Note: http://www.gluster.org/pipermail/gluster-users/2013-December/038354.html
38-
# When server-a probes server-b, server-b will only record the IP address
39-
# for server-a. When server-b next runs Puppet, it will probe server-a
40-
# because server-a's fqdn is not in the list of peers. The peering will
41-
# have been successfully established the first time, so this second
42-
# peering attempt only resolves a cosmetic issue, not a functional one.
29+
# @note Copyright 2014 CoverMyMeds, unless otherwise notes
30+
# @see http://www.gluster.org/pipermail/gluster-users/2013-December/038354.html
31+
# When server-a probes server-b, server-b will only record the IP address
32+
# for server-a. When server-b next runs Puppet, it will probe server-a
33+
# because server-a's fqdn is not in the list of peers. The peering will
34+
# have been successfully established the first time, so this second
35+
# peering attempt only resolves a cosmetic issue, not a functional one.
4336
#
4437
define gluster::peer (
4538
$pool = 'default',

0 commit comments

Comments
 (0)