Skip to content

Commit 07eac43

Browse files
author
Johan De Wit
committed
[docs] Move README into the manifests
1 parent 7b35131 commit 07eac43

File tree

17 files changed

+662
-37
lines changed

17 files changed

+662
-37
lines changed

lib/puppet/type/mongodb_conn_validator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
purposes such as monitoring."
99

1010
ensurable do
11-
desc 'Ensurable property'
11+
desc 'Ensure to verify the connection to mongodb'
1212
defaultvalues
1313
defaultto :present
1414
end

lib/puppet/type/mongodb_replset.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@doc = 'Manage a MongoDB replicaSet'
99

1010
ensurable do
11-
desc 'Ensurable property'
11+
desc 'Ensure the replicaset is either present or absent'
1212
defaultto :present
1313

1414
newvalue(:present) do

lib/puppet/type/mongodb_shard.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@doc = 'Manage a MongoDB Shard'
99

1010
ensurable do
11-
desc 'Ensurable property'
11+
desc 'Ensure the shard is either present or absent'
1212
defaultto :present
1313

1414
newvalue(:present) do

manifests/client.pp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# @summary Class for installing a MongoDB client shell (CLI).
22
#
3+
# @example Basic usage
4+
# include mongodb::client
5+
36
# @param ensure
4-
# Desired ensure state of the package.
7+
# Used to ensure that the package is installed, or that the package is absent/purged
8+
#
59
# @param package_name
6-
# Name of the package to install the client from. Default is repository dependent.
10+
# This setting can be used to specify the name of the package that should be installed.
11+
# If not specified, the module will use whatever service name is the default for your OS distro.
712
#
813
class mongodb::client (
914
String[1] $ensure = $mongodb::client::params::package_ensure,

manifests/db.pp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# @summary Class for creating mongodb databases and users.
22
#
3-
# @param user
3+
# @param user
44
# Database username.
5-
# @param auth_mechanism
6-
# Authentication mechanism. scram_sha_256 password verification is not supported. Defaults to 'scram_sha_1'.
7-
# @param db_name
8-
# Database name. Defaults to $name.
9-
# @param password_hash
10-
# Hashed password. Hex encoded md5 hash of "$username:mongo:$password".
11-
# @param password
12-
# Plain text user password. This is UNSAFE, use 'password_hash' instead.
13-
# @param roles
14-
# Array with user roles. Deaults to ['dbAdmin']
15-
# @param tries
16-
# The maximum amount of two second tries to wait MongoDB startup. Defaults to 10.
17-
# @param update_password
18-
# Force an update of the password when scram_sha_256 is used. Defaults to false.
5+
# @param
6+
# auth_mechanism - Authentication mechanism. scram_sha_256 password verification is not supported. Defaults to 'scram_sha_1'.
7+
# @param
8+
# db_name - Database name. Defaults to $name.
9+
# @param
10+
# password_hash - Hashed password. Hex encoded md5 hash of "$username:mongo:$password".
11+
# @param
12+
# password - Plain text user password. This is UNSAFE, use 'password_hash' instead.
13+
# @param
14+
# roles (default: ['dbAdmin']) - array with user roles.
15+
# @param
16+
# tries (default: 10) - The maximum amount of two second tries to wait MongoDB startup.
17+
# @param
18+
# update_password (default: false) - Force an update of the password when scram_sha_256 is used.
1919
#
2020
define mongodb::db (
2121
String $user,

manifests/globals.pp

Lines changed: 94 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,119 @@
1-
# @summary Class for setting cross-class global overrides. See README.md for more details.
1+
# @summary Class for setting cross-class global overrides.
2+
#
3+
# @example Use a more recent MongoDB version to install from the community repository.
4+
#
5+
# class {'mongodb::globals':
6+
# manage_package_repo => true,
7+
# version => '3.6',
8+
# }
9+
# -> class {'mongodb::client': }
10+
# -> class {'mongodb::server': }
11+
#
12+
# @example Install MongoDB from a custom repository.
13+
#
14+
# class {'mongodb::globals':
15+
# manage_package_repo => true,
16+
# repo_location => 'http://example.com/repo'
17+
# }
18+
# -> class {'mongodb::server': }
19+
# -> class {'mongodb::client': }
20+
#
21+
# @example To disable managing of repository, but still enable managing packages.
22+
#
23+
# class {'mongodb::globals':
24+
# manage_package_repo => false,
25+
# manage_package => true,
26+
# }
27+
# -> class {'mongodb::server': }
28+
# -> class {'mongodb::client': }
229
#
330
# @param server_package_name
31+
# This setting can be used to override the default MongoDB server package name.
32+
# If not specified, the module will use whatever package name is the default for your OS distro.
33+
#
434
# @param client_package_name
35+
# This setting can be used to specify the name of the client package that should be installed.
36+
# If not specified, the module will use whatever service name is the default for your OS distro.
37+
#
538
# @param mongod_service_manage
39+
# This setting can be used to override the default management of the mongod service.
40+
# By default the module will manage the mongod process.
641
# @param service_enable
42+
# This setting can be used to specify if the service should be enable at boot
43+
#
744
# @param service_ensure
45+
# This setting can be used to specify if the service should be running
46+
#
847
# @param service_name
48+
# This setting can be used to override the default MongoDB service name.
49+
# If not specified, the module will use whatever service name is the default for your OS distro.
50+
#
951
# @param service_provider
52+
# This setting can be used to override the default MongoDB service provider.
53+
# If not specified, the module will use whatever service provider is the default for your OS distro.
54+
#
1055
# @param service_status
56+
# This setting can be used to override the default status check command for your MongoDB service.
57+
# If not specified, the module will use whatever service name is the default for your OS distro.
58+
#
1159
# @param user
60+
# This setting can be used to override the default MongoDB user and owner of the service and related files in the file system.
61+
# If not specified, the module will use the default for your OS distro.
62+
#
1263
# @param group
64+
# This setting can be used to override the default MongoDB user group to be used for related files in the file system.
65+
# If not specified, the module will use the default for your OS distro.
66+
#
1367
# @param ipv6
68+
# This setting is used to configure MongoDB to turn on ipv6 support.
69+
# If not specified and ipv6 address is passed to MongoDB bind_ip it will just fail.
70+
#
1471
# @param bind_ip
15-
# @param version Version of mongodb to install
16-
# @param manage_package_repo If `true` configure upstream mongodb repos
72+
# This setting can be used to configure MonogDB process to bind to and listen for connections from applications on this address.
73+
# If not specified, the module will use the default for your OS distro.
74+
# Note: This value should be passed as an array.
75+
#
76+
# @param version
77+
# The version of MonogDB to install/manage. This is needed when managing repositories.
78+
# If not specified, the module will use the default for your OS distro.
79+
#
80+
# @param mongosh_version
81+
# The version of MonogDB-mongosh to install/manage. This package is mandatory to make this module work.
82+
# If not specified, the module will use the default for your OS distro.
83+
#
84+
# @param manage_package_repo
85+
# Whether to use the MongoDB software repository or the OS packages (True) or a Custom repo (False)
86+
#
1787
# @param manage_package
88+
# wgether this module willm manage the mongoDB server package
89+
#
1890
# @param repo_proxy
91+
# This will allow you to set a proxy for your repository in case you are behind a corporate firewall.
92+
# Currently this is only supported with yum repositories
93+
#
1994
# @param proxy_username
95+
# This sets the username for the proxyserver, should authentication be required.
96+
#
2097
# @param proxy_password
98+
# This sets the password for the proxyserver, should authentication be required
99+
#
21100
# @param repo_location
101+
# This setting can be used to override the default MongoDB repository location.
102+
# If not specified, the module will use the default repository for your OS distro.
103+
#
22104
# @param use_enterprise_repo
105+
# When manage_package_repo is set to true, this setting indicates if it will use the Community Edition
106+
# (false, the default) or the Enterprise one (true).
107+
#
23108
# @param pidfilepath
109+
# Specify a file location to hold the PID or process ID of the mongod process.
110+
# If not specified, the module will use the default for your OS distro.
111+
#
24112
# @param pidfilemode
113+
# The file mode of the pid file
114+
#
25115
# @param manage_pidfile
116+
# If true, the pidfile will be managed by puppet
26117
#
27118
class mongodb::globals (
28119
$server_package_name = undef,

manifests/mongos.pp

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,82 @@
1-
# @summary This installs a Mongo Shard daemon. See README.md for more details.
1+
# @summary This installs a Mongo Shard daemon.
2+
#
3+
# This class should only be used if you want to implement sharding within your mongodb deployment.
4+
# This class allows you to configure the mongos daemon (responsible for routing) on your platform.
5+
#
6+
# @example mongos can be installed the following way.
7+
# class {'mongodb::mongos' :
8+
# configdb => ['configsvr1.example.com:27018'],
9+
# }
210
#
311
# @param config
12+
# Path of the config file. If not specified, the module will use the default for your OS distro.
13+
#
414
# @param config_content
15+
# Config content if the default doesn't match one needs.
16+
#
517
# @param config_template
18+
# Path to the config template if the default doesn't match one needs.
19+
#
620
# @param configdb
21+
# Array of the config servers IP addresses the mongos should connect to.
22+
#
723
# @param config_data
24+
# Hash containing key-value pairs to allow for additional configuration options to be set in user-provided template.
25+
#
826
# @param service_manage
27+
# Whether or not the MongoDB sharding service resource should be part of the catalog.
28+
#
929
# @param service_provider
30+
# This setting can be used to override the default Mongos service provider.
31+
# If not specified, the module will use whatever service provider is the default for your OS distro.
32+
#
1033
# @param service_name
34+
# This setting can be used to override the default Mongos service name.
35+
# If not specified, the module will use whatever service name is the default for your OS distro.
36+
#
1137
# @param service_template
38+
# Path to the service template if the default doesn't match one needs.
39+
#
1240
# @param service_enable
41+
# This setting can be used to specify if the service should be enable at boot
42+
#
1343
# @param service_ensure
44+
# This setting can be used to specify if the service should be running
45+
#
1446
# @param service_status
47+
# This setting can be used to override the default status check command for your Mongos service.
48+
# If not specified, the module will use whatever service name is the default for your OS distro.
49+
#
1550
# @param package_ensure
51+
# This setting can be used to specify if puppet should install the package or not
52+
#
1653
# @param package_name
54+
# This setting can be used to specify the name of the package that should be installed.
55+
# If not specified, the module will use whatever service name is the default for your OS distro.
56+
#
1757
# @param unixsocketprefix
58+
# The path for the UNIX socket. If this option has no value, the mongos process creates a socket with /tmp as a prefix.
59+
#
1860
# @param pidfilepath
61+
# Specify a file location to hold the PID or process ID of the mongod process.
62+
# If not specified, the module will use the default for your OS distro.
63+
#
1964
# @param logpath
65+
# Specify the path to a file name for the log file that will hold all diagnostic logging information.
66+
# Unless specified, mongod will output all log information to the standard output.
67+
#
2068
# @param fork
69+
# Set to true to fork server process at launch time. The default setting depends on the operating system.
70+
#
2171
# @param bind_ip
72+
# Set this option to configure the mongod or mongos process to bind to and listen for connections from applications on this address.
73+
# If not specified, the module will use the default for your OS distro.
74+
#
2275
# @param port
76+
# Specifies a TCP port for the server instance to listen for client connections.
77+
#
2378
# @param restart
79+
# Specifies whether the service should be restarted on config changes.
2480
#
2581
class mongodb::mongos (
2682
Stdlib::Absolutepath $config = $mongodb::mongos::params::config,

manifests/mongos/config.pp

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,47 @@
1-
# @summary PRIVATE CLASS: do not call directly
1+
# @private
2+
# @summary Configs mongos
23
#
34
# @param package_ensure
5+
# This setting can be used to specify if puppet should install the package or not
6+
#
47
# @param config
8+
# Path of the config file. If not specified, the module will use the default for your OS distro.
9+
#
510
# @param config_content
11+
# Config content if the default doesn't match one needs.
12+
#
613
# @param config_template
14+
# Path to the config template if the default doesn't match one needs.
15+
#
716
# @param service_manage
17+
# Whether or not the MongoDB sharding service resource should be part of the catalog.
18+
#
819
# @param configdb
20+
# Array of the config servers IP addresses the mongos should connect to.
21+
#
922
# @param bind_ip
23+
# Set this option to configure the mongod or mongos process to bind to and listen for connections from applications on this address.
24+
# If not specified, the module will use the default for your OS distro.
25+
#
1026
# @param port
27+
# Specifies a TCP port for the server instance to listen for client connections.
28+
#
1129
# @param fork
30+
# Set to true to fork server process at launch time. The default setting depends on the operating system.
31+
#
1232
# @param pidfilepath
33+
# Specify a file location to hold the PID or process ID of the mongod process.
34+
# If not specified, the module will use the default for your OS distro.
35+
#
1336
# @param logpath
37+
# Specify the path to a file name for the log file that will hold all diagnostic logging information.
38+
# Unless specified, mongod will output all log information to the standard output.
39+
#
1440
# @param unixsocketprefix
41+
# The path for the UNIX socket. If this option has no value, the mongos process creates a socket with /tmp as a prefix.
42+
#
1543
# @param config_data
44+
# Hash containing key-value pairs to allow for additional configuration options to be set in user-provided templ ate.
1645
#
1746
class mongodb::mongos::config (
1847
$package_ensure = $mongodb::mongos::package_ensure,

manifests/mongos/install.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
# @summary PRIVATE CLASS: do not call directly
1+
# @private
2+
#
3+
# @summary Installs mongos
24
#
35
# @param package_ensure
6+
# This setting can be used to specify if puppet should install the package or not
7+
#
48
# @param package_name
9+
# This setting can be used to specify the name of the package that should be installed.
10+
# If not specified, the module will use whatever service name is the default for your OS distro.
511
#
612
class mongodb::mongos::install (
713
$package_ensure = $mongodb::mongos::package_ensure,

manifests/mongos/service.pp

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
1-
# @summary PRIVATE CLASS: do not call directly
1+
# @private
2+
#
3+
# @summary Manages the mongos service.
24
#
35
# @param package_ensure
6+
# This setting can be used to specify if puppet should install the package or not.
7+
#
48
# @param service_manage
9+
# Whether or not the MongoDB sharding service resource should be part of the catalog.
10+
#
511
# @param service_name
12+
# This setting can be used to override the default Mongos service name.
13+
# If not specified, the module will use whatever service name is the default for your OS distro.
14+
#
615
# @param service_enable
16+
# This setting can be used to specify if the service should be enable at boot.
17+
#
718
# @param service_ensure
19+
# This setting can be used to specify if the service should be running.
20+
#
821
# @param service_status
22+
# This setting can be used to override the default status check command for your Mongos service.
23+
# If not specified, the module will use whatever service name is the default for your OS distro.
24+
#
925
# @param service_provider
26+
# This setting can be used to override the default Mongos service provider.
27+
# If not specified, the module will use whatever service provider is the default for your OS distro.
28+
#
1029
# @param bind_ip
30+
# Set this option to configure the mongod or mongos process to bind to and listen for connections from applicati ons on this address.
31+
# If not specified, the module will use the default for your OS distro.
32+
#
1133
# @param port
34+
# Specifies a TCP port for the server instance to listen for client connections.
35+
#
1236
# @param service_template
37+
# Path to the service template if the default doesn't match one needs.
1338
#
1439
class mongodb::mongos::service (
1540
$package_ensure = $mongodb::mongos::package_ensure,

0 commit comments

Comments
 (0)