How to create rethinkdb cluster
Published 5 years and 9 months ago, Categorized under: Linux, Other, Rethinkdb

To be honest, its really simple and does not need that much work.

1- Create 3 ubuntu 14.04 servers on DigitalOcean affiliated link or your favorite VPS provider.

2- Install rethinkdb on all of them using the following commands:

source /etc/lsb-release && echo "deb $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb

3- Prepare all of your instance to run on startup.

cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance.conf
service rethinkdb restart

4- Edit the second and the third server and point tell them to Join the first server

nano /etc/rethinkdb/instances.d/instance.conf

Search for the join line and edit it to be like

## The host:port of a node that rethinkdb will connect to
## This option can be specified multiple times.
## Default: none

remember to replace with the IP address for your first server.

If the 3 servers on the same datacenter, you can use the internal ip not the external one.

5- Also while you are editing that file remember to disable the http admin for both the second and the third server

## Disable web administration console

6- Edit the first server so that it will listen to the outside connections, so just change the bind value to all

## Address of local interfaces to listen on when accepting connections
## May be 'all' or an IP address, loopback addresses are enabled by default
## Default: all local addresses

7- Now restart the 3 servers, and point your browser to http://server-one-ip-address:8080 to access the admin interface

Share It via: