Giter Club home page Giter Club logo

rethinkdb-docker-cluster's Introduction

rethinkdb-docker-cluster

For auto-build image, head over to docker hub: https://hub.docker.com/r/kallqvist/rethinkdb-cluster/

A docker image to make RethinkDb clustering a bit easier and more container friendly. This image is built on top of rethinkdb:latest and adds a docker-entrypoint.sh that dynamically tries to set canonical IP and join IP based on docker links and hostnames.

Basic usage is either (only for DNS-based service discovery):

  • Start one container and set environment variable "JOIN" to a hostname able to reach the container's scaled nodes (e.g usually the container name)
  • Simply scale this service to add more nodes

or:

  • Manually start nodes as you wish
  • Add them to cluster by setting their environment variable "JOIN" to either hostname or IP of an already running node.

Check https://github.com/kallqvist/rethinkdb-docker-cluster/blob/master/docker-compose.yml for more information.

Container data is written to /data, each container must have a unique storage path if host bind mounts are used to not risk data corruption.

rethinkdb-docker-cluster's People

Contributors

kallqvist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rethinkdb-docker-cluster's Issues

error on startup

hey, this is working locally, but not when I deploy it via a stack to a Docker swarm.

Here is the command that fails, and the configuration:


January 18th 2018, 19:34:48.000 | Running command: /usr/bin/rethinkdb --bind all -d /data --canonical-address 10.0.0.47 10.0.11.3:29015
-- | --

  | January 18th 2018, 19:34:48.000 | Error in the command line: Unexpected positional parameter '10.0.11.3:29015' (did you forget the option name, or forget to quote a parameter list?).

  | January 18th 2018, 19:34:48.000 | Run 'rethinkdb help' for help on the command


rethink1:
    image: patrickleet/rethinkdb-cluster
    networks:
      - rethink
      - proxy
    environment:
      JOIN: rethink1
    volumes:
      - rethink1-data:/data
    deploy:
      resources:
        reservations:
          memory: 2G
        limits:
          memory: 2G
      placement:
        constraints: 
          - node.role == worker
      labels:
        - com.df.notify=true
        - com.df.distribute=true
        - com.df.port=8080
        - com.df.serviceDomain=${RETHINK_DOMAIN:-localhost}
        - com.df.usersPassEncrypted=true
        - com.df.usersSecret=admin
        - com.df.alertName=memlimit
        - com.df.alertIf=@service_mem_limit:0.8
        - com.df.alertFor=30s

  rethink2:
    image: patrickleet/rethinkdb-cluster
    networks:
      - rethink
    environment:
      JOIN: rethink1
    volumes:
      - rethink2-data:/data
    deploy:
      resources:
        reservations:
          memory: 2G
        limits:
          memory: 2G
      placement:
        constraints: 
          - node.role == worker
      labels:
        - com.df.alertName=memlimit
        - com.df.alertIf=@service_mem_limit:0.8
        - com.df.alertFor=30s


  rethink3:
    image: patrickleet/rethinkdb-cluster
    networks:
      - rethink
    environment:
      JOIN: rethink1
    volumes:
      - rethink3-data:/data
    deploy:
      resources:
        reservations:
          memory: 2G
        limits:
          memory: 2G
      placement:
        constraints: 
          - node.role == worker
      labels:
        - com.df.alertName=memlimit
        - com.df.alertIf=@service_mem_limit:0.8
        - com.df.alertFor=30s

Only rethink1 has this issue, the only difference in the fork is just logging the command before running.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.