You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/10/27 12:38:01 UTC

[GitHub] cbickel commented on a change in pull request #2810: Add couchdb clustering

cbickel commented on a change in pull request #2810: Add couchdb clustering
URL: https://github.com/apache/incubator-openwhisk/pull/2810#discussion_r147391550
 
 

 ##########
 File path: ansible/roles/couchdb/tasks/deploy.yml
 ##########
 @@ -21,25 +21,39 @@
     volume_dir: "{{ instance.volume.fsmount | default( '/mnt/' + group_names|first, true ) }}:/usr/local/var/lib/couchdb"
   when: (block_device is defined) and (block_device in disk_status.stdout)
 
-- name: "pull the klaemo/couchdb:{{ couchdb.version }} image"
-  shell: "docker pull klaemo/couchdb:{{ couchdb.version }}"
+- name: "set the num_instances"
+  vars:
+    instance: "{{instances | selectattr('name', 'equalto', 'db') | list }}"
+  set_fact:
+    num_instances: "{{ instance.num_instances | default(1) }}"
+  when: instances is defined
+
+- name: "set the num_instances"
+  set_fact:
+    num_instances: "1"
+  when: instances is undefined
+
+- name: "pull the apache/couchdb:{{ couchdb.version }} image"
+  shell: "docker pull apache/couchdb:{{ couchdb.version }}"
   retries: "{{ docker.pull.retries }}"
   delay: "{{ docker.pull.delay }}"
 
 - name: (re)start CouchDB
   docker_container:
     name: couchdb
-    image: klaemo/couchdb:{{ couchdb.version }}
+    image: apache/couchdb:{{ couchdb.version }}
     state: started
     recreate: true
     restart_policy: "{{ docker.restart.policy }}"
     volumes: "{{volume_dir | default([])}}"
     ports:
       - "{{ db_port }}:5984"
+      - "4369:4369"
+      - "9100:9100"
 
 Review comment:
   Can we make these ports (outside of the container) configurable and increment them for each container? Again, to be able to deploy two dbs on the same host.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services