Coder Social home page Coder Social logo

docker-rabbitmq-cluster's Introduction

This folder structure contains the Dockerfiles for building RabbitMQ cluster - the number of nodes are completely customizable using docker-compose docker-compose.yml file.

Structure:

There are 3 folders.

  1. base - this is the base Dockerfile which builds on a CentOS image and installs the RabbitMQ binaries on the image

  2. server - This builds on the base image and has the startup script for bring up a RabbitMQ server

  3. cluster - This contains a docker-compose definition file(docker-compose.yml) for brining up the rabbitmq cluster. Use docker-compose up -d to bring up the cluster.

Running the Cluster:

Once the images are built, boot up the cluster using the docker-compose.yml configuration provided in cluster folder:

docker-compose up -d

By default 3 nodes are started up this way:

rabbit1:
  image: bijukunjummen/rabbitmq-server:3.7.0
  hostname: rabbit1
  ports:
    - "5672:5672"
    - "15672:15672"
  environment:
    - RABBITMQ_DEFAULT_USER=myuser
    - RABBITMQ_DEFAULT_PASS=mypass
rabbit2:
  image: bijukunjummen/rabbitmq-server:3.7.0
  hostname: rabbit2
  links:
    - rabbit1
  environment:
   - CLUSTERED=true
   - CLUSTER_WITH=rabbit1
   - RAM_NODE=true
  ports:
      - "5673:5672"
      - "15673:15672"

rabbit3:
  image: bijukunjummen/rabbitmq-server:3.7.0
  hostname: rabbit3
  links:
    - rabbit1
    - rabbit2
  environment:
   - CLUSTERED=true
   - CLUSTER_WITH=rabbit1
  ports:
        - "5674:5672"

if needed, additional nodes can be added to this file. If the entire cluster comes up, the management console can be accessed at http://<dockerip>:15672

and connection host should look like this: dockerip:5672,dockerip:5673,dockerip:5674

docker-rabbitmq-cluster's People

Contributors

bijukunjummen avatar lewisevans2007 avatar notjrbauer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-rabbitmq-cluster's Issues

high-availability tests

Hi, first of all congrats for this very good work. I'm working a lot with clusterized rabbitmq and this is a good start point for make a solid clusterized conteinerized rabbitmq service.

Did you do some tests with nodes (containers) down when publishing and how cluster reacts. I mean... how much time takes the master to promote, if some messages are lost and things like that?

Perhaps we can design some tests and share results.

Thanks again!

Storing logs and mnesia on host system?

Thanks for the great work. Starting to explore getting RabbitMQ into the docker context and your work was a fantastic starting point. I was curious how this can be changed to store the mnesia and logs files into the host system. For example, attaching an external SSD drives to an instance. Each rabbitmq instance would store to its own mensia and log path.

/mnt/var/lib/rabbitmq1
/mnt/var/lib/rabbitmq2
/mnt/var/lib/rabbitmq3

I was not clear on how that might be accomplished in your setup. Would it be as simple as adding the volumes to fig.yml?

volumes:
- /mnt/var/lib/rabbitmq1:/var/lib/rabbitmq
- /mnt/var/log/rabbitmq1:/var/log/rabbitmq

Maybe the rabbitmq.config might also need this path?

Again, thank you for sharing.

cannot startup

Win10

ERROR: for rabbit1 Cannot start service rabbit1: driver failed programming external connectivity on endpoint cluster_ra
bbit1_1 (fd3e38f55e4e4a260f116f17bef5c4b988f690c9dbf172d0dcaed90e8979e503): Error starting userland proxy: mkdir /port/t
cp:0.0.0.0:15672:tcp:172.17.0.2:15672: input/output error
ERROR: Encountered errors while bringing up the project.

Building base fails because of 404 for EPEL rpm

curl: (22) The requested URL returned error: 404 Not Found
error: skipping http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm - transfer failed  

Found this link to be working:

ftp://fr2.rpmfind.net/linux/centos/7.0.1406/extras/x86_64/Packages/epel-release-7-2.noarch.rpm

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.