Quickly deploy RabbitMQ on Compute Engine
The Google Developers Console provides a simple interface that you can use to quickly deploy and configure a RabbitMQ cluster.
-
Deploy RabbitMQ for a new or existing project.
-
Enter a username and password for your cluster deployment.
-
Specify the zone and number of RAM nodes.
The first node in the cluster will be configured as a Disc/Stats node. See the RabbitMQ clustering guide for more information on the nodes.
When the cluster is created, load balancing is configured for you. Learn more
-
[Optional] Configure advanced settings. You can configure the following settings:
- Number of additional disc nodes
- Machine type for the disc/stats nodes
- Machine type for the add RAM nodes
- Machine type for the additional disc nodes
- Compute Engine network that the cluster nodes belong
The deployment can take a few minutes, when it finishes, you are provided with a command that you can run to tunnel the RabbitMQ web-based management console over SSH to your localhost. See managing your deployed cluster .
Load balancing the cluster
When you deploy a RabbitMQ cluster, load balancing is automatically configured for your nodes. Two load balancing target pools are created for your nodes along with correspondingly named forwarding rules.
-
rabbitmq-all-nodes- XXXXX
contains all of the nodes. -
rabbitmq-queue-nodes- XXXXX
contains all of the nodes except for the disc/stats node.
The forwarding rules for these target pools provide an IP address that you can
use to configure your clients. If you want your disc/stats node to process
messaging requests, use the IP address of the
rabbitmq-all-nodes-XXXX
forwarding rule. Otherwise, use the IP address for the
rabbitmq-queue-nodes-XXXX
forwarding rule. The latter might be preferable for
larger and busier clusters.
You can look up the forwarding rule IP addresses in your project in the Google Developers Console under Compute Engine -> Load balancing and choosing the forwarding rules tab.
Managing your deployed cluster
To manage your RabbitMQ cluster, you can access the web-based management
interface that is provided by RabbitMQ. After deploying your RabbitMQ cluster in
the Developers Console, you are provided with a command to tunnel the
management interface over ssh to your localhost so that you are not accessing
the interface over an insecure
HTTP
connection.
After you run the displayed command, browse to http://localhost:15672 .
Next steps
-
Enable SSL support for the management interface on your product systems. Learn more
-
Customize your virtual machine instances that RabbitMQ is running on by connecting to them with ssh. Learn more
Troubleshooting
If a deployment fails to complete successfully, check the error message in the Developers Console. If the problem is a CPU quota issue or other problem that you can correct, delete the deployment, correct the problem, and try again.
If the error message on the Developers Console does not provide
sufficient detail about the failure, check the Deployment Manager output on
the virtual machine instances that were launched. On each instance, there will
be a directory
/gagent/metaOutput
with a set of numbered files:
stdoutN.txt
,
stderrN.txt
,
exitcodeN.txt
. Each set of such files corresponds to the
sequenced command that was executed by Deployment Manager for your deployment
on that instance.
To get a list of your compute engine instances, check the Compute Engine list of virtual machine instances in the Developers Console or run the following command:
$ gcloud compute instances list -l
To ssh to an instance:
$ gcloud compute ssh <instance> --zone=<zone>
If you have problems that you cannot resolve or have questions head to Stack Overflow .