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
- Puppet >= 7.0.0 < 9.0.0
- , , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-mongodb', '6.0.1'
Learn more about managing modules with a PuppetfileDocumentation
mongodb puppet module
Table of Contents
- Overview
- Module Description - What does the module do?
- Setup - The basics of getting started with mongodb
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
Installs MongoDB on RHEL/Ubuntu/Debian/SLES from community/enterprise repositories or alternatively from custom repositories.
Module Description
The MongoDB module manages mongod server installation and configuration of the mongod daemon.
The MongoDB module also manages mongos, Ops Manager and the mongdb-mms setup.
Setup
What MongoDB affects
- MongoDB packages.
- MongoDB configuration files.
- MongoDB services.
- MongoDB apt/yum/zypper repository.
Beginning with MongoDB
If you want a server installation with the default options you can run
include mongodb::server
. If you need to customize configuration
options you need to do the following:
class {'mongodb::server':
port => 27018,
verbose => true,
}
To install client with default options run include mongodb::client
To override the default mongodb repo version you need the following:
class {'mongodb::globals':
repo_version => '4.4',
}
-> class {'mongodb::server': }
-> class {'mongodb::client': }
If you have a custom Mongodb repository you can opt out of repo management:
class {'mongodb::globals':
manage_package_repo => false,
}
-> class {'mongodb::server': }
-> class {'mongodb::client': }
Usage
Most of the interaction for the server is done via mongodb::server
. For
more options please have a look at mongodb::server.
There is also mongodb::globals
to set some global settings, on its own this
class does nothing.
Create MongoDB database
To install MongoDB server, create database "testdb" and user "user1" with password "pass1".
class {'mongodb::server':
auth => true,
}
mongodb::db { 'testdb':
user => 'user1',
password_hash => 'a15fbfca5e3a758be80ceaf42458bcd8',
}
Parameter 'password_hash' is hex encoded md5 hash of "user1:mongo:pass1". Unsafe plain text password could be used with 'password' parameter instead of 'password_hash'.
Sharding
If one plans to configure sharding for a Mongo deployment, the module offer
the mongos
installation. mongos
can be installed the following way :
class {'mongodb::mongos' :
configdb => ['configsvr1.example.com:27018'],
}
Ops Manager
To install Ops Manager and have it run with a local MongoDB application server do the following:
class {'mongodb::opsmanager':
opsmanager_url => 'http://opsmanager.yourdomain.com'
mongo_uri => 'mongodb://yourmongocluster:27017,
from_email_addr => 'opsmanager@yourdomain.com',
reply_to_email_addr => 'replyto@yourdomain.com',
admin_email_addr => 'admin@yourdomain.com',
$smtp_server_hostname => 'email-relay.yourdomain.com'
}
The default settings will not set useful email addresses. You can also just run include mongodb::opsmanager
and then set the emails later.
Ops Manager Usage
Most of the interaction for the server is done via mongodb::opsmanager
. For
more options please have a look at mongodb::opsmanager.
Limitations
Look at metadata.json for tested OSes.
Development
This module is maintained by Vox Pupuli. Voxpupuli welcomes new contributions to this module, especially those that include documentation and rspec tests. We are happy to provide guidance if necessary.
Please see CONTRIBUTING for more details.
Authors
- Puppetlabs Module Team
- Voxpupuli Team
We would like to thank everyone who has contributed issues and pull requests to this module. A complete list of contributors can be found on the GitHub Contributor Graph for the puppet-mongodb module.
Reference
Table of Contents
Classes
Public Classes
mongodb::client
mongodb::globals
: Class for setting cross-class global overrides.mongodb::mongos
: This installs a Mongo Shard daemon.mongodb::opsmanager
mongodb::replset
: Wrapper class useful for hiera based deploymentsmongodb::server
: This installs a MongoDB server.mongodb::shardsvr
: Wrapper class useful for hiera based deployments
Private Classes
mongodb::mongos::config
: Manages mongos configmongodb::mongos::install
: Installs mongosmongodb::mongos::service
: Manages the mongos servicemongodb::repo
: Manages the mongodb repositorymongodb::repo::apt
: This is a repo class for aptmongodb::repo::yum
: This is a repo class for yummongodb::repo::zypper
: This is a repo class for zyppermongodb::server::config
: Manages mongod configmongodb::server::install
: Manages the mongod packagemongodb::server::service
: Manages the mongos service
Defined types
mongodb::db
: Class for creating mongodb databases and users.
Resource types
mongodb_conn_validator
: Verify that a connection can be successfully established between a node and the mongodb server. Its primary use is as a precondition to prevmongodb_database
: Manage MongoDB databases.mongodb_replset
: Manage a MongoDB replicaSetmongodb_shard
: Manage a MongoDB Shardmongodb_user
: Manage a MongoDB user. This includes management of users password as well as privileges.
Functions
mongodb_password
: Get the mongodb password hash from the clear text password.
Classes
mongodb::client
The mongodb::client class.
Parameters
The following parameters are available in the mongodb::client
class:
ensure
Data type: String[1]
Used to ensure that the package is installed, or that the package is absent/purged
Default value: pick($mongodb::globals::client_version, 'present')
package_name
Data type: String[1]
This setting can be used to specify the name of the package that should be installed. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: 'mongodb-mongosh'
mongodb::globals
Class for setting cross-class global overrides.
Examples
Use a specific MongoDB version to install from the community repository.
class {'mongodb::globals':
manage_package_repo => true,
repo_version => '6.0',
}
-> class {'mongodb::client': }
-> class {'mongodb::server': }
Use a specific MongoDB version to install from the enterprise repository.
class {'mongodb::globals':
manage_package_repo => true,
repo_version => '6.0',
use_enterprise_repo => true,
}
-> class {'mongodb::client': }
-> class {'mongodb::server': }
Use a custom MongoDB apt repository.
class {'mongodb::globals':
manage_package_repo => true,
repo_location => 'https://example.com/repo',
keyring_location => 'https://example.com/keyring.asc'
}
-> class {'mongodb::client': }
-> class {'mongodb::server': }
To disable managing of repository, but still enable managing packages.
class {'mongodb::globals':
manage_package_repo => false,
}
-> class {'mongodb::server': }
-> class {'mongodb::client': }
Parameters
The following parameters are available in the mongodb::globals
class:
version
client_version
manage_package_repo
repo_version
use_enterprise_repo
repo_location
repo_proxy
keyring_location
proxy_username
proxy_password
version
Data type: Optional[String[1]]
The version of MonogDB to install/manage.
If not specified, the module will ensure packages with present
.
Default value: undef
client_version
Data type: Optional[String[1]]
The version of MongoDB Shell to install/manage.
If not specified, the module will ensure packages with present
.
Default value: undef
manage_package_repo
Data type: Boolean
Whether to manage MongoDB software repository.
Default value: true
repo_version
Data type: String[1]
The version of the package repo.
Default value: '5.0'
use_enterprise_repo
Data type: Boolean
When manage_package_repo is set to true, this setting indicates if it will use the Community Edition (false, the default) or the Enterprise one (true).
Default value: false
repo_location
Data type: Optional[String]
This setting can be used to override the default MongoDB repository location. If not specified, the module will use the default repository for your OS distro.
Default value: undef
repo_proxy
Data type: Optional[String]
This will allow you to set a proxy for your repository in case you are behind a corporate firewall. Currently this is only supported with yum repositories
Default value: undef
keyring_location
Data type: Optional[String]
When repo_location
is used for an apt repository this setting can be used for the keyring
file to download.
Default value: undef
proxy_username
Data type: Optional[String]
This sets the username for the proxyserver, should authentication be required.
Default value: undef
proxy_password
Data type: Optional[String]
This sets the password for the proxyserver, should authentication be required
Default value: undef
mongodb::mongos
This class should only be used if you want to implement sharding within your mongodb deployment. This class allows you to configure the mongos daemon (responsible for routing) on your platform.
}
Examples
mongos can be installed the following way.
class {'mongodb::mongos' :
configdb => ['configsvr1.example.com:27018'],
Parameters
The following parameters are available in the mongodb::mongos
class:
config
config_content
config_template
configdb
config_data
service_manage
service_provider
service_name
service_user
service_group
service_template
service_enable
service_ensure
service_status
package_ensure
package_name
unixsocketprefix
pidfilepath
logpath
fork
bind_ip
port
restart
config
Data type: Stdlib::Absolutepath
Path of the config file. If not specified, the module will use the default for your OS distro.
Default value: '/etc/mongos.conf'
config_content
Data type: Optional[String[1]]
Config content if the default doesn't match one needs.
Default value: undef
config_template
Data type: Optional[String[1]]
Path to the config template if the default doesn't match one needs.
Default value: undef
configdb
Data type: Variant[String[1], Array[String[1]]]
Array of the config servers IP addresses the mongos should connect to.
Default value: '127.0.0.1:27019'
config_data
Data type: Optional[Hash]
Hash containing key-value pairs to allow for additional configuration options to be set in user-provided template.
Default value: undef
service_manage
Data type: Boolean
Whether or not the MongoDB sharding service resource should be part of the catalog.
Default value: true
service_provider
Data type: Optional[String]
This setting can be used to override the default Mongos service provider. If not specified, the module will use whatever service provider is the default for your OS distro.
Default value: undef
service_name
Data type: String[1]
This setting can be used to override the default Mongos service name. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: 'mongos'
service_user
Data type: String[1]
The user used by Systemd for running the service. If not specified, the module will use the default for your OS distro.
service_group
Data type: String[1]
The group used by Systemd for running the service If not specified, the module will use the default for your OS distro.
service_template
Data type: String[1]
Path to the service template if the default doesn't match one needs.
Default value: 'mongodb/mongos/mongos.service-dropin.epp'
service_enable
Data type: Boolean
This setting can be used to specify if the service should be enable at boot
Default value: true
service_ensure
Data type: Stdlib::Ensure::Service
This setting can be used to specify if the service should be running
Default value: 'running'
service_status
Data type: Optional[String]
This setting can be used to override the default status check command for your Mongos service. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: undef
package_ensure
Data type: String[1]
This setting can be used to specify if puppet should install the package or not
Default value: pick($mongodb::globals::version, 'present')
package_name
Data type: String
This setting can be used to specify the name of the package that should be installed. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: "mongodb-${mongodb::globals::edition}-mongos"
unixsocketprefix
Data type: Stdlib::Absolutepath
The path for the UNIX socket. If this option has no value, the mongos process creates a socket with /tmp as a prefix.
Default value: '/var/run/mongodb'
pidfilepath
Data type: Stdlib::Absolutepath
Specify a file location to hold the PID or process ID of the mongod process. If not specified, the module will use the default for your OS distro.
Default value: '/var/run/mongodb/mongos.pid'
logpath
Data type: Variant[Boolean, Stdlib::Absolutepath]
Specify the path to a file name for the log file that will hold all diagnostic logging information. Unless specified, mongod will output all log information to the standard output.
Default value: '/var/log/mongodb/mongos.log'
fork
Data type: Boolean
Set to true to fork server process at launch time. The default setting depends on the operating system.
Default value: true
bind_ip
Data type: Optional[Array[Stdlib::IP::Address]]
Set this option to configure the mongod or mongos process to bind to and listen for connections from applications on this address. If not specified, the module will use the default for your OS distro.
Default value: undef
port
Data type: Optional[Stdlib::Port]
Specifies a TCP port for the server instance to listen for client connections.
Default value: undef
restart
Data type: Boolean
Specifies whether the service should be restarted on config changes.
Default value: true
mongodb::opsmanager
The mongodb::opsmanager class.
Parameters
The following parameters are available in the mongodb::opsmanager
class:
pem_key_password
user_svc_class
snapshot_interval
snapshot_interval_retention
snapshot_daily_retention
snapshot_weekly_retention
snapshot_monthly_retention
versions_directory
user
group
ensure
package_name
package_ensure
service_enable
service_manage
service_name
download_url
mongo_uri
opsmanager_url
client_certificate_mode
from_email_addr
reply_to_email_addr
admin_email_addr
email_dao_class
mail_transport
smtp_server_hostname
smtp_server_port
ssl
ignore_ui_setup
ca_file
pem_key_file
pem_key_password
Data type: Optional[String[1]]
The password to the pem key file.
Default value: undef
user_svc_class
Data type: Optional[String[1]]
The user svc class Default: com.xgen.svc.mms.svc.user.UserSvcDb External Source: com.xgen.svc.mms.svc.user.UserSvcCrowd Internal Database: com.xgen.svc.mms.svc.user.UserSvcDb
Default value: undef
snapshot_interval
Data type: Optional[Integer]
The snapshot interval to use
Default value: undef
snapshot_interval_retention
Data type: Optional[Integer]
The snapshot interval retention period
Default value: undef
snapshot_daily_retention
Data type: Optional[Integer]
The dayly snapshot interval retention period
Default value: undef
snapshot_weekly_retention
Data type: Optional[Integer]
The weekly snapshot interval retention period
Default value: undef
snapshot_monthly_retention
Data type: Optional[Integer]
The monthly snapshot interval retention period
Default value: undef
versions_directory
Data type: Optional[Integer]
The directory where to store the snapshot versions
Default value: undef
user
Data type: String[1]
Default value: 'mongodb-mms'
group
Data type: String[1]
Default value: 'mongodb-mms'
ensure
Data type: Enum['running', 'stopped']
Default value: 'running'
package_name
Data type: String[1]
Default value: 'mongodb-mms'
package_ensure
Data type: String[1]
Default value: 'present'
service_enable
Data type: Boolean
Default value: true
service_manage
Data type: Boolean
Default value: true
service_name
Data type: String[1]
Default value: 'mongodb-mms'
download_url
Data type: Stdlib::Httpurl
Default value: 'https://downloads.mongodb.com/on-prem-mms/rpm/mongodb-mms-4.0.1.50101.20180801T1117Z-1.x86_64.rpm'
mongo_uri
Data type: String[1]
Default value: 'mongodb://127.0.0.1:27017'
opsmanager_url
Data type: Stdlib::Httpurl
Default value: "http://${facts['networking']['fqdn']}:8080"
client_certificate_mode
Data type: String[1]
Default value: 'None'
from_email_addr
Data type: String[1]
Default value: 'from@example.com'
reply_to_email_addr
Data type: String[1]
Default value: 'reply-to@example.com'
admin_email_addr
Data type: String[1]
Default value: 'admin@example.com'
email_dao_class
Data type: String[1]
Default value: 'com.xgen.svc.core.dao.email.JavaEmailDao'
mail_transport
Data type: Enum['smtp','smtps']
Default value: 'smtp'
smtp_server_hostname
Data type: Stdlib::Host
Default value: 'smtp.example.com'
smtp_server_port
Data type: Stdlib::Port
Default value: 25
ssl
Data type: Boolean
Default value: false
ignore_ui_setup
Data type: Boolean
Default value: true
ca_file
Data type: Optional[String[1]]
Default value: undef
pem_key_file
Data type: Optional[String[1]]
Default value: undef
mongodb::replset
Wrapper class useful for hiera based deployments
Examples
hieradata
mongodb::replset::sets:
replicaset01:
ensure: present
members:
- member01.example.com:27017
- member02.example.com:27017
- member03.example.com:27017
Parameters
The following parameters are available in the mongodb::replset
class:
sets
Data type: Any
Hash of attributes as described in the mongodb_replset custom type
Default value: undef
mongodb::server
Most of the parameters manipulate the mongod.conf file.
For more details about configuration parameters consult the MongoDB Configuration File Options.
This setting can be used to specify if the service should be running.
Parameters
The following parameters are available in the mongodb::server
class:
ensure
user
group
config
dbpath
dbpath_fix
pidfilemode
pidfilepath
manage_pidfile
rcfile
service_manage
service_manage
service_name
service_provider
service_status
service_enable
service_ensure
package_ensure
package_name
logpath
bind_ip
ipv6
logappend
system_logrotate
fork
port
journal
smallfiles
cpu
auth
verbose
verbositylevel
objcheck
quota
quotafiles
diaglog
directoryperdb
profile
maxconns
oplog_size
nohints
nohttpinterface
noscripting
notablescan
noprealloc
nssize
mms_token
mms_name
mms_interval
replset
replset_config
replset_members
configsvr
shardsvr
rest
quiet
slowms
keyfile
key
set_parameter
syslog
config_content
config_template
config_data
tls
tls_key
tls_ca
tls_conn_without_cert
tls_invalid_hostnames
tls_invalid_certificates
tls_mode
admin_password_hash
restart
storage_engine
create_admin
admin_username
admin_password
admin_auth_mechanism
admin_update_password
admin_roles
handle_creds
store_creds
ensure
Data type: String[1]
Used to ensure that the package is installed and the service is running, or that the package is absent/purged and the service is stopped.
Default value: 'present'
user
Data type: String[1]
This setting can be used to override the default MongoDB user and owner of the service and related files in the file system. If not specified, the module will use the default for your OS distro.
group
Data type: String[1]
This setting can be used to override the default MongoDB user group to be used for related files in the file system. If not specified, the module will use the default for your OS distro.
config
Data type: Stdlib::Absolutepath
Path of the config file. If not specified, the module will use the default for your OS distro.
Default value: '/etc/mongod.conf'
dbpath
Data type: Stdlib::Absolutepath
Set this value to designate a directory for the mongod instance to store it's data. If not specified, the module will use the default for your OS distro.
dbpath_fix
Data type: Boolean
Set this value to true if you want puppet to recursively manage the permissions of the files in the dbpath directory. If you are using the default dbpath, this should probably be false. Set this to true if you are using a custom dbpath.
Default value: false
pidfilemode
Data type: String[4,4]
The file mode of the pidfilepath
Default value: '0644'
pidfilepath
Data type: Optional[Stdlib::Absolutepath]
Specify a file location to hold the PID or process ID of the mongod process. If not specified, the module will use the default for your OS distro.
Default value: undef
manage_pidfile
Data type: Boolean
Should puppet create the pidfile. Mongod 6.2.10 will not start if pidfile exists
Default value: false
rcfile
Data type: String
The path to the custom mongosh rc file.
Default value: "${facts['root_home']}/.mongoshrc.js"
service_manage
Data type: Boolean
Whether or not the MongoDB service resource should be part of the catalog.
Default value: true
service_manage
Whether or not the MongoDB sharding service resource should be part of the catalog.
Default value: true
service_name
Data type: String[1]
This setting can be used to override the default Mongos service name. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: 'mongod'
service_provider
Data type: Optional[String[1]]
This setting can be used to override the default Mongos service provider. If not specified, the module will use whatever service provider is the default for your OS distro.
Default value: undef
service_status
Data type: Optional[Enum['stopped', 'running']]
This setting can be used to override the default status check command for your Mongos service. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: undef
service_enable
Data type: Boolean
This setting can be used to specify if the service should be enable at boot.
Default value: true
service_ensure
Data type: Enum['stopped', 'running']
Default value: 'running'
package_ensure
Data type: String[1]
This setting can be used to specify if puppet should install the package or not.
Default value: pick($mongodb::globals::version, 'present')
package_name
Data type: String[1]
This setting can be used to specify the name of the package that should be installed. If not specified, the module will use whatever service name is the default for your OS distro.
Default value: "mongodb-${mongodb::globals::edition}-server"
logpath
Data type: Stdlib::Absolutepath
Specify the path to a file name for the log file that will hold all diagnostic logging information. Unless specified, mongod will output all log information to the standard output.
Default value: '/var/log/mongodb/mongod.log'
bind_ip
Data type: Array[Stdlib::IP::Address]
Set this option to configure the mongod or mongos process to bind to and listen for connections from applications on this address. If not specified, the module will use the default for your OS distro.
Default value: ['127.0.0.1']
ipv6
Data type: Optional[Boolean]
This setting has to be true to configure MongoDB to turn on ipv6 support. If not specified and ipv6 address is passed to MongoDB bind_ip it will just fail.
Default value: undef
logappend
Data type: Boolean
Set to true to add new entries to the end of the logfile rather than overwriting the content of the log when the process restarts.
Default value: true
system_logrotate
Data type: Optional[String]
Set to reopen for mongo to close a log file then reopen it so that logrotations handled outside of mongo perform as expected.
Default value: undef
fork
Data type: Optional[Boolean]
Set to true to fork server process at launch time. The default setting depends on the operating system.
Default value: undef
port
Data type: Optional[Integer[1, 65535]]
Specifies a TCP port for the server instance to listen for client connections.
Default value: undef
journal
Data type: Optional[Boolean]
Enable or disable the durability journal to ensure data files remain valid and recoverable. Available in MongoDB < 7.0 Default: true on 64-bit systems, false on 32-bit systems
Default value: undef
smallfiles
Data type: Optional[Boolean]
Set to true to modify MongoDB to use a smaller default data file size. Specifically, smallfiles reduces the initial size for data files and limits them to 512 megabytes.
Default value: undef
cpu
Data type: Optional[Boolean]
Set to true to force mongod to report every four seconds CPU utilization and the amount of time that the processor waits for I/O operations to complete (i.e. I/O wait.)
Default value: undef
auth
Data type: Boolean
Set to true to enable database authentication for users connecting from remote hosts. If no users exist, the localhost interface will continue to have access to the database until you create the first user.
Default value: false
verbose
Data type: Optional[Boolean]
Increases the amount of internal reporting returned on standard output or in the log file generated by logpath.
Default value: undef
verbositylevel
Data type: Optional[String]
MongoDB has the following levels of verbosity: v, vv, vvv, vvvv and vvvvv.
Default value: undef
objcheck
Data type: Optional[Boolean]
Forces the mongod to validate all requests from clients upon receipt to ensure that clients never insert invalid documents into the database.
Default value: undef
quota
Data type: Optional[Boolean]
Set to true to enable a maximum limit for the number of data files each database can have. The default quota is 8 data files, when quota is true.
Default value: undef
quotafiles
Data type: Optional[Integer]
Modify limit on the number of data files per database. This option requires the quota setting.
Default value: undef
diaglog
Data type: Optional[Integer[0, 7]]
Creates a very verbose diagnostic log for troubleshooting and recording various errors. For more information please refer to MongoDB Configuration File Options.
Default value: undef
directoryperdb
Data type: Optional[Boolean]
Set to true to modify the storage pattern of the data directory to store each database’s files in a distinct folder.
Default value: undef
profile
Data type: Any
Modify this value to changes the level of database profiling, which inserts information about operation performance into output of mongod or the log file if specified by logpath.
Default value: undef
maxconns
Data type: Optional[Integer]
Specifies a value to set the maximum number of simultaneous connections that MongoDB will accept. Unless set, MongoDB will not limit its own connections.
Default value: undef
oplog_size
Data type: Optional[Integer]
Specifies a maximum size in megabytes for the replication operation log (e.g. oplog.) mongod creates an oplog based on the maximum amount of space available. For 64-bit systems, the oplog is typically 5% of available disk space.
Default value: undef
nohints
Data type: Any
Ignore query hints.
Default value: undef
nohttpinterface
Data type: Optional[Boolean]
Set to true to disable the HTTP interface. This command will override the rest and disable the HTTP interface if you specify both.
Default value: undef
noscripting
Data type: Optional[Boolean]
Set noscripting = true to disable the scripting engine.
Default value: undef
notablescan
Data type: Optional[Boolean]
Set notablescan = true to forbid operations that require a table scan.
Default value: undef
noprealloc
Data type: Optional[Boolean]
Set noprealloc = true to disable the preallocation of data files. This will shorten the start up time in some cases, but can cause significant performance penalties during normal operations.
Default value: undef
nssize
Data type: Optional[Integer]
Use this setting to control the default size for all newly created namespace files (i.e .ns).
Default value: undef
mms_token
Data type: Any
MMS token for mms monitoring.
Default value: undef
mms_name
Data type: Any
MMS identifier for mms monitoring.
Default value: undef
mms_interval
Data type: Any
MMS interval for mms monitoring.
Default value: undef
replset
Data type: Optional[String]
Use this setting to configure replication with replica sets. Specify a replica set name as an argument to this set. All hosts must have the same set name.
Default value: undef
replset_config
Data type: Optional[Hash]
A hash that is used to configure the replica set. Mutually exclusive with replset_members param. class mongodb::server { replset => 'rsmain', replset_config => { 'rsmain' => { ensure => present, settings => { heartbeatTimeoutSecs => 15, getLastErrorModes => { ttmode => { dc => 1 } } }, members => [{'host' => 'host1:27017', 'tags':{ 'dc' : 'east'}}, { 'host' => 'host2:27017'}, 'host3:27017'] }}, }
Default value: undef
replset_members
Data type: Optional[Array]
An array of member hosts for the replica set. Mutually exclusive with replset_config param.
Default value: undef
configsvr
Data type: Optional[Boolean]
Use this setting to enable config server mode for mongod.
Default value: undef
shardsvr
Data type: Optional[Boolean]
Use this setting to enable shard server mode for mongod.
Default value: undef
rest
Data type: Optional[Boolean]
Set to true to enable a simple REST interface.
Default value: undef
quiet
Data type: Optional[Boolean]
Runs the mongod or mongos instance in a quiet mode that attempts to limit the amount of output. This option suppresses : "output from database commands, including drop, dropIndexes, diagLogging, validate, and clean", "replication activity", "connection accepted events" and "connection closed events".
For production systems this option is not recommended as it may make tracking problems during particular connections much more difficult.
Default value: undef
slowms
Data type: Optional[Integer]
Sets the threshold for mongod to consider a query “slow” for the database profiler.
Default value: undef
keyfile
Data type: Optional[Stdlib::Absolutepath]
Specify the path to a key file to store authentication information. This option is only useful for the connection between replica set members.
Default value: undef
key
Data type: Optional[Variant[String[6], Sensitive[String[6]]]]
Specify the key contained within the keyfile. This option is only useful for the connection between replica set members.
Default value: undef
set_parameter
Data type: Optional[Variant[String[1], Array[String[1]], Hash]]
Set MongoDB parameters Supported types: String (i.e. 'textSearchEnabled=true' or 'textSearchEnabled: true' ) Array (i.e. ['textSearchEnabled=true'] or ['textSearchEnabled: true'] ) Hash (i.e. {'textSearchEnabled' => true}
Default value: undef
syslog
Data type: Boolean
Sends all logging output to the host’s syslog system rather than to standard output or a log file.
Default value: false
config_content
Data type: Any
Config content if the default doesn't match one needs.
Default value: undef
config_template
Data type: Optional[String]
Path to the config template if the default doesn't match one needs.
Default value: undef
config_data
Data type: Optional[Hash]
A hash to allow for additional configuration options to be set. (i.e {'security' => { 'javascriptEnabled' => false}})
Default value: undef
tls
Data type: Boolean
Ensure tls is enabled.
Default value: false
tls_key
Data type: Optional[Stdlib::Absolutepath]
Defines the path of the file that contains the TLS/SSL certificate and key.
Default value: undef
tls_ca
Data type: Optional[Stdlib::Absolutepath]
Defines the path of the file that contains the certificate chain for verifying client certificates.
Default value: undef
tls_conn_without_cert
Data type: Optional[Boolean]
Set to true to bypass client certificate validation for clients that do not present a certificate.
Default value: undef
tls_invalid_hostnames
Data type: Optional[Boolean]
Set to true to disable the validation of the hostnames in TLS certificates.
Default value: undef
tls_invalid_certificates
Data type: Optional[Boolean]
Enable or disable the validation checks for TLS certificates on other servers in the cluster and allows the use of invalid certificates to connect.
Default value: undef
tls_mode
Data type: Enum['requireTLS', 'preferTLS', 'allowTLS']
Defines if TLS is used for all network connections. Allowed values are 'requireTLS', 'preferTLS' or 'allowTLS'.
Default value: 'requireTLS'
admin_password_hash
Data type: Optional[Variant[String[1], Sensitive[String[1]]]]
Hashed password. Hex encoded md5 hash of mongodb password.
Default value: undef
restart
Data type: Boolean
Specifies whether the service should be restarted on config changes.
Default value: true
storage_engine
Data type: Optional[String]
Only needed for MongoDB 3.x versions, where it's possible to select the 'wiredTiger' engine in addition to the default 'mmapv1' engine. If not set, the config is left out and mongo will default to 'mmapv1'.
Default value: undef
create_admin
Data type: Boolean
Allows to create admin user for admin database.
Default value: false
admin_username
Data type: String
Administrator user name
Default value: 'admin'
admin_password
Data type: Optional[Variant[String, Sensitive[String]]]
Administrator user password
Default value: undef
admin_auth_mechanism
Data type: Enum['scram_sha_1', 'scram_sha_256']
Administrator authentication mechanism. scram_sha_256 password synchronization verification is not supported.
Default value: 'scram_sha_1'
admin_update_password
Data type: Boolean
Update password. Used with SCRAM-SHA-256 because password verification is not supported.
Default value: false
admin_roles
Data type: Array[String[1]]
Administrator user roles
Default value:
[
'userAdmin', 'readWrite', 'dbAdmin', 'dbAdminAnyDatabase', 'readAnyDatabase',
'readWriteAnyDatabase', 'userAdminAnyDatabase', 'clusterAdmin',
'clusterManager', 'clusterMonitor', 'hostManager', 'root', 'restore',
]
handle_creds
Data type: Boolean
Set this to false to avoid having puppet handle .mongoshrc.js in case you wish to deliver it by other means. This is needed for facts and providers to work if you have auth set to true.
Default value: true
store_creds
Data type: Boolean
Store admin credentials in mongoshrc.js file. Uses with create_admin parameter
Default value: false
mongodb::shardsvr
Wrapper class useful for hiera based deployments
Examples
hieradata
mongodb::shardsvr::shards:
shard01:
keys:
- {x: 1}
members:
- shardhost01.exmaple.com:30000
- shardhost02.exmaple.com:30000
- shardhost03.exmaple.com:30000
Parameters
The following parameters are available in the mongodb::shardsvr
class:
shards
Data type: Any
Hash of attributes as described in the mongodb_shardsvr custom type
Default value: undef
Defined types
mongodb::db
Class for creating mongodb databases and users.
Parameters
The following parameters are available in the mongodb::db
defined type:
user
Data type: String
Database username.
auth_mechanism
Data type: Enum['scram_sha_1', 'scram_sha_256']
Authentication mechanism. scram_sha_256 password verification is not supported. Defaults to 'scram_sha_1'.
Default value: 'scram_sha_1'
db_name
Data type: String
Database name. Defaults to $name.
Default value: $name
password_hash
Data type: Optional[Variant[String[1], Sensitive[String[1]]]]
Hashed password. Hex encoded md5 hash of "$username:mongo:$password".
Default value: undef
password
Data type: Optional[Variant[String[1], Sensitive[String[1]]]]
Plain text user password. This is UNSAFE, use 'password_hash' instead.
Default value: undef
roles
Data type: Array[String]
Array with user roles. Deaults to ['dbAdmin']
Default value: ['dbAdmin']
tries
Data type: Integer[0]
The maximum amount of two second tries to wait MongoDB startup. Defaults to 10.
Default value: 10
update_password
Data type: Boolean
Force an update of the password when scram_sha_256 is used. Defaults to false.
Default value: false
Resource types
mongodb_conn_validator
Verify that a connection can be successfully established between a node and the mongodb server. Its primary use is as a precondition to prevent configuration changes from being applied if the mongodb server cannot be reached, but it could potentially be used for other purposes such as monitoring.
Properties
The following properties are available in the mongodb_conn_validator
type.
ensure
Valid values: present
, absent
Ensure to verify the connection to mongodb
Default value: present
Parameters
The following parameters are available in the mongodb_conn_validator
type.
name
namevar
An arbitrary name used as the identity of the resource. It can also be the connection string to test (ie. 127.0.0.1:27017)
port
The port that the mongodb server should be listening on.
Default value: 27017
provider
The specific backend to use for this mongodb_conn_validator
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
server
An array containing DNS names or IP addresses of the server where mongodb should be running.
Default value: 127.0.0.1
timeout
The max number of seconds that the validator should wait before giving up and deciding that puppetdb is not running; defaults to 60 seconds.
Default value: 60
mongodb_database
Manage MongoDB databases.
Properties
The following properties are available in the mongodb_database
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Parameters
The following parameters are available in the mongodb_database
type.
name
Valid values: %r{^[\w-]+$}
namevar
The name of the database.
provider
The specific backend to use for this mongodb_database
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
tries
Valid values: %r{^\d+$}
The maximum amount of two second tries to wait MongoDB startup.
Default value: 10
mongodb_replset
Manage a MongoDB replicaSet
Properties
The following properties are available in the mongodb_replset
type.
ensure
Valid values: present
Ensure the replicaset is either present or absent
Default value: present
members
The replicaSet members config
settings
The replicaSet settings config
Parameters
The following parameters are available in the mongodb_replset
type.
arbiter
The replicaSet arbiter
initialize_host
Host to use for Replicaset initialization
Default value: 127.0.0.1
name
namevar
The name of the replicaSet
provider
The specific backend to use for this mongodb_replset
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
mongodb_shard
Manage a MongoDB Shard
Properties
The following properties are available in the mongodb_shard
type.
ensure
Valid values: present
Ensure the shard is either present or absent
Default value: present
keys
The sharding keys
member
The shard member
Parameters
The following parameters are available in the mongodb_shard
type.
name
namevar
The name of the shard
provider
The specific backend to use for this mongodb_shard
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
mongodb_user
Manage a MongoDB user. This includes management of users password as well as privileges.
Properties
The following properties are available in the mongodb_user
type.
database
Valid values: %r{^[\w-]+$}
The user's target database.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
password
The plaintext password of the user.
password_hash
Valid values: %r{^\w+$}
The password hash of the user. Use mongodb_password() for creating hash. Only available on MongoDB 3.0 and later. SCRAM-SHA-256 authentication mechanism is not supported.
roles
Valid values: %r{^\w+(@\w+)?$}
The user's roles.
Default value: ['dbAdmin']
scram_credentials
The SCRAM-SHA-1 credentials of a user. These are read only and change when password or password_hash changes.
username
The name of the user.
Parameters
The following parameters are available in the mongodb_user
type.
auth_mechanism
Valid values: scram_sha_256
, scram_sha_1
Authentication mechanism. Password verification is not supported with SCRAM-SHA-256.
Default value: scram_sha_1
name
namevar
The name of the resource.
provider
The specific backend to use for this mongodb_user
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
tries
Valid values: %r{^\d+$}
The maximum amount of two second tries to wait MongoDB startup.
Default value: 10
update_password
Update password. Used with SCRAM-SHA-256 because password verification is not supported.
Default value: false
Functions
mongodb_password
Type: Ruby 4.x API
Get the mongodb password hash from the clear text password.
mongodb_password(String[1] $username, Variant[String[1], Sensitive[String[1]]] $password, Optional[Boolean] $sensitive)
Get the mongodb password hash from the clear text password.
Returns: Variant[String, Sensitive[String]]
username
Data type: String[1]
password
Data type: Variant[String[1], Sensitive[String[1]]]
sensitive
Data type: Optional[Boolean]
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v6.0.1 (2024-05-07)
Fixed bugs:
- Wrong "pidFilePath:" setting in
/etc/mongodb.conf
on Debian #647 - Backslashes in a password need to be escaped #760 (stevenpost)
Closed issues:
- Roadmap to get this module in better shape #696
v6.0.0 (2024-04-29)
Breaking changes:
- Remove nojournal parameter; Cleanup journal management #730 (h-haaks)
- Provider cleanup #723 (stevenpost)
- Set default redhat dbpath to /var/lib/mongo #718 (h-haaks)
- Use keyring for apt repository; update dependency versions #713 (h-haaks)
- Move params to classes and hiera; Align defaults with supported versions #712 (h-haaks)
Implemented enhancements:
- update puppet-systemd upper bound to 8.0.0 #756 (TheMeier)
- Add OracleLinux support #748 (bastelfreak)
- Add Rocky and AlmaLinux support #745 (h-haaks)
- feat: Add tls_invalid_certificates argument #742 (jouir)
- Use proper yaml for the mongod config #740 (h-haaks)
- Add RedHat/CentOS 9 support #738 (h-haaks)
- Add Debian 12 support #736 (h-haaks)
- Add mongodb 6.0 and 7.0 to acceptance testing #728 (h-haaks)
- Use the mongosh command instead of the old mongo command #703 (stevenpost)
- Add Ubuntu 22.04 support #694 (zilchms)
Fixed bugs:
- Full support for mongo 5.x on RedHat/CentOS #629
- Fix typo in is_master fact #751 (h-haaks)
- Fix replset and sharding integration tests #743 (h-haaks)
Closed issues:
- Typo in is_master fact #750
- Subsequent puppet runs fail on unauthenticated replicasets #731
- Default location for database files on RHEL variants is /var/lib/mongo #714
- Puppet 8x compatibility #684
- Stdlib IP Address Variable #674
- removed mongo cli in 6.0 is not compatible with outputs from new mongosh #648
- rs.initiate() fails due to duplicated replicaset alive members #565
Merged pull requests:
- Remove unsupported mongodb 4.4 from test matrix #758 (h-haaks)
- Link metadata for tested Oses #755 (h-haaks)
- Support for pure yaml in is_master.rb #741 (h-haaks)
- Remove the retry mechanism from the provider #739 (stevenpost)
- Various documentation fixes #733 (stevenpost)
- Use ensure pruned to remove packages in acceptance tests #727 (h-haaks)
- Provider cleanup (safe part) #726 (stevenpost)
- Prefer connecting over localhost when possible #725 (stevenpost)
- Remove unused parameter #724 (stevenpost)
- Documentation update #722 (stevenpost)
- Support Suse enterprise repository #719 (h-haaks)
- Test supported repo versions with gha #716 (h-haaks)
- Debian 10 support should not be dropped yet #711 (h-haaks)
- Remove old version from template name #710 (stevenpost)
- Move documentation from README into the manifests #709 (stevenpost)
- Provider cleanup part2 #706 (stevenpost)
v5.0.0 (2024-03-19)
Breaking changes:
- Drop Debian 10 support #704 (h-haaks)
- Use mongodb repo by default; require repo version >= 4.4 #699 (h-haaks)
- Drop Ubuntu 18.04 support #693 (zilchms)
- Drop EoL Puppet 6 #672 (traylenator)
- Drop EoL Debian 9 #671 (traylenator)
- Drop Puppet 6 support #669 (bastelfreak)
Implemented enhancements:
- add redhat8, centos8 and debian11 support #702 (h-haaks)
- Provider cleanup #701 (stevenpost)
- Mongos as systemd service #698 (h-haaks)
- puppetlabs/apt: Allow 9.x #692 (zilchms)
- bump systemd: \< 7.0.0 #687 (sandwitch)
- Set version defaults with hiera data #685 (traylenator)
- Add Puppet 8 support #676 (bastelfreak)
- puppetlabs/stdlib: Allow 9.x #675 (bastelfreak)
- bump puppet/systemd to \< 5.0.0 #665 (jhoblitt)
- New server::admin_password_hash parameter #659 (traylenator)
Fixed bugs:
- Extra json on mongo output causing provider 'mongodb': 783: unexpected token at '{ #680
- add docs, doc stubs and descriptions to fix validate warnings #690 (zilchms)
- Remove extra line causing errors: "Started a new thread for the timer service" #681 (xepa)
- Catch errors on database creation or destroy #663 (JvGinkel)
v4.2.0 (2022-12-07)
Implemented enhancements:
Fixed bugs:
- Auth in mongod 3.6 #437
- mongodb_user ignores
database
parameter when removing a user #644 (SeanHood) - Fix ReplicaSet with Auth creation (new error message to handle) #632 (BDelacour)
v4.1.1 (2022-03-12)
Fixed bugs:
Closed issues:
mongodb::repo
is always include for some family #636
v4.1.0 (2021-10-28)
Implemented enhancements:
Fixed bugs:
Closed issues:
- Fails to install on Ubuntu 20.04 #627
- Missing key for Apt for installing 5.0 mongo #614
- Error: Could not prefetch mongodb_replset provider 'mongo': 765: unexpected token at 'WARNING: ) is deprecated and may be removed in the next major release. Please use secondaryOk() #612
- 4.x version. Initialization of replset and user creation problem. #583
v4.0.0 (2021-09-03)
Breaking changes:
- Drop Puppet 5/Add puppet 7 support #617 (root-expert)
- Drop Ubuntu 16/Add Ubuntu 20 support #616 (root-expert)
Implemented enhancements:
- Support managing selinux #413
- Add Debian 10 support #619 (root-expert)
- Use Puppet-Datatype Sensitive for Passwords #611 (cocker-cc)
- Change set_parameter to be an array of strings #595 (ZloeSabo)
- Use rs.secondaryOk on versions that deprecated rs.slaveOk #594 (svenbs)
- Add MongoDB 4.4 repository signing key. #592 (dhs-rec)
Fixed bugs:
- Existence of /root/.mongorc.js triggers mongod restart #449
- Fix MongoDB installation on RedHat family #606 (hdep)
- Update mongodb-shard.conf.erb #591 (andreish)
- Fix mongorc.js file when authentication is not enabled. #590 (vladpetrus)
- Fix digestPassword typo mongodb.rb #589 (covidium)
Closed issues:
- MongoDB 4.2.10 starts to emit warnings about slaveOk() being deprecated, which breaks the module #596
- Can't use mongodb repository on debian 9 #529
Merged pull requests:
- puppet-lint: fix top_scope_facts warnings #621 (bastelfreak)
- Allow stdlib 8.x and apt 8.x #620 (smortex)
- modulesync 3.0.0 & puppet-lint updates #586 (bastelfreak)
- Describe disabling logpath to make syslog work #585 (lennartkoopmann)
- Use voxpupuli-acceptance #580 (ekohl)
v3.1.0 (2020-02-11)
Implemented enhancements:
- restrict opsmanager conf file permissions for better security #563 (FLiPp3r90)
- rebased PR#308 to allow other databases in the format 'role@db' for mongodb_user #432 (pecharmin)
Fixed bugs:
- Wrong APT-key #546
- Mongo 4.0.x: unable to create user #525
- user creation idempotency issues #412
- fix(is_master-fact): use --ssl if --sslPEMKeyFile or --sslCAFile is s… #573 (buchstabensalat)
- Fixed the problem: the user was not created for Mongodb 4.x #561 (identw)
- Only create database and user when mongodb_is_master #558 (JvGinkel)
Closed issues:
- mongo 3.x replicaset init failed #554
Merged pull requests:
v3.0.0 (2019-05-21)
Breaking changes:
- modulesync 2.7.0 and drop puppet 4 #533 (bastelfreak)
- Refactor client handling #520 (ekohl)
- Refactor mongos handling #509 (ekohl)
- Drop support for mongodb versions before 2.6 #504 (ekohl)
- Drop EL6 support #503 (ekohl)
- Remove 10gen repository support #497 (ekohl)
- Move to Debian 9 and Ubuntu 16.04/18.04 #494 (ekohl)
- Remove init.pp #493 (ekohl)
Implemented enhancements:
- Deprecate (and then remove) 10gen requirement/pieces #416
- support percona mongodb version output #530 (h0tw1r3)
- Add aptkey_options parameter to mongodb::repo class #524 (JvGinkel)
- Set database permissions to 0750 #511 (ekohl)
- Convert mongodb_password into a Puppet 4 function #502 (ekohl)
- Add new classes for installing Ops Manager on a target machine. #500 (claycogg)
Fixed bugs:
- Fix undefined local variable or method `n' #537 (FunFR)
- Fix for MongoDB v4 Replica Set initialization #535 (radupantiru)
- Fix a dependency cycle caused by Apt::Source from puppetlabs-apt 6.3.0 #528 (thaiphv)
Merged pull requests:
- Allow
puppetlabs/stdlib
6.x #538 (alexjfisher) - Allow puppetlabs/apt 7.x #536 (dhoppe)
- #512: Current 'sharding.pp' example typo #513 (jeff1evesque)
- Remove old nodesets #510 (ekohl)
- Refactor mongos handling #508 (ekohl)
- Deduplicate & update params.pp #506 (ekohl)
- Clean up coding styles #505 (ekohl)
- Rewrite mocking and stubbing to only rspec #496 (ekohl)
- Refactor spec testing to not test private classes #495 (ekohl)
- Major cleanup to get the acceptance tests working #491 (ekohl)
v2.4.1 (2018-10-08)
Fixed bugs:
- Revert "Fallback to monogb version from fact if no explicit version got provided" #498 (ekohl)
- Also autorequire mongod service in types #492 (ekohl)
Closed issues:
- invalid byte sequence in US-ASCII #426
v2.4.0 (2018-10-05)
Fixed bugs:
Merged pull requests:
- modulesync 2.1.0, allow puppet 6.x and puppetlabs/apt 6.x #490 (bastelfreak)
- allow puppetlabs/stdlib 5.x #484 (bastelfreak)
- add gsub to replace invalid json values with a 1 #468 (TomRitserveldt)
- add rs.slaveOk to run before the getDBs call #446 (TomRitserveldt)
v2.3.0 (2018-08-20)
Implemented enhancements:
Merged pull requests:
- allow puppetlabs/apt 5.x #481 (bastelfreak)
v2.2.2 (2018-07-16)
Fixed bugs:
- Could not find scope for mongodb::params #428
- Fix a circular loading issue with mongodb::repo #474 (ekohl)
v2.2.1 (2018-06-25)
Fixed bugs:
- Undefined method 'get_config_options' in is_master.rb #471
- Use the correct function in is_master fact #472 (ekohl)
v2.2.0 (2018-06-16)
Implemented enhancements:
- Repo for version 3.6 is using wrong key. #465
- This will add the correct apt key for version 3.6. #466 (noni73)
Fixed bugs:
Merged pull requests:
- Remove docker nodesets #463 (bastelfreak)
- drop EOL OSs; fix puppet version range #462 (bastelfreak)
v2.1.2 (2018-03-28)
Fixed bugs:
- Notice on every run for password_hash #425
- Add check if scram credentials are insync with hash #455 (ctrox)
v2.1.1 (2018-03-27)
Fixed bugs:
Closed issues:
- Fact "mongodb_is_master" fails on mongodb clients #441
Merged pull requests:
- bump puppet to latest supported version 4.10.0 #452 (bastelfreak)
v2.1.0 (2018-02-27)
Implemented enhancements:
Fixed bugs:
- Fixed changing user password with MongoDB 2.6 #442 (webcompas)
- Fix password changing issue voxpupuli/puppet-mongodb#438 #440 (webcompas)
- Add a retry block when hosts are added to replset #436 (pkilambi)
Closed issues:
- Changing a user's password doesn't work #438
v2.0.0 (2018-01-04)
Breaking changes:
Implemented enhancements:
Fixed bugs:
- apt-transport-https required on Ubuntu when installing version >= 3.0.0. #417
- Fix compilation failures on RHEL when
manage_package => true
#431 (fatmcgav)
Closed issues:
- "Unknown variable 'mongodb::params::journal'" error when 'manage_package => true' #430
- package version override broken with yum #415
- create admin and repl set fail with password #414
- 10gen repo handling doesn't work #101
Merged pull requests:
- Set types for mongodb::db #421 (ekohl)
- Allow bind_ip to be an IP or array of IPs. Add data types for a coupl… #411 (wyardley)
- Some minor initial fixes for acceptance tests #409 (wyardley)
- Use raise Puppet::Error instead of Puppet.fail() #408 (wyardley)
- fix for rubocop issues introduced in 9e2c #407 (wyardley)
- Autorequire mongodb_database for mongodb_user #394 (ekohl)
- Set dbpath_fix to false by default #347 (mwhahaha)
- Fixed: create database admin only if service_ensure is true. #240 (pcheliniy)
v1.1.0 (2017-10-20)
Implemented enhancements:
- Allow user-supplied configuration data #389 (blackophelia)
- MODULES-5483: Auth and FQDN certs => Fail #369 (ThoTischner)
Fixed bugs:
- Fix password on admin db #393 (benohara)
- fix issue MODULES-5545 #390 (bovy89)
- mongodb no longer provides the stable link #361 (attachmentgenie)
Closed issues:
- Can't change dbpath on Debian Stretch / Puppet5 with Hiera #398
Merged pull requests:
- Release 1.1.0 #403 (wyardley)
- correct spelling mistake #395 (EdwardBetts)
- (maint) modulesync 915cde70e20 #388 (glennsarti)
- (MODULES-5187) mysnc puppet 5 and ruby 2.4 #387 (eputnam)
- Update README.md #386 (LasseRafn)
- Release 1.0.0 mergeback #384 (eputnam)
- Only check if master if mongod installed #314 (benohara)
1.0.0 (2017-06-30)
Summary
Major release removing Puppet 3 support.
Added
ssl_weak_cert
param inmongodb::server
typesystem_logrotate
param inmongodb
,mongodb::server
, andmongodb::server::config
handle_creds
to handle credentials outside of Puppet (MODULES-1754)sslMode
when SSL is used- ability to use unencrypted passwords
Changed
- lower bound of Puppet requirement to 4.7.0
- use of
sslMode
tosslOnNormalPorts
to determine if SSL is enabled
Fixed
database
property inmongodb_user
to allow hyphens (MODULES-4444)- gsub pattern for
is_master
fact mongodb_version
fact- selinux dbpath contexts in
mongodb::server::config
- Debian-based repo paths
$pidfilepath
for Debian- syntax error in net.ipv6 configuration option
- spec failure caused by Puppet 5
- is_master in mongodb provider
Unsupported Release 0.17.0
Summary
Adding features to improve spec testing, and added ability to manage pidfile creation
Fixed
- gettext and spec.opts
- msync Gemfile for 1.0 frozen strings (MODULES-3631)
- MongoDB 3.12 creates pid file and checks in init script (MODULES-3956)
- gemfile template to be identical (MODULES-3704)
- deprecation errors
Unsupported Release 0.16.0
Summary
We fixed a critical bug where we lost idempotency in 0.15.0. The patch that fix this problem will be part of this release.
Fixed
- Recursively manage only user/group for dbpath
Unsupported Release 0.15.0
Summary
The addition of several new functional features which will help with management and multiple bug fixes.
Added
- Added ability to set PID file mode.
- Recursively manage the contents of dbpath directory.
- Now alllows custom templates.
- Addition of mongo listen port before creating facter.
Fixed
- Now allows hyphens in database names.
- Now converts MongoDB ObjectID objects to generic JSON.
- Use the same regex that the mongodb provider does when correcting for ObjectID values in the isMaster response.
- Fixes to ensure that the auth property for config is parsed correctly.
- Now checks if mongo is up before evaluating is_master fact.
Unsupported Release 0.14.0
Summary
This breaking release increases the lower bound of the puppetlabs-apt dependency to the 2.x series of apt and puppetlabs-stdlib to >= 4.4.0. The operating system metadata is also updated to reflect modern systems.
Added
- Add
mongodb_is_master
fact - Add
mongodb::db::db_name
parameter for exported resource deduplication - Add Debian 8 compatibility
- Add Ubuntu 14.04 compatibility
- Add Ubuntu 16.04 compatibility
- Add puppet 3.x 4.x compatibility metadata
Changed
- Increase apt lower dependency to >= 2.1.0
- Increase stdlib lower dependency to >= 4.4.0
- Drop RHEL & Centos 5
- Drop Debian 6
- Drop Ubuntu 10.04
Fixed
- Catch unconfigured replset configuration queries
- Fix timestamp and other javascript object removal
- Correct permissions on .mongorc.js to 600
Unsupported Release 0.13.0
Summary
Adds several new large features, including the support of mongodb 3.x. Also applies numerous bugfixes, mainly around fixing errors being thrown and syntax issues.
Added
- Adds mongodb_version fact.
- Add mongodb 3.x.
- Update to current msync configs.
- Now ensures that the pidfile exists and is writable.
- Simplified configuration parsing.
- Made argument handling more extensible.
- Added SSL support.
- Made ssl_ca optional when using SSL.
- Added $maxconns to mongodb::server::config.
- Added Suse to operating systems.
Fixed
- Removes empty lines between doc and definition.
- Fix when using admin params : catalog: Found 1 dependency cycle: issue.
- Some syntax error fixes.
- Cleaned up provider formatting.
- Parse NumberLong data type from mongodb outputs to generate valid json.
- Checks if $version is defined before versioncmp.
- Fixed deprecation warning for use of configtimeout.
Unsupported Release 0.12.0
Summary
There are a number of bugfixes and features added in this release including, mongo db 3 engine support, ipv6 support and repo and yum improvements.
Added
- Distinguish between repo and package mgmt
- Immplement retries for MongoDB shell commands
- Initiate replica set creation from localhost if auth is enabled
- Added specific service provider for Debian
- mongo db 3 engine selection support
- added an option to set a custom repository location
- Improve support for MongoDB authentication and replicaset
- Add yum proxy options
- Enable IPv6 in mongodb provider
Fixed
- Fix mongodb_user username => name
- ensure that the client install does not start before the repo setup
- Fix replset not working on mongo 3.x
- Prealloc setting needs to be negated
- Add mongoDB >=3.x new yum repo location
- Add pidfilepath to globals when used in params
- Normalize spacing in template
- Switch to comparing current roles value with @property
- Fix versioncmp when version is undef
- Do not add blank parameter in ipv4
- Apply module sync
Unsupported Release 0.11.0
Summary
Added
- arbiter support to to
mongodb_replset
mongod_service_manage
,mongos_service_manage
, andipv6
tomongodb::globals
service_manage
,unitxsocketprefix
,pidfilepath
,logpath
,fork
,bind_ip
,port
, andrestart
tomongodb::mongos
classkey
,ipv6
,service_manage
, andrestart
tomongodb::server
class- Allow mongodb_conn_validator to take an array of nodes via composite namevar
Fixed
- Update to long apt repo key and bump compatibility to include apt 2
- Fix
nohttpinterface
on >= 2.6 - Fix connection validation when bind_ip is 0.0.0.0
- Fix mongodb_conn_validator to use default port in shard mode
Unsupported Release 0.10.0
Summary
This release adds a number of significant features and several bug fixes.
Added
- Adds support for sharding
- Adds support for RHEL 7
- Adds rudimentary support for SSL configuration
- Adds support for the enterprise repository
Fixed
- Fixes support for running on non-default ports
- Fixes the idempotency of password setting (for mongo 2.6)
Unsupported Release 0.9.0
Summary
This release has a number of new parameters, support for 2.6, improved providers, and several bugfixes.
Added
- New parameters:
mongodb::globals
$service_ensure
$service_enable
- New parameters:
mongodb
$quiet
- New parameters:
mongodb::server
$service_ensure
$service_enable
$quiet
$config_content
- Support for mongodb 2.6
- Reimplement
mongodb_user
andmongodb_database
provider - Added
mongodb_conn_validator
type
Fixed
- Use hkp for the apt keyserver
- Fix mongodb database existence check
- Fix
$server_package_name
problem (MODULES-690) - Make sure
pidfilepath
doesn't have any spaces - Providers need the client command before they can work (MODULES-1285)
Unsupported Release 0.8.0
Summary
This feature features a rewritten mongodb_replset{} provider, includes several important bugfixes, ruby 1.8 support, and two new features.
Added
- Rewritten mongodb_replset{}, featuring puppet resource support, prefetching, and flushing.
- Add Ruby 1.8 compatibility.
- Adds
syslog
, allowing you to configure mongodb to send all logging to the hosts syslog. - Add mongodb::replset, a wrapper class for hiera users.
- Improved testing!
Fixed
- Fixes the package names to work since 10gen renamed them again.
- Fix provider name in the README.
- Disallow
nojournal
andjournal
to be set at the same time. - Changed - to = for versioned install on Ubuntu.
Unsupported Release 0.7.0
Summary
Added Replica Set Type and Provider
Unsupported Release 0.6.0
Summary
Added support for installing MongoDB client on RHEL family systems.
Unsupported Release 0.5.0
Summary
Added types for providers for Mongo users and databases.
Unsupported Release 0.4.0
Major refactoring of the MongoDB module. Includes a new 'mongodb::globals' that consolidates many shared parameters into one location. This is an API-breaking release in anticipation of a 1.0 release.
Unsupported Release 0.3.0
Summary
Adds a number of parameters and fixes some platform specific bugs in module deployment.
Unsupported Release 0.2.0
Summary
This release fixes a duplicate parameter.
Fixed
- Fix a duplicated parameter.
Unsupported Release 0.1.0
- Add support for RHEL/CentOS
- Change default mongodb install location to OS repo
Unsupported Release 0.0.2
- Fix Modulefile typo.
- Remove repo pin.
- Update spec tests and add travis support.
Unsupported Release 0.0.1
- Initial Release.
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/apt (>= 9.2.0 < 10.0.0)
- puppetlabs/stdlib (>= 9.0.0 < 10.0.0)
- puppet/systemd (>= 5.1.0 < 8.0.0)
- puppet/zypprepo (>= 5.0.0 < 6.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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.