summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2014-06-23 21:50:50 +0200
committerelijah <elijah@riseup.net>2014-06-25 18:17:39 -0700
commit813f840cceb284c38dcedea1577d125e62e280f0 (patch)
tree140a8ff24a61ec8a1be28d87fce3b1728cf711c6
parent5075fdeee3c8b70d39a2f6105d8e1e33c6843eb4 (diff)
hand replication credentials to tapicero
-rw-r--r--provider_base/services/_couchdb_mirror.json7
-rw-r--r--puppet/modules/tapicero/manifests/init.pp3
-rw-r--r--puppet/modules/tapicero/templates/tapicero.yaml.erb3
3 files changed, 9 insertions, 4 deletions
diff --git a/provider_base/services/_couchdb_mirror.json b/provider_base/services/_couchdb_mirror.json
index a496804d..6a3402bd 100644
--- a/provider_base/services/_couchdb_mirror.json
+++ b/provider_base/services/_couchdb_mirror.json
@@ -12,7 +12,10 @@
"replication": {
// for now, pick the first close one, or the first one.
// in the future, maybe use haproxy to balance among all the masters
- "masters": "= try{pick_node(:couch_master,nodes_near_me['services' => 'couchdb']['couch.master' => true]).pick_fields('domain.internal', 'couch.port')} || try{pick_node(:couch_master,nodes_like_me['services' => 'couchdb']['couch.master' => true]).pick_fields('domain.internal', 'couch.port')}"
+ "masters": "= try{pick_node(:couch_master,nodes_near_me['services' => 'couchdb']['couch.master' => true]).pick_fields('domain.internal', 'couch.port')} || try{pick_node(:couch_master,nodes_like_me['services' => 'couchdb']['couch.master' => true]).pick_fields('domain.internal', 'couch.port')}",
+ "username": "replication",
+ "password": "= secret :couch_replication_password",
+ "role": "replication"
}
}
-} \ No newline at end of file
+}
diff --git a/puppet/modules/tapicero/manifests/init.pp b/puppet/modules/tapicero/manifests/init.pp
index 1db75eb0..fd8c1344 100644
--- a/puppet/modules/tapicero/manifests/init.pp
+++ b/puppet/modules/tapicero/manifests/init.pp
@@ -12,7 +12,8 @@ class tapicero {
$couchdb_soledad_user = $couchdb_users['soledad']['username']
$couchdb_leap_mx_user = $couchdb_users['leap_mx']['username']
- $couchdb_mirror = $couchdb['mode'] == 'mirror'
+ $couchdb_mode = $couchdb['mode']
+ $couchdb_replication = $couchdb['replication']
Class['site_config::default'] -> Class['tapicero']
diff --git a/puppet/modules/tapicero/templates/tapicero.yaml.erb b/puppet/modules/tapicero/templates/tapicero.yaml.erb
index 3a5f821e..182a6aa6 100644
--- a/puppet/modules/tapicero/templates/tapicero.yaml.erb
+++ b/puppet/modules/tapicero/templates/tapicero.yaml.erb
@@ -24,7 +24,8 @@ log_level: info
options:
# prefix for per user databases:
db_prefix: "user-"
- mirror: <%= @couchdb_mirror %>
+ mode: <%= @couchdb_mode %>
+ replication: <%= @couchdb_replication %>
# security settings to be used for the per user databases
security: