summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProskurin Kirill <kproskurin@mirantis.com>2017-02-09 14:02:50 +0000
committerProskurin Kirill <kproskurin@mirantis.com>2017-02-13 08:29:14 +0000
commitf5d5b62c5d87aa39c4cd9097af591f5fc1d9e90a (patch)
tree8257474a702452930fe7c58a97a9a95f84409d85
parentd5eac9e469f70a4a58a45e82ce98ee566ef6e632 (diff)
Add per service switch to rabbitmq
Notes
Notes (review): Code-Review+2: Aleksandr Mogylchenko <amogylchenko@mirantis.com> Code-Review+1: Sergii Golovatiuk <sgolovatiuk@mirantis.com> Code-Review+2: Artur Zarzycki <azarzycki@mirantis.com> Workflow+1: Artur Zarzycki <azarzycki@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 13 Feb 2017 10:23:46 +0000 Reviewed-on: https://review.openstack.org/431558 Project: openstack/fuel-ccp-rabbitmq Branch: refs/heads/master
-rw-r--r--service/files/defaults.yaml2
-rw-r--r--service/files/rabbitmq.config.j216
2 files changed, 10 insertions, 8 deletions
diff --git a/service/files/defaults.yaml b/service/files/defaults.yaml
index 209b8d3..74261c6 100644
--- a/service/files/defaults.yaml
+++ b/service/files/defaults.yaml
@@ -12,6 +12,8 @@ configs:
12 password: password 12 password: password
13 erlang_cookie: erlang_cookie 13 erlang_cookie: erlang_cookie
14 user: rabbitmq 14 user: rabbitmq
15 tls:
16 enabled: true
15 17
16 # How many seconds we give a node before making liveness checks 18 # How many seconds we give a node before making liveness checks
17 # completely strict 19 # completely strict
diff --git a/service/files/rabbitmq.config.j2 b/service/files/rabbitmq.config.j2
index 4c63ef3..160f8b6 100644
--- a/service/files/rabbitmq.config.j2
+++ b/service/files/rabbitmq.config.j2
@@ -1,13 +1,13 @@
1[ 1[
2 {rabbit, [ 2 {rabbit, [
3 {dummy_param_without_comma, true} 3 {dummy_param_without_comma, true}
4 {% if not security.tls.enabled %} 4 {% if security.tls.enabled and rabbitmq.tls.enabled %}
5 ,{tcp_listeners, [ 5 ,{tcp_listeners, [] }
6 ,{ssl_listeners, [
6 {"0.0.0.0", {{ rabbitmq.port.cont }} } 7 {"0.0.0.0", {{ rabbitmq.port.cont }} }
7 ]} 8 ]}
8 {% else %} 9 {% else %}
9 ,{tcp_listeners, [] } 10 ,{tcp_listeners, [
10 ,{ssl_listeners, [
11 {"0.0.0.0", {{ rabbitmq.port.cont }} } 11 {"0.0.0.0", {{ rabbitmq.port.cont }} }
12 ]} 12 ]}
13 {% endif %} 13 {% endif %}
@@ -16,7 +16,7 @@
16 ,{loopback_users, []} 16 ,{loopback_users, []}
17 ,{cluster_partition_handling, pause_minority} 17 ,{cluster_partition_handling, pause_minority}
18 ,{queue_master_locator, <<"random">>} 18 ,{queue_master_locator, <<"random">>}
19 {% if security.tls.enabled %} 19 {% if security.tls.enabled and rabbitmq.tls.enabled %}
20 ,{ssl_options, [{cacertfile,"/opt/ccp/etc/tls/ca.pem"}, 20 ,{ssl_options, [{cacertfile,"/opt/ccp/etc/tls/ca.pem"},
21 {certfile,"/opt/ccp/etc/tls/rabbitmq_certificate.pem"}, 21 {certfile,"/opt/ccp/etc/tls/rabbitmq_certificate.pem"},
22 {keyfile,"/opt/ccp/etc/tls/rabbitmq_server_key.pem"}, 22 {keyfile,"/opt/ccp/etc/tls/rabbitmq_server_key.pem"},
@@ -32,10 +32,10 @@
32 ,{cluster_cleanup, true} 32 ,{cluster_cleanup, true}
33 ,{cleanup_warn_only, false} 33 ,{cleanup_warn_only, false}
34 ,{etcd_ttl, 15} 34 ,{etcd_ttl, 15}
35 {% if not security.tls.enabled %} 35 {% if security.tls.enabled and etcd.tls.enabled %}
36 ,{etcd_scheme, http}
37 {% else %}
38 ,{etcd_scheme, https} 36 ,{etcd_scheme, https}
37 {% else %}
38 ,{etcd_scheme, http}
39 {% endif %} 39 {% endif %}
40 ,{etcd_host, "{{ address('etcd') }}"} 40 ,{etcd_host, "{{ address('etcd') }}"}
41 ,{etcd_port, {{ etcd.client_port.cont }}} 41 ,{etcd_port, {{ etcd.client_port.cont }}}