I’m quite new to docker cloud and devops. I’m trying to put a stackfile for a couchbase server + sync gateway app. I’ve left the other pieces out for now like the frontend and nodejs backend. All I want to focus on here is having a working couchbase setup that can scale when I slide the node cluster scale up and down for the “database” tagged cluster.
This what I have so far…
lb: deployment_strategy: every_node image: dockercloud/haproxy:latest links: - syncgateway ports: - "80:80" - "443:443" roles: - global restart: always tags: - loadbalancer syncgateway: deployment_strategy: every_node image: couchbase/sync-gateway:1.3.1-community volumes: - /tmp:/tmp/config links: - couchbase net: host restart: always tags: - database couchbase: deployment_strategy: every_node image: couchbase/server:community-4.1.0 volumes: - /opt/couchbase/var net: host restart: always tags: - database
So a couple of things…
Current I’ve three “database” tagged nodes in my database cluster.
I’m running one couchbase server and one sync gateway container per node.
I’ve just added “volume” params and am not actually using these yet to pass in a sync config for example. I would like to find out the best way to do this. I imagine I might need to create another image with the sync file in it and use that as a volume. Adding command: ‘https://git.io/someShortUrlToSyncGist’ to my sync gatework service in my stackfile works. If so, is it okay to have the database server field in the sync gateway config just as localhost? I imagine I’d need to do this do it could be re-used by each container? Looks like using localhost works, I tried using http://couchbase:8091 as that’s the name of my service, but that didn’t seem to work.
For now I’m trying to have the load balancer’s port 80 proxy sync gateways public port 4984, but this isn’t working yet.
When I visit the couchbase admin and setup a new cluster / db for the first time, I had hoped to see the other couchbase server nodes already listed in the Server Nodes section, rebalancing etc. They aren’t listed. Does this mean they would need to manually be added after scaling the cluster?
Thanks in advance for any tips…