Branch | Build status |
---|---|
master |
- Uses official RabbitMQ docker image.
- Creates
N
nodes inM
subnets - Creates Autoscaling Group and ELB to load balance nodes
- Makes sure nodes can talk to each other and create cluster
- Make sure new nodes always join the cluster
- Configures
/
vhost queues in High Available (Mirrored) mode with automatic synchronization ("ha-mode":"all", "ha-sync-mode":"3"
)
Copy and paste into your Terraform configuration:
module "rabbitmq" {
source = "ulamlabs/rabbitmq/aws"
version = "2.0.1"
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.