Skip to content

Commit ad9148f

Browse files
author
Johan De Wit
committed
[Docs] move README into the manifests
1 parent f0562a0 commit ad9148f

11 files changed

+681
-31
lines changed

manifests/client.pp

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# Class for installing a MongoDB client shell (CLI).
1+
# @summary Class for installing a MongoDB client shell (CLI).
22
#
3-
# == Parameters
3+
# @example Basic usage
4+
# include mongodb::client
5+
6+
# @param ensure
7+
# Used to ensure that the package is installed, or that the package is absent/purged
48
#
5-
# $ensure:: Desired ensure state of the package.
6-
#
7-
# $package_name:: Name of the package to install the client from. Default is
8-
# repository dependent.
9+
# @param package_name
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.
912
#
1013
class mongodb::client (
1114
String[1] $ensure = $mongodb::client::params::package_ensure,

manifests/db.pp

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
# == Class: mongodb::db
1+
# @summary Class for creating mongodb databases and users.
22
#
3-
# Class for creating mongodb databases and users.
4-
#
5-
# == Parameters
6-
#
7-
# user - Database username.
8-
# auth_mechanism - Authentication mechanism. scram_sha_256 password verification is not supported. Defaults to 'scram_sha_1'.
9-
# db_name - Database name. Defaults to $name.
10-
# password_hash - Hashed password. Hex encoded md5 hash of "$username:mongo:$password".
11-
# password - Plain text user password. This is UNSAFE, use 'password_hash' instead.
12-
# roles (default: ['dbAdmin']) - array with user roles.
13-
# tries (default: 10) - The maximum amount of two second tries to wait MongoDB startup.
3+
# @param user
4+
# Database username.
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
1418
# update_password (default: false) - Force an update of the password when scram_sha_256 is used.
1519
#
1620
define mongodb::db (

manifests/globals.pp

+117-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,120 @@
1-
# Class for setting cross-class global overrides. See README.md for more
2-
# 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': }
29+
#
30+
# @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+
#
34+
# @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+
#
38+
# @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.
41+
# @param service_enable
42+
# This setting can be used to specify if the service should be enable at boot
43+
#
44+
# @param service_ensure
45+
# This setting can be used to specify if the service should be running
46+
#
47+
# @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+
#
51+
# @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+
#
55+
# @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+
#
59+
# @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+
#
63+
# @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+
#
67+
# @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+
#
71+
# @param bind_ip
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+
#
87+
# @param manage_package
88+
# wgether this module willm manage the mongoDB server package
89+
#
90+
# @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+
#
94+
# @param proxy_username
95+
# This sets the username for the proxyserver, should authentication be required.
96+
#
97+
# @param proxy_password
98+
# This sets the password for the proxyserver, should authentication be required
99+
#
100+
# @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+
#
104+
# @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+
#
108+
# @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+
#
112+
# @param pidfilemode
113+
# The file mode of the pid file
114+
#
115+
# @param manage_pidfile
116+
# If true, the pidfile will be managed by puppet
117+
#
3118
class mongodb::globals (
4119
$server_package_name = undef,
5120
$client_package_name = undef,

manifests/mongos.pp

+80-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,83 @@
1-
# 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+
# }
10+
#
11+
# @param config
12+
# Path of the config file. If not specified, the module will use the default for your OS distro.
13+
#
14+
# @param config_content
15+
# Config content if the default doesn't match one needs.
16+
#
17+
# @param config_template
18+
# Path to the config template if the default doesn't match one needs.
19+
#
20+
# @param configdb
21+
# Array of the config servers IP addresses the mongos should connect to.
22+
#
23+
# @param config_data
24+
# Hash containing key-value pairs to allow for additional configuration options to be set in user-provided template.
25+
#
26+
# @param service_manage
27+
# Whether or not the MongoDB sharding service resource should be part of the catalog.
28+
#
29+
# @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+
#
33+
# @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+
#
37+
# @param service_template
38+
# Path to the service template if the default doesn't match one needs.
39+
#
40+
# @param service_enable
41+
# This setting can be used to specify if the service should be enable at boot
42+
#
43+
# @param service_ensure
44+
# This setting can be used to specify if the service should be running
45+
#
46+
# @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+
#
50+
# @param package_ensure
51+
# This setting can be used to specify if puppet should install the package or not
52+
#
53+
# @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+
#
57+
# @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+
#
60+
# @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+
#
64+
# @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+
#
68+
# @param fork
69+
# Set to true to fork server process at launch time. The default setting depends on the operating system.
70+
#
71+
# @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+
#
75+
# @param port
76+
# Specifies a TCP port for the server instance to listen for client connections.
77+
#
78+
# @param restart
79+
# Specifies whether the service should be restarted on config changes.
80+
#
281
class mongodb::mongos (
382
Stdlib::Absolutepath $config = $mongodb::mongos::params::config,
483
Optional[String[1]] $config_content = $mongodb::mongos::params::config_content,

manifests/opsmanager.pp

+91-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,80 @@
1-
# This installs Ops Manager
1+
# @summary This installs Ops Manager
2+
#
3+
# @example To install Ops Manager and have it run with a local MongoDB application server do the following:
4+
# class {'mongodb::opsmanager':
5+
# opsmanager_url => 'http://opsmanager.yourdomain.com'
6+
# mongo_uri => 'mongodb://yourmongocluster:27017,
7+
# from_email_addr => '[email protected]',
8+
# reply_to_email_addr => '[email protected]',
9+
# admin_email_addr => '[email protected]',
10+
# smtp_server_hostname => 'email-relay.yourdomain.com'
11+
# }
212
#
313
# @param user
414
# The user that owns the config file
515
#
616
# @param group
717
# The group that owns the config file
818
#
19+
# @param ensure
20+
# Used to ensure that the package is installed and the service is running, or that the package is absent/purged
21+
# and the service is stopped.
22+
#
23+
# @param package_name
24+
# his setting can be used to specify the name of the package that should be installed.
25+
# If not specified, the module will use whatever service name is the default for your OS distro.
26+
#
27+
# @param package_ensure
28+
# This setting can be used to specify if puppet should install the package or not.
29+
#
30+
# @param service_enable
31+
# This setting can be used to specify if the service should be enable at boot.
32+
#
33+
# @param service_manage
34+
# Whether or not the MongoDB sharding service resource should be part of the catalog.
35+
#
36+
# @param service_name
37+
# This setting can be used to override the default Mongos service name.
38+
# If not specified, the module will use whatever service name is the default for your OS distro.
39+
#
40+
# @param download_url
41+
# This setting can be used to override the default MongoDB Ops-Manager download location.
42+
#
43+
# @param mongo_uri
44+
# Connection string to the mongod cluster.
45+
#
946
# @param opsmanager_url
1047
# The fully qualified url where opsmanager runs. Must include the port.
1148
#
12-
# @param opsmanager_mongo_uri
13-
# Full URI where the Ops Manager application mongodb server(s) can be found.
49+
# @param client_certificate_mode
50+
# Client certificate authorization mode.
51+
#
52+
# @param from_email_addr
53+
# Email address ussed as sender
54+
#
55+
# @param reply_to_email_addr
56+
# Reply to email address to use
57+
#
58+
# @param admin_email_addr
59+
# Adminsitrator's email address
60+
#
61+
# @param email_dao_class
62+
# The email delivery agent class to use
63+
#
64+
# @param mail_transport
65+
# The email transport type to use
66+
#
67+
# @param smtp_server_hostname
68+
# Hostname of the email server to use.
69+
#
70+
# @param smtp_server_port
71+
# email port on the email server to use.
72+
#
73+
# @param ssl
74+
# Set to true to enable ssl.
75+
#
76+
# @param ignore_ui_setup
77+
# Wheter to install ui or not.
1478
#
1579
# @param ca_file
1680
# Ca file for secure connection to backup agents.
@@ -21,6 +85,30 @@
2185
# @param pem_key_password
2286
# The password to the pem key file.
2387
#
88+
# @param user_svc_class
89+
# The user svc class
90+
# Default: com.xgen.svc.mms.svc.user.UserSvcDb
91+
# External Source: com.xgen.svc.mms.svc.user.UserSvcCrowd
92+
# Internal Database: com.xgen.svc.mms.svc.user.UserSvcDb
93+
#
94+
# @param snapshot_interval
95+
# The snapshot interval to use
96+
#
97+
# @param snapshot_interval_retention
98+
# The snapshot interval retention period
99+
#
100+
# @param snapshot_daily_retention
101+
# The dayly snapshot interval retention period
102+
#
103+
# @param snapshot_weekly_retention
104+
# The weekly snapshot interval retention period
105+
#
106+
# @param snapshot_monthly_retention
107+
# The monthly snapshot interval retention period
108+
#
109+
# @param versions_directory
110+
# The directory where to store the snapshot versions
111+
#
24112
class mongodb::opsmanager (
25113
String[1] $user = 'mongodb-mms',
26114
String[1] $group = 'mongodb-mms',

manifests/params.pp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# PRIVATE CLASS: do not use directly
1+
# @summary Private class to set default values.
2+
#
3+
# @api private
24
class mongodb::params inherits mongodb::globals {
35
$ensure = true
46
$dbpath = '/var/lib/mongo'

0 commit comments

Comments
 (0)