Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,13 @@
ensure => file,
content => template('couchdb/local.ini.erb'),
}

# If uuid is missing from the config (as in the above local.ini template),
# couchdb will write the uuid in the last-read config file upon (re)start.
# Usually, that means puppet is going to replace the local.ini again because
# it changed. Therefore we provide this special workaround config file.
file { "${couchdb::couchdb_conf_dir}/local.d/zzz-uuid.ini":
replace => no,
content => '[couchdb]',
}
}
13 changes: 11 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#
# [*log_level_local*] - info
#
# [*manage_epel_repo*] - true ; set to false if you are managing Yumrepo['epel'] elsewhere
#
# [*max_attachment_chunk_size*] - 4294967296 ;4GB
#
# [*max_connections*] - 2048
Expand All @@ -28,6 +30,8 @@
#
# [*os_process_timeout*] - 5000 ; 5 seconds. for view and external servers.
#
# [*package_ensure*] - present ; control couchdb package version
#
# [*port*] - 5984
#
# [*require_valid_user*] - If you set this to true, you should also uncomment the WWW-Authenticate
Expand All @@ -45,7 +49,7 @@
#
#
# === Requires:
# metcalfc-rpmrepos - https://github.com/metcalfc/puppet-rpmrepos
# metcalfc-rpmrepos - https://github.com/metcalfc/puppet-rpmrepos ; unless $manage_epel_repo is false
#
# Packaged couchdb
# - RHEL/CentOS: EPEL
Expand Down Expand Up @@ -88,11 +92,13 @@
$log_file = '/var/log/couchdb/couch.log',
$log_level = 'info',
$log_max_chunk_size = '1000000',
$manage_epel_repo = true,
$max_attachment_chunk_size = '4294967296 ;4GB',
$max_connections = '2048',
$max_dbs_open = '100',
$max_document_size = '4294967296',
$os_process_timeout = '5000 ; 5 seconds. for view and external servers.',
$package_ensure = 'present',
$port = '5984',
$reduce_limit = true,
$require_valid_user = false,
Expand All @@ -106,7 +112,10 @@
) {

include couchdb::params
include rpmrepos::epel

if $manage_epel_repo == true {
include rpmrepos::epel
}

class { 'couchdb::package':
notify => Class['couchdb::service'],
Expand Down
9 changes: 7 additions & 2 deletions manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

class couchdb::package {
package { 'couchdb':
ensure => installed,
require => Yumrepo['epel'],
ensure => $::couchdb::package_ensure,
}

if $::couchdb::manage_epel_repo {
Package['couchdb'] {
require +> Yumrepo['epel'],
}
}
}