Added cert and volume services

This commit is contained in:
Derek Higgins 2012-03-16 12:53:06 +00:00 committed by root
parent e66e5ab7c4
commit faa117fe21
3 changed files with 60 additions and 1 deletions

19
manifests/cert.pp Normal file
View File

@ -0,0 +1,19 @@
class nova::cert( $enabled=false ) {
Exec['post-nova_config'] ~> Service['nova-cert']
Exec['nova-db-sync'] ~> Service['nova-cert']
if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
service { "nova-cert":
name => 'openstack-nova-cert',
ensure => $service_ensure,
enable => $enabled,
require => Package["openstack-nova"],
#subscribe => File["/etc/nova/nova.conf"]
}
}

View File

@ -56,7 +56,15 @@ class nova::controller(
flat_network_bridge_netmask => $flat_network_bridge_netmask,
}
class { "nova::objectstore":
class { "nova::objectstore":
enabled => true,
}
class { "nova::cert":
enabled => true,
}
class { "nova::volume":
enabled => true,
}

32
manifests/volume.pp Normal file
View File

@ -0,0 +1,32 @@
class nova::volume( $enabled=false ) {
Exec['post-nova_config'] ~> Service['nova-volume']
Exec['nova-db-sync'] ~> Service['nova-volume']
if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
exec {volumes:
command => 'dd if=/dev/zero of=/tmp/nova-volumes.img bs=1M seek=20k count=0 && /sbin/vgcreate nova-volumes `/sbin/losetup --show -f /tmp/nova-volumes.img`',
onlyif => 'test ! -e /tmp/nova-volumes.img',
path => ["/usr/bin", "/bin", "/usr/local/bin"],
before => Service['nova-volume'],
}
service { "nova-volume":
name => 'openstack-nova-volume',
ensure => $service_ensure,
enable => $enabled,
require => Package["openstack-nova"],
#subscribe => File["/etc/nova/nova.conf"]
}
service {'tgtd':
ensure => $service_ensure,
enable => $enabled,
require => Package["openstack-nova"],
}
}