summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkbespalov <kbespalov@mirantis.com>2016-11-30 19:58:13 +0300
committerKirill Bespalov <kbespalov@mirantis.com>2016-12-21 14:38:16 +0300
commit8be506e3e0b1a580160d79bc786392f9952ea6a9 (patch)
tree01b57f1f2b28b45aaf46fbcd49f89b39c8ea4246
parent0d75b55c674b6ef803b5af0fc65c4681fe4aa224 (diff)
Messaging multi-backend support
Add config options to declare by default rabbitmq as RPC and Notifications backend. These options will be used to generate backend-related configs of oslo messaging and specify dependency. Change-Id: Ib110af1b9d4feef9085a46518f629e27e8094611
Notes
Notes (review): Verified+1: Mirantis CCP CI <mirantis-fuel-ccp-ci@mirantis.com> Code-Review+2: Yuriy Taraday <yorik.sar@gmail.com> Code-Review+2: Andrey Pavlov <apavlov@mirantis.com> Workflow+1: Andrey Pavlov <apavlov@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 27 Dec 2016 13:24:39 +0000 Reviewed-on: https://review.openstack.org/404883 Project: openstack/fuel-ccp-rabbitmq Branch: refs/heads/master
-rw-r--r--exports/oslo_messaging.j28
-rw-r--r--service/files/defaults.yaml6
2 files changed, 14 insertions, 0 deletions
diff --git a/exports/oslo_messaging.j2 b/exports/oslo_messaging.j2
new file mode 100644
index 0000000..fa869b3
--- /dev/null
+++ b/exports/oslo_messaging.j2
@@ -0,0 +1,8 @@
1{% macro rabbit(cfg_type) -%}
2{% if cfg_type == 'rpc_config' -%}
3 [DEFAULT]
4{%- elif cfg_type == 'notifications_config' -%}
5 [oslo_messaging_notifications]
6{%- endif %}
7transport_url=rabbit://{{ rabbitmq.user }}:{{ rabbitmq.password }}@{{ address('rabbitmq') }}
8{%- endmacro %}
diff --git a/service/files/defaults.yaml b/service/files/defaults.yaml
index be9e755..368f74c 100644
--- a/service/files/defaults.yaml
+++ b/service/files/defaults.yaml
@@ -1,4 +1,10 @@
1configs: 1configs:
2 messaging:
3 backend:
4 rpc: rabbit
5 notifications: rabbit
6 dependencies:
7 rabbit: rabbitmq
2 rabbitmq: 8 rabbitmq:
3 port: 9 port:
4 cont: 5672 10 cont: 5672