Change murano rabbit username and password

Currently murano rabbit uses same credentials that uses main cluster
rabbit. Although user for murano uses different rabbitmq instance,
better to use another credentials, that are different from main infra.

Change-Id: I42423f2c2b0333167244a4c17886325f4e629b12
Closes-bug: #1609355
This commit is contained in:
Denis Egorenko 2016-08-05 13:57:24 +03:00
parent 0e5c8da51d
commit b07c41f76c
3 changed files with 13 additions and 18 deletions

View File

@ -115,8 +115,8 @@ class { '::murano' :
rabbit_own_host => $public_ip,
rabbit_own_port => $murano_hash['rabbit']['port'],
rabbit_own_vhost => $murano_hash['rabbit']['vhost'],
rabbit_own_user => $rabbit_hash['user'],
rabbit_own_password => $rabbit_hash['password'],
rabbit_own_user => $murano_hash['rabbit']['user'],
rabbit_own_password => $murano_hash['rabbit']['password'],
default_router => $default_router,
default_nameservers => join($external_dns['dns_list'], ','),
service_host => $api_bind_host,

View File

@ -29,10 +29,12 @@ if $murano_plugin {
$murano_nodes_ips = values($murano_address_map)
$murano_nodes_names = keys($murano_address_map)
}
$murano_db_password = pick($settings_hash['murano_db_password'], $murano_base_hash['db_password'])
$murano_user_password = pick($settings_hash['murano_user_password'], $murano_base_hash['user_password'])
$murano_rabbit_host = pick($settings_hash['murano_rabbit_vhost'], $murano_base_hash['rabbit']['vhost'])
$murano_rabbit_port = pick($settings_hash['murano_rabbit_port'], $murano_base_hash['rabbit']['port'])
$murano_db_password = pick($settings_hash['murano_db_password'], $murano_base_hash['db_password'])
$murano_user_password = pick($settings_hash['murano_user_password'], $murano_base_hash['user_password'])
$murano_rabbit_user = pick($settings_hash['murano_rabbit_user'], 'murano')
$murano_rabbit_password = pick($settings_hash['murano_rabbit_password'], $murano_base_hash['rabbit_password'])
$murano_rabbit_host = pick($settings_hash['murano_rabbit_vhost'], $murano_base_hash['rabbit']['vhost'])
$murano_rabbit_port = pick($settings_hash['murano_rabbit_port'], $murano_base_hash['rabbit']['port'])
$murano_cfapi_enabled = $murano_plugin['murano_cfapi']
$murano_repo_url = $murano_plugin['murano_repo_url']
@ -55,6 +57,8 @@ murano_plugin:
%> - <%= muranoname %>
<% end -%>
rabbit:
user: <%= @murano_rabbit_user %>
password: <%= @murano_rabbit_password %>
vhost: <%= @murano_rabbit_host %>
port: <%= @murano_rabbit_port %>
db_password: <%= @murano_db_password %>

View File

@ -1,17 +1,8 @@
notice('MODULAR: murano_rabbitmq.pp')
$rabbit_hash = hiera_hash('rabbit', {})
$murano_hash = hiera_hash('murano_plugin', {})
if $rabbit_hash == {} {
fail('No rabbit_hash defined')
}
if !$rabbit_hash['password'] {
fail('Rabbit password is not set')
}
$rabbit_user = pick($rabbit_hash['user'], 'nova')
$rabbit_password = $rabbit_hash['password']
$murano_hash = hiera_hash('murano_plugin', {})
$rabbit_user = $murano_hash['rabbit']['user']
$rabbit_password = $murano_hash['rabbit']['password']
$rabbit_vhost = $murano_hash['rabbit']['vhost']
$rabbit_node_name = 'murano@localhost'
$rabbit_service_name = 'murano-rabbitmq'