Code Monkey home page Code Monkey logo

mongo-docker-compose's Introduction

mongo-docker-compose

This repository provides a fully sharded mongo environment using docker-compose and local storage.

The MongoDB environment consists of the following docker containers. It's a simplified version of original upstream.

  • mongosrs(1-2)n1: Mongod data server with two replica sets containing 1 nodes each
  • mongocfg1: Stores metadata for sharded data distribution
  • mongos1: Mongo routing service to connect to the cluster through

In addition, also creates an admin user mongo-admin/mongo-admin.

Caveats

  • This is designed to have a minimal disk footprint at the cost of durability.
  • This is designed in no way for production but as a cheap learning and exploration vehicle.

Usage

Check out the repository

git clone [email protected]:singram/mongo-docker-compose.git
cd mongo-docker-compose

Setup Cluster

This will pull all the images from Docker index and run all the containers.

docker-compose up

Please note that you will need docker-compose 1.4.2 or better for this to work due to circular references between cluster members. You will need to run the following once only to initialize all replica sets and shard data across them

./initiate

You should now be able connect to mongos1 and the new sharded cluster via mongCLI or any other client like Robo 3T

mongo localhost:27017 -u mongo-admin -p mongo-admin --authenticationDatabase admin

Persistent storage

Data is stored at ./data/ and is excluded from version control. Data will be persistent between container runs. To remove all data ./reset

TODO

Built upon

mongo-docker-compose's People

Watchers

 avatar

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.