Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

feederco/rethinkdb-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

feederco/rethinkdb-cluster

This image is layer on-top of the standard rethinkdb image to make it easier to setup a cluster on swarm.

It's inspired a lot thanks to the great walkhrough by Stefan Prodan, but using this image you do not need the secondary/primary steps.

It uses the swarm DNS to request all nodes in the rethinkdb-namespace, and passes it on to the rethinkdb startup command.

Usage

First create a network:

$ docker network create --driver overlay rethinkdb-network

Setup a service for rethinkdb:

$ docker service create \
  --name rethinkdb \
  --network rethinkdb-network \
  --mount type=volume,source=/var/lib/rethinkdb,target=/data,type=bind \
  --update-delay 10s \
  feeder/rethinkdb-cluster

Now you can scale up the service depending on the number of nodes available.

$ docker service scale rethinkdb=2

RethinkDB admin

To simplify things it's easier to run the rethinkdb admin as a separate service. Here is how you can do that:

$ docker service create \
  --name rethinkdb-admin \
  --network rethinkdb-network \
  --publish 8080:8080 \
  --update-delay 10s \
  rethinkdb \
  rethinkdb proxy --bind all --join rethinkdb

Then visit http://$IP:8080 in your browser.

Problems to be solved.

  • I'm not sure how to limit docker swarm to only run one instance of rethinkdb per node
  • I'm not super sure all this is necessary...

Building

$ docker-compose build
$ docker-compose push

About

A Docker image with better support for Swarm and clustering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages