diff options
author | elijah <elijah@riseup.net> | 2014-06-19 00:02:54 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-06-25 18:17:11 -0700 |
commit | db669a6911c55d9a5675fb4b42f4de5728f34c76 (patch) | |
tree | 9a35b56f81fe845368528795b8c66a38d8bf5c0b /provider_base/services/_couchdb_mirror.json | |
parent | edf1306a418203df297d034544d51f5cdcd053c7 (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 |