目的
1. 配置 openstack 可用的 rabbitmq
2. rabbitmq 用于存储 openstack 消息队列
3. rabbitmq 作为数据存储中心
4. openstack i 版中, rabbitmq 为 cinder, nova, neutron 组件进行数据存储,
5. openstack h 版使用的是 qpid 进程, 经常出现进程队列堵塞现象, 导致无法创建新虚拟机
安装
yum install rabbitmq-server
启动
service rabbitmq-server start
配置
安装 rabbitmq 后, 默认创建 guest/guest 用户与密码, 可以利用下面方法修改密码
# rabbitmqctl change_password guest openstack
Changing password for user "guest" ......done.
修改密码后, 为 cinder 添加虚拟主机
# rabbitmqctl add_vhost cinder
Creating vhost "cinder" ......done.
为其他服务创建虚拟用户
# rabbitmqctl add_user cinder openstack
Creating user "cinder" ......done.
# rabbitmqctl add_user nova openstack
Creating user "nova" ......done.
# rabbitmqctl add_user neutron openstack
Creating user "neutron" ......done.
为上述用户添加对资源的读写权限
# rabbitmqctl set_permissions cinder ".*" ".*" ".*"
# rabbitmqctl set_permissions nova ".*" ".*" ".*"
# rabbitmqctl set_permissions neutron ".*" ".*" ".*"
校验
可用下面命令进行信息校验
# rabbitmqctl report
时间: 2024-09-28 12:56:56