This is a wrapper cookbook which utilizes the rabbitmq cookbook for installing RabbitMQ on AWS OpsWorks with support for automatic clustering from layer instances.
The recipes included in this cookbook is based on the recipes provided by the community rabbitmq cookbook with modifications which provide better recipe granularity for AWS OpsWorks lifecycle events. For all intents and purposes, it is very similar to the original cookbook.
- Amazon Linux
- Ubuntu 12.04 LTS
- Ubuntu 14.04 LTS
- erlang (≥ 4.1.1)
- rabbitmq (≥ 4.10.0)
Key | Type | Description | Default |
---|---|---|---|
['rabbitmq']['opsworks']['layer_name'] |
String | OpsWorks stack's layer shortname that contains RabbitMQ instances | "rabbitmq" |
Most of the recipes included by this cookbook used to be in rabbitmq::default
on the original rabbitmq cookbook. They
have been mostly broken up into two recipes to be executed during AWS OpsWorks
instance lifecycle events.
Installs RabbitMQ.
Configure your stack layer to run opsworks_rabbitmq::install
during Setup
lifecycle event in your layer instances.
Sets up directory permissions and generate configuration files from templates.
If clustering is enabled, it will also run opsworks_rabbitmq::cluster
recipe.
Configure your stack layer to run opsworks_rabbitmq::configure
during
Configure lifecycle event in your layer instances. See below
for more information on why.
NOTE: When clustering is disabled, it should not matter whether this recipe is configured to run during Setup or Configure lifecycle event as long as it runs after
rabbitmq::install
recipe.
Automatically gathers all instances in your stack layer and automatically
generates the node['rabbitmq']['cluster_nodes']
list required for
clustering setup in opsworks_rabbitmq::configure
.
Because the list of nodes needs to be updated when a layer instance goes online or shuts down, this recipe must run during Configure lifecycle event in your layer instances.
Enables any policies listed in the node['rabbitmq'][policies]
and disables any
listed in node['rabbitmq'][disabled_policies]
attributes.
This recipe should be used to set up High Availability queues in RabbitMQ.
Example Custom JSON:
{
"rabbitmq": {
"policies": {
"ha-all-queues": {
"pattern": ".*",
"params": { "ha-mode": "all" },
"priority": 0
}
}
}
}
This recipe may be executed any time after opsworks_rabbitmq::install
recipe.
It will automatically execute opsworks_rabbitmq::configure
recipe if it has
not run before.
Enables any users listed in the node['rabbitmq']['enabled_users]
and disables
any listed in node['rabbitmq'][disabled_users]
attributes.
Enables any vhosts listed in the node['rabbitmq'][virtualhosts]
and disables
any listed in node['rabbitmq'][disabled_virtualhosts]
attributes.
This cookbook is licensed and distributed under the Simplified BSD license. See LICENSE for more details.