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 ce6db69711
commit 6ca7a3e621
4 changed files with 76 additions and 0 deletions

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]