Fix glance api servers for nova compute

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-08-03 13:25:45 +02:00
parent 8989717cd1
commit 51d1221189
3 changed files with 20 additions and 2 deletions

View File

@ -363,7 +363,10 @@ def deploy():
# NOVA COMPUTE
# Deploy chain (nova, node_networking(TODO)) -> (nova_compute_libvirt, nova_neutron) -> nova_compute
nova_compute_puppet = vr.create('nova_compute_puppet', 'resources/nova_compute_puppet', {})[0]
nova_puppet2 = vr.create('nova_puppet2', 'resources/nova_puppet', {})[0]
# TODO (bogdando) figure out how to use it for multiple glance api servers
nova_puppet2 = vr.create('nova_puppet2', 'resources/nova_puppet', {
'glance_api_servers': '{{glance_api_servers_host}}:{{glance_api_servers_port}}'
})[0]
signals.connect(nova_puppet, nova_puppet2, {
'ensure_package', 'rabbit_host',
'rabbit_password', 'rabbit_port', 'rabbit_userid',
@ -454,6 +457,12 @@ def deploy():
'pipeline': 'keystone',
})
# Update glance_api_service for nova compute
signals.connect(glance_api_puppet, nova_puppet2, {
'ip': 'glance_api_servers_host',
'bind_port': 'glance_api_servers_port'
})
has_errors = False
for r in locals().values():
if not isinstance(r, resource.Resource):

View File

@ -4,6 +4,8 @@ $db_user = $resource['input']['db_user']['value']
$db_password = $resource['input']['db_password']['value']
$db_name = $resource['input']['db_name']['value']
$db_host = $resource['input']['db_host']['value']
$glance_api_servers_host = $resource['input']['glance_api_servers_host']['value']
$glance_api_servers_port = $resource['input']['glance_api_servers_port']['value']
$ensure_package = $resource['input']['ensure_package']['value']
$database_connection = $resource['input']['database_connection']['value']
@ -76,7 +78,7 @@ class { 'nova':
database_idle_timeout => $database_idle_timeout,
rpc_backend => $rpc_backend,
image_service => $image_service,
glance_api_servers => $glance_api_servers,
glance_api_servers => "${glance_api_servers_host}:${glance_api_servers_port}",
memcached_servers => $memcached_servers,
rabbit_host => $rabbit_host,
rabbit_hosts => $rabbit_hosts,

View File

@ -222,6 +222,13 @@ input:
schema: str!
value:
glance_api_servers_port:
schema: int
value: 9292
glance_api_servers_host:
schema: 'str'
value: 'localhost'
port:
schema: int!
value: 8774