summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2013-11-20 12:10:52 -0500
committerMicah Anderson <micah@leap.se>2013-11-28 09:54:20 -0500
commitbf563b722126c0e6ae1d8f2f830be03e006664a1 (patch)
tree0fec743276aa8e244a7b430305e13838c4ab8b0d /puppet
parent27b084fbb61ea036a45970f1b0c5a8f8175f96e8 (diff)
setup customer couchdb database
Change-Id: Ic0e9f5f6a1f28d865d7757a9de0d9399a6a9a5e3 Conflicts: puppet/modules/site_couchdb/manifests/init.pp
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_couchdb/manifests/create_dbs.pp7
-rw-r--r--puppet/modules/site_couchdb/manifests/init.pp13
2 files changed, 13 insertions, 7 deletions
diff --git a/puppet/modules/site_couchdb/manifests/create_dbs.pp b/puppet/modules/site_couchdb/manifests/create_dbs.pp
index f53597e7..f206fddb 100644
--- a/puppet/modules/site_couchdb/manifests/create_dbs.pp
+++ b/puppet/modules/site_couchdb/manifests/create_dbs.pp
@@ -2,6 +2,13 @@ class site_couchdb::create_dbs {
# Couchdb databases
+ ### customer database
+ ### r/w: webapp,
+ couchdb::create_db { 'customer':
+ members => "{ \"names\": [\"$site_couchdb::couchdb_webapp_user\"], \"roles\": [] }",
+ require => Couchdb::Query::Setup['localhost']
+ }
+
## identities database
## r: nickserver, leap_mx - needs to be restrict with design document
## r/w: webapp
diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp
index 1933f01b..ad0c996a 100644
--- a/puppet/modules/site_couchdb/manifests/init.pp
+++ b/puppet/modules/site_couchdb/manifests/init.pp
@@ -70,14 +70,13 @@ class site_couchdb {
# we symlink this to /root/.netrc for couchdb_scripts (eg. backup)
# and makes life easier for the admin (i.e. using curl/wget without
# passing credentials)
- file { '/root/.netrc':
- ensure => link,
- target => '/etc/couchdb/couchdb.netrc',
- require => Couchdb::Query::Setup['localhost']
- }
+ file {
+ '/root/.netrc':
+ ensure => link,
+ target => '/etc/couchdb/couchdb.netrc';
- file { '/srv/leap/couchdb':
- ensure => directory
+ '/srv/leap/couchdb':
+ ensure => directory
}
couchdb::query::setup { 'localhost':