summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-04-25 16:41:34 -0300
committervarac <varacanero@zeromail.org>2016-04-25 16:41:34 -0300
commit07f8cf9c307471128eef1ded3a77633869c89bcd (patch)
tree22705e582bb300936db0fb343402011b704f9596 /puppet/modules/site_couchdb
parent2c5d27327bc1a90f5813e55a40d0acac644a13eb (diff)
parentf2f2c7391056c252523730cd76ab759db9117c9c (diff)
Merge branch 'linting' into develop
Diffstat (limited to 'puppet/modules/site_couchdb')
-rw-r--r--puppet/modules/site_couchdb/manifests/logrotate.pp10
-rw-r--r--puppet/modules/site_couchdb/manifests/mirror.pp19
-rw-r--r--puppet/modules/site_couchdb/manifests/upload_design.pp3
3 files changed, 18 insertions, 14 deletions
diff --git a/puppet/modules/site_couchdb/manifests/logrotate.pp b/puppet/modules/site_couchdb/manifests/logrotate.pp
index e1039d49..bb8843bb 100644
--- a/puppet/modules/site_couchdb/manifests/logrotate.pp
+++ b/puppet/modules/site_couchdb/manifests/logrotate.pp
@@ -1,12 +1,14 @@
+# configure couchdb logrotation
class site_couchdb::logrotate {
augeas {
'logrotate_bigcouch':
context => '/files/etc/logrotate.d/bigcouch/rule',
- changes => [ 'set file /opt/bigcouch/var/log/*.log', 'set rotate 7',
- 'set schedule daily', 'set compress compress',
- 'set missingok missingok', 'set ifempty notifempty',
- 'set copytruncate copytruncate' ]
+ changes => [
+ 'set file /opt/bigcouch/var/log/*.log', 'set rotate 7',
+ 'set schedule daily', 'set compress compress',
+ 'set missingok missingok', 'set ifempty notifempty',
+ 'set copytruncate copytruncate' ]
}
}
diff --git a/puppet/modules/site_couchdb/manifests/mirror.pp b/puppet/modules/site_couchdb/manifests/mirror.pp
index abe35c4c..fb82b897 100644
--- a/puppet/modules/site_couchdb/manifests/mirror.pp
+++ b/puppet/modules/site_couchdb/manifests/mirror.pp
@@ -1,3 +1,4 @@
+# configure mirroring of couch nodes
class site_couchdb::mirror {
Class['site_couchdb::add_users']
@@ -22,55 +23,55 @@ class site_couchdb::mirror {
### customer database
couchdb::mirror_db { 'customers':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
## identities database
couchdb::mirror_db { 'identities':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
## keycache database
couchdb::mirror_db { 'keycache':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
## sessions database
couchdb::mirror_db { 'sessions':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
## shared database
couchdb::mirror_db { 'shared':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
## tickets database
couchdb::mirror_db { 'tickets':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
## tokens database
couchdb::mirror_db { 'tokens':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
## users database
couchdb::mirror_db { 'users':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
## messages db
couchdb::mirror_db { 'messages':
- from => $from,
+ from => $from,
require => Couchdb::Query::Setup['localhost']
}
diff --git a/puppet/modules/site_couchdb/manifests/upload_design.pp b/puppet/modules/site_couchdb/manifests/upload_design.pp
index 7b0cabd7..bd73ebf2 100644
--- a/puppet/modules/site_couchdb/manifests/upload_design.pp
+++ b/puppet/modules/site_couchdb/manifests/upload_design.pp
@@ -1,4 +1,5 @@
-define site_couchdb::upload_design($db = $title, $design) {
+# upload a design doc to a db
+define site_couchdb::upload_design($design, $db = $title) {
$design_name = regsubst($design, '^.*\/(.*)\.json$', '\1')
$id = "_design/${design_name}"
$file = "/srv/leap/couchdb/designs/${design}"