Giter Site home page Giter Site logo

terraform-aws-rabbitmq's Introduction

Dead simple Terraform configuration for creating RabbitMQ cluster on AWS.

Branch Build status
master Build Status

What it does ?

  1. Uses official RabbitMQ docker image.
  2. Creates N nodes in M subnets
  3. Creates Autoscaling Group and ELB to load balance nodes
  4. Makes sure nodes can talk to each other and create cluster
  5. Make sure new nodes always join the cluster
  6. Configures / vhost queues in High Available (Mirrored) mode with automatic synchronization ("ha-mode":"all", "ha-sync-mode":"3")

How to use it ?

Copy and paste into your Terraform configuration:

module "rabbitmq" {
  source                            = "ulamlabs/rabbitmq/aws"
  version                           = "3.0.0"
  vpc_id                            = var.vpc_id
  ssh_key_name                      = var.ssh_key_name
  subnet_ids                        = var.subnet_ids
  elb_additional_security_group_ids = var.cluster_security_group_id
  min_size                          = "3"
  max_size                          = "3"
  desired_size                      = "3"
}

then run terraform init, terraform plan and terraform apply.

Are 3 node not enough ? Update sizes to 5 and run terraform apply again, it will update Autoscaling Group and add 2 nodes more. Dead simple.

Node becomes unresponsive ? Autoscaling group and ELB Health Checks will automatically replace it with new one, without data loss.

Note: The VPC must have enableDnsHostnames = true and enableDnsSupport = true for the private DNS names to be resolvable for the nodes to connect to each other.

terraform-aws-rabbitmq's People

Contributors

krotkiewicz avatar dmitry1987 avatar rraub avatar

Watchers

James Cloos avatar  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.