Sign inSign up

feeder/rethinkdb-cluster

By feeder

•Updated about 10 years ago

A simple image to simplify rethinkdb cluster initialization using swarm

Image
1

100K+

feeder/rethinkdb-cluster repository overview

Checkout the source here.⁠

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.

#!/bin/bash
JOINS=`getent hosts tasks.rethinkdb | awk '{ print $1 }' | sed -e 's/^/--join /' | tr '\n' ' '`
echo "Starting rethinkdb using $JOINS"
rethinkdb --bind all --no-http-admin $JOINS

If there are running rethinkdb nodes, this morphs into:

rethinkdb --bind all --no-http-admin --join 10.0.0.2 --join 10.0.0.2

If no running rethinkdb nodes, it works out well too:

rethinkdb --bind all --no-http-admin

However, if the node restarts, it will connect itself to the other running nodes.

Tag summary

Content type

Image

Digest

Size

72.4 MB

Last updated

about 10 years ago

docker pull feeder/rethinkdb-cluster