一、简介

  所有Red Hat Openstack服务之间都使用RabbitMQ(统一消息系统)进行通讯。

默认RabbitMQ监听5672端口,RabbitMQ支持基于账户与密码的访问并可以实现SSL加密,如果启用了SSL加密则端口需要修改为5671。

  RabbitMQ comes with default built-in settings which will most likely be sufficient for running your RabbitMQ server effectively. If it runs fine, then you probably don't need any configuration at all.

二、配置

安装(以Redhat7/CentOS7为例):

# yum install rabbitmq-server
# systemctl enable rabbitmq-server.service
# systemctl start rabbitmq-server.service
[root@servera ~]# cat /etc/rabbitmq/rabbitmq-env.conf
NODE_PORT=5672

 environment variables:

----define ports, file locations and names (taken from the shell, or set in the rabbitmq-env.conf file) 

root@servera ~]# cat /etc/rabbitmq/rabbitmq.config
% This file managed by Puppet
% Template Path: rabbitmq/templates/rabbitmq.config
[
  {rabbit, [
    {tcp_listen_options,
         [binary,
         {packet,        raw},
         {reuseaddr,     true},
         {backlog,       128},
         {nodelay,       true},
         {exit_on_close, false}]
    },
    {loopback_users, []},
    {tcp_listen_options, [binary,{packet, raw},{reuseaddr, true},{backlog, 128},{nodelay, true},{exit_on_close, false},{keepalive, true}]},
    {default_user, <<"guest">>},
    {default_pass, <<"guest">>}
  ]},
  {kernel, [

  ]}
].
% EOF

configuration file:

----defines server component settings for permissions, limits and clusters, and also plugin settings. 

三、

  RabbitMQ通过其他组件来调用,确认每个Openstack组件都正确的配置了RabbitMQ:

#grep rabbit /etc/keystone/keystone.conf
#grep rabbit /etc/nova/nova.conf
#grep rabbit /etc/cinder/cinder.conf
#grep rabbit /etc/neutron/neutron.conf
#grep rabbit /etc/glance/glance-api.conf