Neutron fixes

- use correct role name
- use correct rabbitmq user/password
- set vhost name
This commit is contained in:
Łukasz Oleś 2015-07-20 22:30:33 +00:00
parent 94ad34c121
commit 322e1bb8a0
3 changed files with 13 additions and 6 deletions

View File

@ -154,17 +154,14 @@ def deploy():
# NEUTRON # NEUTRON
# TODO: vhost cannot be specified in neutron Puppet manifests so this user has to be admin anyways # TODO: vhost cannot be specified in neutron Puppet manifests so this user has to be admin anyways
neutron_puppet = vr.create('neutron_puppet', 'resources/neutron_puppet', { neutron_puppet = vr.create('neutron_puppet', 'resources/neutron_puppet', {})[0]
'rabbitmq_user': 'guest',
'rabbitmq_password': 'guest'
})[0]
neutron_keystone_user = vr.create('neutron_keystone_user', 'resources/keystone_user', { neutron_keystone_user = vr.create('neutron_keystone_user', 'resources/keystone_user', {
'user_name': 'neutron', 'user_name': 'neutron',
'user_password': 'neutron' 'user_password': 'neutron'
})[0] })[0]
neutron_keystone_role = vr.create('neutron_keystone_role', 'resources/keystone_role', { neutron_keystone_role = vr.create('neutron_keystone_role', 'resources/keystone_role', {
'role_name': 'neutron' 'role_name': 'admin'
})[0] })[0]
neutron_keystone_service_endpoint = vr.create('neutron_keystone_service_endpoint', 'resources/keystone_service_endpoint', { neutron_keystone_service_endpoint = vr.create('neutron_keystone_service_endpoint', 'resources/keystone_service_endpoint', {
'endpoint_name': 'neutron', 'endpoint_name': 'neutron',
@ -180,6 +177,11 @@ def deploy():
'ip': 'rabbitmq_host', 'ip': 'rabbitmq_host',
'port': 'rabbitmq_port' 'port': 'rabbitmq_port'
}) })
signals.connect(openstack_rabbitmq_user, neutron_puppet, {
'user_name': 'rabbitmq_user',
'password': 'rabbitmq_password'})
signals.connect(openstack_vhost, neutron_puppet, {
'vhost_name': 'rabbitmq_virtual_host'})
signals.connect(admin_user, neutron_puppet, { signals.connect(admin_user, neutron_puppet, {
'user_name': 'keystone_user', 'user_name': 'keystone_user',
'user_password': 'keystone_password', 'user_password': 'keystone_password',

View File

@ -1,4 +1,4 @@
$resource = hiera('{{ resource_name }}') $resource = hiera($::resource_name)
$ip = $resource['input']['ip']['value'] $ip = $resource['input']['ip']['value']
@ -6,6 +6,7 @@ $rabbitmq_user = $resource['input']['rabbitmq_user']['value']
$rabbitmq_password = $resource['input']['rabbitmq_password']['value'] $rabbitmq_password = $resource['input']['rabbitmq_password']['value']
$rabbitmq_host = $resource['input']['rabbitmq_host']['value'] $rabbitmq_host = $resource['input']['rabbitmq_host']['value']
$rabbitmq_port = $resource['input']['rabbitmq_port']['value'] $rabbitmq_port = $resource['input']['rabbitmq_port']['value']
$rabbitmq_virtual_host = $resource['input']['rabbitmq_virtual_host']['value']
$keystone_host = $resource['input']['keystone_host']['value'] $keystone_host = $resource['input']['keystone_host']['value']
$keystone_port = $resource['input']['keystone_port']['value'] $keystone_port = $resource['input']['keystone_port']['value']
@ -23,6 +24,7 @@ class { 'neutron':
rabbit_password => $rabbitmq_password, rabbit_password => $rabbitmq_password,
rabbit_host => $rabbitmq_host, rabbit_host => $rabbitmq_host,
rabbit_port => $rabbitmq_port, rabbit_port => $rabbitmq_port,
rabbit_virtual_host => $rabbitmq_virtual_host,
service_plugins => ['metering'] service_plugins => ['metering']
} }

View File

@ -24,6 +24,9 @@ input:
rabbitmq_password: rabbitmq_password:
schema: str! schema: str!
value: '' value: ''
rabbitmq_virtual_host:
schema: str!
value: ''
git: git:
schema: {repository: str!, branch: str!} schema: {repository: str!, branch: str!}