Added cert and volume services
This commit is contained in:
parent
e66e5ab7c4
commit
faa117fe21
19
manifests/cert.pp
Normal file
19
manifests/cert.pp
Normal 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"]
|
||||
}
|
||||
}
|
@ -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
32
manifests/volume.pp
Normal 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"],
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user