Giter Club home page Giter Club logo

rabbitmq-docker's Introduction

Rabbitmq cluster set-up using Docker

Build

  • git clone [email protected]:cbirajdar/rabbitmq-docker.git
  • Run docker pull cbirajdar/rabbitmq to pull the image from DockerHub or Run docker build -t cbirajdar/rabbitmq . in the root directory
  • Make sure that the docker image is pulled/built successfully
    • Run docker images to verify that the built images shows up in the local repository

Run

You can run the cluster in two ways:

  • Using docker-compose
    • cd cluster && docker-compose up -d
  • Using docker run
    • docker run -p 5672:5672 -p 15672:15672 --hostname rabbitmq1 --name rabbitmq1 cbirajdar/rabbitmq
    • docker run -p 5673:5672 -p 15673:15672 -e JOIN_CLUSTER=rabbitmq1 --hostname rabbitmq2 --name rabbitmq2 --link rabbitmq1 cbirajdar/rabbitmq
    • docker run -p 5674:5672 -p 15674:15672 -e JOIN_CLUSTER=rabbitmq1 --hostname rabbitmq3 --name rabbitmq3 --link rabbitmq1 --link rabbitmq2 cbirajdar/rabbitmq

Verify

Visit the following links in the browser to make sure rabbitmq admin console is running.

  • Get the docker machine ip - echo $DOCKER_HOST | awk -v FS="(tcp://|:)" '{print $2}'
  • http://$docker_ip:15672/
  • http://$docker_ip:15673/
  • http://$docker_ip:15674/

Running simple tests against the cluster

Stop and Destroy nodes

  • Stop and rm containers
    • docker stop $(docker ps -f "name=rabbitmq*" -a -q)
    • docker rm $(docker ps -f "name=rabbitmq*" -a -q)
  • Remove docker image
    • docker rmi $(IMAGE_ID)

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.