Add nova conductor resource

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-07-30 15:47:26 +02:00
parent 43843b6f61
commit 041161cf17
5 changed files with 83 additions and 0 deletions

View File

@ -355,6 +355,11 @@ def deploy():
'keystone_host': 'auth_host',
'keystone_port': 'auth_port'})
# NOVA CONDUCTOR
nova_conductor_puppet = vr.create('nova_conductor_puppet', 'resources/nova_conductor_puppet', {})[0]
signals.connect(node1, nova_conductor_puppet)
signals.connect(nova_puppet, nova_conductor_puppet)
# signals.connect(keystone_puppet, nova_network_puppet, {'ip': 'keystone_host', 'port': 'keystone_port'})
# signals.connect(keystone_puppet, nova_keystone_service_endpoint, {'ip': 'keystone_host', 'admin_port': 'keystone_port', 'admin_token': 'admin_token'})
# signals.connect(rabbitmq_service1, nova_network_puppet, {'ip': 'rabbitmq_host', 'port': 'rabbitmq_port'})
@ -482,6 +487,7 @@ def deploy():
actions.resource_action(nova_puppet, 'run')
actions.resource_action(nova_keystone_service_endpoint, 'run')
actions.resource_action(nova_api_puppet, 'run')
actions.resource_action(nova_conductor_puppet, 'run')
actions.resource_action(glance_db, 'run')
actions.resource_action(glance_db_user, 'run')
@ -511,6 +517,7 @@ def undeploy():
'nova_db',
'nova_db_user',
'nova_keystone_service_endpoint',
'nova_conductor_puppet',
'nova_api_puppet',
'nova_puppet',
'cinder_volume_puppet',

View File

@ -0,0 +1,16 @@
# Nova conductor resource for puppet handler
Setup and configure the Nova conductor service.
Note, it [should not](http://docs.openstack.org/juno/config-reference/content/section_conductor.html) be deployed on compute nodes.
# Parameters
source https://github.com/openstack/puppet-nova_conductor/blob/5.1.0/manifests/conductor.pp
``ensure_package``
(optional) The state of the nova conductor package
Defaults to 'present'
``workers``
(optional) Number of workers for OpenStack Conductor service
Defaults to undef (i.e. parameter will not be present)

View File

@ -0,0 +1,11 @@
class { 'nova::conductor':
ensure_package => 'absent',
enabled => false,
}
include nova::params
package { 'nova-common':
name => $nova::params::common_package_name,
ensure => 'absent',
}

View File

@ -0,0 +1,22 @@
$resource = hiera($::resource_name)
$ensure_package = $resource['input']['ensure_package']['value']
$workers = $resource['input']['workers']['value']
exec { 'post-nova_config':
command => '/bin/echo "Nova config has changed"',
}
include nova::params
package { 'nova-common':
name => $nova::params::common_package_name,
ensure => $ensure_package,
}
class { 'nova::conductor':
enabled => true,
manage_service => true,
ensure_package => $ensure_package,
workers => $workers,
}

View File

@ -0,0 +1,27 @@
id: nova_conductor
handler: puppet
puppet_module: nova
version: 1.0.0
input:
ensure_package:
schema: str
value: 'present'
workers:
schema: int
value: 1
git:
schema: {repository: str!, branch: str!}
value: {repository: 'https://github.com/openstack/puppet-nova', branch: '5.1.0'}
ip:
schema: str!
value:
ssh_key:
schema: str!
value:
ssh_user:
schema: str!
value:
tags: [resource/nova_conductor_service, resources/nova_conductor, resources/nova]