Merge "Compartmentalizing RabbitMQ"

This commit is contained in:
Jenkins 2015-09-12 23:24:07 +00:00 committed by Gerrit Code Review
commit 38f7316d76
4 changed files with 49 additions and 3 deletions

View File

@ -33,6 +33,10 @@ cinder_fatal_deprecations: False
cinder_galera_user: cinder
cinder_galera_database: cinder
## RabbitMQ info
cinder_rabbitmq_userid: cinder
cinder_rabbitmq_vhost: /cinder
## Cinder User / Group
cinder_system_user_name: cinder
cinder_system_group_name: cinder

View File

@ -0,0 +1,37 @@
---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Ensure Rabbitmq vhost
rabbitmq_vhost:
name: "{{ cinder_rabbitmq_vhost }}"
state: "present"
delegate_to: "{{ groups['rabbitmq_all'][0] }}"
tags:
- cinder-rabbitmq
- cinder-rabbitmq-vhost
- name: Ensure rabbitmq user
rabbitmq_user:
user: "{{ cinder_rabbitmq_userid }}"
password: "{{ cinder_rabbitmq_password }}"
vhost: "{{ cinder_rabbitmq_vhost }}"
configure_priv: ".*"
read_priv: ".*"
write_priv: ".*"
state: "present"
delegate_to: "{{ groups['rabbitmq_all'][0] }}"
tags:
- cinder-rabbitmq
- cinder-rabbitmq-user

View File

@ -87,3 +87,7 @@
tags:
- sudoers
- cinder-sudoers
- include: cinder_messaging_setup.yml
when: >
inventory_hostname == groups['cinder_all'][0]

View File

@ -92,7 +92,7 @@ default_volume_type = {{ cinder_default_volume_type }}
{% if cinder_backends is defined %}
enabled_backends={% for backend in cinder_backends|dictsort %}{{ backend.0 }}{% if not loop.last %},{% endif %}{% endfor %}
#Ceilometer configurations
#cinder configurations
{% if cinder_ceilometer_enabled %}
notification_driver = cinder.openstack.common.notifier.rpc_notifier
{% endif %}
@ -115,8 +115,9 @@ connection = mysql://{{ cinder_galera_user }}:{{ cinder_container_mysql_password
[oslo_messaging_rabbit]
rabbit_port = {{ rabbitmq_port }}
rabbit_userid = {{ rabbitmq_userid }}
rabbit_password = {{ rabbitmq_password }}
rabbit_userid = {{ cinder_rabbitmq_userid }}
rabbit_password = {{ cinder_rabbitmq_password }}
rabbit_virtual_host = {{ cinder_rabbitmq_vhost }}
rabbit_hosts = {{ rabbitmq_servers }}
[oslo_concurrency]