Merge pull request #47 from Mirantis/bogdando/cinder_volume_puppet
Bogdando/cinder volume puppet
This commit is contained in:
commit
a7a60d8642
@ -273,6 +273,11 @@ def deploy():
|
||||
signals.connect(node1, cinder_scheduler_puppet)
|
||||
signals.connect(cinder_puppet, cinder_scheduler_puppet)
|
||||
|
||||
# CINDER VOLUME
|
||||
cinder_volume_puppet = vr.create('cinder_volume_puppet', 'resources/cinder_volume_puppet', {})[0]
|
||||
signals.connect(node1, cinder_volume_puppet)
|
||||
signals.connect(cinder_puppet, cinder_volume_puppet)
|
||||
|
||||
# NOVA
|
||||
# #nova_network_puppet = vr.create('nova_network_puppet', GitProvider(GIT_PUPPET_LIBS_URL, 'nova_network'), {'rabbitmq_user': 'guest', 'rabbitmq_password': 'guest'})[0]
|
||||
# # TODO: fix rabbitmq user/password
|
||||
@ -344,7 +349,7 @@ def deploy():
|
||||
actions.resource_action(cinder_keystone_service_endpoint, 'run')
|
||||
actions.resource_action(cinder_api_puppet, 'run')
|
||||
actions.resource_action(cinder_scheduler_puppet, 'run')
|
||||
|
||||
actions.resource_action(cinder_volume_puppet, 'run')
|
||||
# actions.resource_action(nova_keystone_user, 'run')
|
||||
# actions.resource_action(nova_keystone_role, 'run')
|
||||
|
||||
@ -359,6 +364,7 @@ def undeploy():
|
||||
db = get_db()
|
||||
|
||||
to_remove = [
|
||||
'cinder_volume_puppet',
|
||||
'cinder_scheduler_puppet',
|
||||
'cinder_api_puppet',
|
||||
'cinder_keystone_service_endpoint',
|
||||
|
3
resources/cinder_volume_puppet/README.md
Normal file
3
resources/cinder_volume_puppet/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Cinder Volume resource for puppet handler
|
||||
|
||||
Setup and configure the cinder volume service
|
4
resources/cinder_volume_puppet/actions/remove.pp
Normal file
4
resources/cinder_volume_puppet/actions/remove.pp
Normal file
@ -0,0 +1,4 @@
|
||||
class {'cinder::volume':
|
||||
enabled => false,
|
||||
package_ensure => 'absent',
|
||||
}
|
16
resources/cinder_volume_puppet/actions/run.pp
Normal file
16
resources/cinder_volume_puppet/actions/run.pp
Normal file
@ -0,0 +1,16 @@
|
||||
$resource = hiera($::resource_name)
|
||||
|
||||
$package_ensure = $resource['input']['package_ensure']['value']
|
||||
|
||||
include cinder::params
|
||||
|
||||
package { 'cinder':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::package_name,
|
||||
} ->
|
||||
|
||||
class {'cinder::volume':
|
||||
package_ensure => $package_ensure,
|
||||
enabled => true,
|
||||
manage_service => true,
|
||||
}
|
24
resources/cinder_volume_puppet/meta.yaml
Normal file
24
resources/cinder_volume_puppet/meta.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
id: cinder_volume_puppet
|
||||
handler: puppet
|
||||
puppet_module: cinder_volume
|
||||
version: 1.0.0
|
||||
input:
|
||||
package_ensure:
|
||||
schema: str
|
||||
value: 'present'
|
||||
|
||||
git:
|
||||
schema: {repository: str!, branch: str!}
|
||||
value: {repository: 'https://github.com/openstack/puppet-cinder', branch: '5.1.0'}
|
||||
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_key:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_user:
|
||||
schema: str!
|
||||
value:
|
||||
|
||||
tags: [resource/cinder_volume_service, resources/cinder_volume, resources/cinder]
|
12
resources/cinder_volume_puppet/test.py
Normal file
12
resources/cinder_volume_puppet/test.py
Normal file
@ -0,0 +1,12 @@
|
||||
import requests
|
||||
|
||||
from solar.core.log import log
|
||||
|
||||
|
||||
def test(resource):
|
||||
log.debug('Testing cinder_volume_puppet')
|
||||
# requests.get(
|
||||
# 'http://%s:%s' % (resource.args['ip'].value, resource.args['port'].value)
|
||||
# TODO(bogdando) figure out how to test this
|
||||
# http://docs.openstack.org/developer/nova/devref/volume.html
|
||||
# )
|
Loading…
x
Reference in New Issue
Block a user