diff options
author | elijah <elijah@riseup.net> | 2014-06-19 00:02:54 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-06-19 00:02:54 -0700 |
commit | 1b5f0892bbcb07fa075bfe8c7b083521b38cb73c (patch) | |
tree | 9e30266c52b6be3f4c20eb55829493b465829ef7 /provider_base/services/_couchdb_mirror.json | |
parent | f991e8a4c877cff1d274fd1cac26488f8c3fda84 (diff) |
couchdb: generate hiera files suitable for plain couchdb + read-only mirrors
Diffstat (limited to 'provider_base/services/_couchdb_mirror.json')
-rw-r--r-- | provider_base/services/_couchdb_mirror.json | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/provider_base/services/_couchdb_mirror.json b/provider_base/services/_couchdb_mirror.json new file mode 100644 index 00000000..67004c70 --- /dev/null +++ b/provider_base/services/_couchdb_mirror.json @@ -0,0 +1,16 @@ +// +// Applied to all non-master couchdb nodes +// +{ + "stunnel": { + "couch_client": "= stunnel_client(nodes[couch.replication.masters.keys], couch.port)" + }, + "couch": { + "mode": "mirror", + "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')} || try{pick_node(:couch_master,nodes_like_me['services' => 'couchdb']['couch.master' => true]).pick_fields('domain.internal')}" + } + } +}
\ No newline at end of file |