Git Product home page Git Product logo

docker-rabbitmq-cluster's Introduction

Docker images to run RabbitMQ cluster. It extends the official image with a rabbitmq-cluster script that does the magic.

Building

Once you clone the project locally use captain to build the image or do with docker:

docker build -t harbur/rabbitmq-cluster .

Running with docker-compose

If you want to run the cluster on one machine use docker-compose

docker-compose up -d

By default 3 nodes are started up this way:

rabbit1:
  image: harbur/rabbitmq-cluster
  hostname: rabbit1
  environment:
    - ERLANG_COOKIE=abcdefg
  ports:
    - "5672:5672"
    - "15672:15672"
rabbit2:
  image: harbur/rabbitmq-cluster
  hostname: rabbit2
  links:
    - rabbit1
  environment:
    - ERLANG_COOKIE=abcdefg
    - CLUSTER_WITH=rabbit1
    - ENABLE_RAM=true
    - RAM_NODE=true
  ports:
    - "5673:5672"
    - "15673:15672"
rabbit3:
  image: harbur/rabbitmq-cluster
  hostname: rabbit3
  links:
    - rabbit1
    - rabbit2
  environment:
    - ERLANG_COOKIE=abcdefg
    - CLUSTER_WITH=rabbit1
  ports:
    - "5674:5672"

If needed, additional nodes can be added to this file.

Once cluster is up:

  • The management console can be accessed at http://hostip:15672
  • The connection host should look like this: hostip:5672,hostip:5673,hostip:5674

Credits

docker-rabbitmq-cluster's People

Contributors

dgil avatar dkapanidis avatar spiddy 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

docker-rabbitmq-cluster's Issues

$1: unbound variable

If i follow strict your repository and try to run the container i get:

docker run -it --hostname rabbit1 progeek/rabbitmq:3.6.5
/usr/local/bin/docker-entrypoint.sh: line 5: $1: unbound variable

Because https://github.com/harbur/docker-rabbitmq-cluster/blob/master/pre-entrypoint.sh#L22
needs argument, and no argument is supplied...
How is working on your side?

The problem is that https://github.com/harbur/docker-rabbitmq-cluster/blob/master/pre-entrypoint.sh#L22
is not getting any argument to start the server

Cannot start node in TLS mode

I am trying to start the cluster in TLS mode. I am using the env variables from the main docker image
RABBITMQ_SSL_CACERTFILE, RABBITMQ_SSL_CERTFILE, RABBITMQ_SSL_KEYFILE. But the node starts in standard mode(http and amqp) and not in TLS(https, amqps).
How to start the nodes in TLS mode?

Trying to run container cluster on Mac OS

My environment ...

Mac OS X El Capitan w/ Docker, Docker Machine and Docker Compose as follows:

________________________________________________________________________________
| ~ @ TheCaffeinator (cphi)
| => dm version
docker-machine version 0.7.0, build a650a40
________________________________________________________________________________
| ~ @ TheCaffeinator (cphi)
| => dc version
docker-compose version 1.7.1, build unknown
docker-py version: 1.8.1
CPython version: 2.7.10
OpenSSL version: OpenSSL 0.9.8zh 14 Jan 2016
________________________________________________________________________________
| ~ @ TheCaffeinator (cphi)
| => docker version
Client:
 Version:      1.11.1
 API version:  1.23
 Go version:   go1.6.2
 Git commit:   5604cbe
 Built:        Wed Apr 27 15:27:26 UTC 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 19:36:04 2016
 OS/Arch:      linux/amd64
________________________________________________________________________________
| ~ @ TheCaffeinator (cphi)
| =>

When I try to docker-compose up -d w/ the docker-compose.yml file in your repo, I cannot start rabbit1 instance.

Process output...

| => dc logs rabbit1
Attaching to docker_rabbit1_1
rabbit1_1   | Running as single server
________________________________________________________________________________
| ~/development/projects/opensource/xlator/deploy/docker @ TheCaffeinator (cphi)
| => dc ps
                Name                                   Command                                  State                                   Ports
-------------------------------------------------------------------------------------------------------------------------------------------------------------
docker_cadvisor_1                       /usr/bin/cadvisor                       Up                                      0.0.0.0:9080->8080/tcp
docker_data_1                           mkdir /data && chown 502:2 ...          Exit 1
docker_grafana_1                        /usr/sbin/grafana-server - ...          Up                                      0.0.0.0:3000->3000/tcp
docker_graphite_1                       /sbin/my_init                           Up                                      0.0.0.0:2003->2003/tcp,
                                                                                                                        0.0.0.0:8000->80/tcp,
                                                                                                                        0.0.0.0:8125->8125/tcp,
                                                                                                                        0.0.0.0:8125->8125/udp,
                                                                                                                        0.0.0.0:8126->8126/tcp
docker_rabbit1_1                        /pre-entrypoint.sh rabbitm ...          Exit 1
docker_rabbit2_1                        /pre-entrypoint.sh rabbitm ...          Up                                      0.0.0.0:15673->15672/tcp, 25672/tcp,
                                                                                                                        4369/tcp, 0.0.0.0:5673->5672/tcp,
                                                                                                                        9100/tcp, 9101/tcp, 9102/tcp,
                                                                                                                        9103/tcp, 9104/tcp, 9105/tcp
docker_rabbit3_1                        /pre-entrypoint.sh rabbitm ...          Up                                      15672/tcp, 25672/tcp, 4369/tcp,
                                                                                                                        0.0.0.0:5674->5672/tcp, 9100/tcp,
                                                                                                                        9101/tcp, 9102/tcp, 9103/tcp,
                                                                                                                        9104/tcp, 9105/tcp

Pay no attention to other containers I've started above.

Anything I should be aware of? I cannot hit admin interface on port 15672 since rabbit1 is down.

Env 'RABBITMQ_DEFAULT_USER', 'RABBITMQ_DEFAULT_PASS' and so on are not supported

This image is inherited from official rabbitmq, it would be nice to have the same capability of office rabbitmq image.

However the configuration for authentication, vhost and so on are ignored by this image.

Had a look at the docker-entrypoint.sh of official image, it only does these configuration when the command is rabbitmq-server. But this image is using another command rabbitmq-cluster do the cluster magic.

Any idea for it?

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.