<commit_before>---
title: RabbitMQ
authors: ichavero, jeckersb, rohara
wiki_title: RabbitMQ
wiki_revision_count: 7
wiki_last_updated: 2014-03-13
---

# Rabbit MQ

__NOTOC__

<div class="bg-boxes bg-boxes-single">
<div class="row">
<div class="offset3 span8 pull-s">
## Using RabbitMQ with RDO Havana

OpenStack requires a messaging service for internal communications between various components. Currently, this is done by using an AMQP broker. OpenStack can be configured to use either the Qpid broker or the RabbitMQ broker. In RDO, the default broker is Qpid. This guide will show how to replace Qpid with RabbitMQ, as well as how to deploy highly available RabbitMQ.

This guide will assume that RDO has been installed on a single node via packstack:

    % packstack --allinone

This will deploy OpenStack on a single node, including the Qpid messaging service. In order to replace Qpid with RabbitMQ, all OpenStack services should first be stopped.

    % openstack-service stop

Once all the OpenStack services are stopped, stop and disable the Qpid service.

    % service qpidd stop
    % chkconfig qpidd off

Next, install the RabbitMQ service.

    % yum install rabbitmq-server

After installation completes, enable and start the RabbitMQ service.

    % chkconfig rabbitmq-server on
    % service rabbitmq-server start

At this point the RabbitMQ service is running on the localhost, listening on port 5672. The next step is to configure the relevant OpenStack services to use the RabbitMQ messaging driver.

Neutron:

    openstack-config --set /etc/neutron/neutron.conf DEFAULT rpc_backend neutron.openstack.common.rpc.impl_kombu

Cinder:

    openstack-config --set /etc/cinder/cinder.conf DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu

Nova:

    openstack-config --set /etc/nova/nova.conf DEFAULT rpc_backend nova.openstack.common.rpc.impl_kombu

Glance:

    openstack-config --set /etc/glance/glance-api.conf DEFAULT notifier_strategy rabbit

Ceilometer:

    openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rpc_backend ceilometer.openstack.common.rpc.impl_kombu

By default, OpenStack assumes that the RabbitMQ broker is listening on port 5672 of the localhost. In this example, the OpenStack services could now be restarted with no additional configuration. For completeness, set the host and port where the RabbitMQ broker is listening. This must be done for each OpenStack service.

Neutron:

    openstack-config --set /etc/neutron/neutron.conf DEFAULT rabbit_host 10.15.85.141
    openstack-config --set /etc/neutron/neutron.conf DEFAULT rabbit_port 5672

Nova:

    openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_host 10.15.85.141
    openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_port 5672

Glance:

    openstack-config --set /etc/glance/glance-api.conf DEFAULT rabbit_host 10.15.85.141
    openstack-config --set /etc/glance/glance-api.conf DEFAULT rabbit_port 5672

Cinder:

    openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_host 10.15.85.141
    openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_port 5672

Ceilometer:

    openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_host 10.15.85.141
    openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT rabbit_port 5672

With the RabbitMQ broker running listening on port 5672 at host 10.15.85.141, the last step is to start all of the OpenStack services.

    % openstack-service start<commit_msg>Using RabbitMQ with RDO Havana<commit_after>---
title: RabbitMQ
authors: ichavero, jeckersb, rohara
wiki_title: RabbitMQ
wiki_revision_count: 7
wiki_last_updated: 2014-03-13
---

# Rabbit MQ

__NOTOC__

<div class="bg-boxes bg-boxes-single">
<div class="row">
<div class="offset3 span8 pull-s">
## Using RabbitMQ with RDO Havana

OpenStack requires a messaging service for internal communications between various components. Currently, this is done by using an AMQP broker. OpenStack can be configured to use either the Qpid broker or the RabbitMQ broker. In RDO, the default broker is Qpid. This guide will show how to replace Qpid with RabbitMQ, as well as how to deploy highly available RabbitMQ.

This guide will assume that RDO has been installed on a single node via packstack. RabbitMQ support in packstack is new, and not yet available in the RDO packstack package. Therefore it is necessary to run packstack from source, for now.

First, install required packages.

    % yum install -y http://rdo.fedorapeople.org/rdo-release.rpm python-netaddr python-setuptools git

Grab the packstack source.

    % git clone git://github.com/stackforge/packstack
    % cd packstack

Install the openstack puppet modules.

    % python setup.py install_puppet_modules

Generate a default answers file for packstack.

    % ./bin/packstack --gen-answer-file=answers

Configure packstack to use RabbitMQ in place of Qpid.

    % sed -i 's/CONFIG_AMQP_SERVER=qpid/CONFIG_AMQP_SERVER=rabbitmq/' answers

If you are using RHEL, you must enable EPEL for RabbitMQ and Erlang to be available. Skip this step if using Fedora.

    % sed -i 's/CONFIG_USE_EPEL=n/CONFIG_USE_EPEL=y/' answers

Finally, run packstack with the answers file.

    %  ./bin/packstack --answer-file=answers
{'fraction_non_alphanumeric': 0.06834189986674281, 'fraction_numerical': 0.020559680182752713, 'mean_word_length': 3.9990485252140817, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1672641', 'n_tokens_mistral': 1723, 'n_tokens_neox': 1535, 'n_words': 604}