fuel-library/deployment/puppet/rabbitmq/templates/rabbitmq.config.erb
Bogdan Dobrelya 507d54e4c9 Adapt rabbitmq module for Fuel
* Sync to v5.0.0 (supports Ubuntu 14.04, major SSL fixes)
* Fix deprecated in 5.0.0 params
* Reimplement waiting/retries in rabbitmq provider
  (https://tickets.puppetlabs.com/browse/MODULES-1452)
* Configure clustering with an erlang cookie hardcode. Also
  pass the cookie to the OCF script.
* Make OCF script always update an erlang cookie, if specified
  (default false)
* Add dependency module: nanliu-staging
* Add support for rabbimtq class false value for nova module
  (https://bugs.launchpad.net/puppet-nova/+bug/1407077)
* Do not use nova::rabbitmq to install and configure rabbitmq
  service anymore, install it separately.
  (TODO move it as a granular deploy step)
* Adjust other existing rabbit class calls for new 5.0.0 rabbit module
* Remove deprecated usage of rabbitmq::server class and replace it
  to ::rabbitmq (cinder, murano, openstack, zabbix, mcollective,
  nailgun)
* Remove rabbit.pub.key and do not manage repos for rabbit package
  as we have it in nailgun repos and Fuel uses these repos for offline
  installation of rabbitmq.
  (Related upstream bug https://tickets.puppetlabs.com/browse/MODULES-1631)
* Move custom rabbit OCF file from nova to openstack and remove
  OS-aware services disable from rabbit's manifests
* Make pacemaker provider HA wrapper for rabbitmq service and move
  it to pacemaker_wrappers::rabbitmq
* Fix linting
* Fix rabbitmq service name for zabbix mon
* Fix env_config for rabbitmq::nailgun, unify RABBIT_* env args.
* Use key_content, package_gpg_key, config_*, cluster_*,
  environment_* params to ensure the same rabbit configuration as
  before and make offline installation possible.
* Add cluster_partition_handling param for openstack::controller
* Del unused rabbitmq_node_ip_address and rename as node_ip_address
* Del unneeded rabbit_cluster due to it is being evaluated via
  passed rabbitmq_cluster_nodes as well
* Adjust debug log_levels for rabbit config as well
* For '$production !~ /docker/' case, remove custom init scripts
  for rabbit as non relevant anymore.
* Enable rspec tests for rabbitmq in utils
* Disable rspecs for erlang module.

Related blueprint merge-openstack-puppet-modules
Related-bug: #1377491

Change-Id: I6e631b975c5835d2d6f1984d5a070a45231fe9ab
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2015-01-09 16:11:28 +01:00

75 lines
2.3 KiB
Plaintext

% This file managed by Puppet
% Template Path: <%= @module_name %>/templates/rabbitmq.config
[
{rabbit, [
<% if @ldap_auth -%>
{auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},
<% end -%>
<% if @config_cluster -%>
{cluster_nodes, {[<%= @cluster_nodes.map { |n| "\'rabbit@#{n}\'" }.join(', ') %>], <%= @cluster_node_type %>}},
{cluster_partition_handling, <%= @cluster_partition_handling %>},
<% end -%>
<%- if @tcp_keepalive -%>
{tcp_listen_options, [{keepalive, true}]},
<%- end -%>
<%- if @ssl_only -%>
{tcp_listeners, []},
<%- end -%>
<%- if @ssl -%>
{ssl_listeners, [<%= @ssl_port %>]},
{ssl_options, [<%- if @ssl_cacert != 'UNSET' -%>{cacertfile,"<%= @ssl_cacert %>"},<%- end -%>
{certfile,"<%= @ssl_cert %>"},
{keyfile,"<%= @ssl_key %>"},
{verify,<%= @ssl_verify %>},
{fail_if_no_peer_cert,<%= @ssl_fail_if_no_peer_cert %>}]},
<%- end -%>
<% if @config_variables -%>
<%- @config_variables.keys.sort.each do |key| -%>
{<%= key %>, <%= @config_variables[key] %>},
<%- end -%>
<%- end -%>
{default_user, <<"<%= @default_user %>">>},
{default_pass, <<"<%= @default_pass %>">>}
]}<% if @config_kernel_variables -%>,
{kernel, [
<%= @config_kernel_variables.sort.map{|k,v| "{#{k}, #{v}}"}.join(",\n ") %>
]}
<%- end -%>
<%- if @admin_enable -%>,
{rabbitmq_management, [
{listener, [
<%- if @ssl -%>
{port, <%= @ssl_management_port %>},
{ssl, true},
{ssl_opts, [<%- if @ssl_cacert != 'UNSET' -%>{cacertfile, "<%= @ssl_cacert %>"},<%- end -%>
{certfile, "<%= @ssl_cert %>"},
{keyfile, "<%= @ssl_key %>"}]}
<%- else -%>
{port, <%= @management_port %>}
<%- end -%>
]}
]}
<%- end -%>
<% if @config_stomp -%>,
% Configure the Stomp Plugin listening port
{rabbitmq_stomp, [
{tcp_listeners, [<%= @stomp_port %>]}
<%- if @ssl && @ssl_stomp_port -%>,
{ssl_listeners, [<%= @ssl_stomp_port %>]}
<%- end -%>
]}
<% end -%>
<%- if @ldap_auth -%>,
% Configure the LDAP authentication plugin
{rabbitmq_auth_backend_ldap, [
{other_bind, anon},
{servers, ["<%= @ldap_server %>"]},
{user_dn_pattern, "<%= @ldap_user_dn_pattern %>"},
{use_ssl, <%= @ldap_use_ssl %>},
{port, <%= @ldap_port %>},
{log, <%= @ldap_log %>}
]}
<%- end -%>
].
% EOF