commit
bd9853a2bf
@ -16,13 +16,16 @@ class cinder::api (
|
||||
Cinder_config<||> ~> Service['cinder-api']
|
||||
Cinder_config<||> ~> Exec['cinder-manage db_sync']
|
||||
Cinder_api_paste_ini<||> ~> Service['cinder-api']
|
||||
|
||||
if $::cinder::params::api_package {
|
||||
Package['cinder-api'] -> Cinder_config<||>
|
||||
Package['cinder-api'] -> Cinder_api_paste_ini<||>
|
||||
|
||||
Package['cinder-api'] -> Service['cinder-api']
|
||||
package { 'cinder-api':
|
||||
name => $::cinder::params::api_package,
|
||||
ensure => $package_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
if $enabled {
|
||||
$ensure = 'running'
|
||||
@ -34,7 +37,7 @@ class cinder::api (
|
||||
name => $::cinder::params::api_service,
|
||||
enable => $enabled,
|
||||
ensure => $ensure,
|
||||
require => Package[$::cinder::params::api_package],
|
||||
require => Package['cinder'],
|
||||
}
|
||||
|
||||
if $keystone_enabled {
|
||||
|
@ -2,6 +2,7 @@ class cinder::client(
|
||||
$package_ensure = 'present'
|
||||
) {
|
||||
package { 'python-cinderclient':
|
||||
name => $::cinder::params::client_package,
|
||||
ensure => $package_ensure,
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ class cinder::params {
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
$package_name = 'cinder-common'
|
||||
$client_package = 'python-cinderclient'
|
||||
$api_package = 'cinder-api'
|
||||
$api_service = 'cinder-api'
|
||||
$scheduler_package = 'cinder-scheduler'
|
||||
@ -16,6 +17,21 @@ class cinder::params {
|
||||
|
||||
$tgt_package_name = 'tgt'
|
||||
$tgt_service_name = 'tgt'
|
||||
|
||||
} elsif($::osfamily == 'RedHat') {
|
||||
|
||||
$package_name = 'openstack-cinder'
|
||||
$client_package = 'python-cinderclient'
|
||||
$api_package = false
|
||||
$api_service = 'openstack-cinder-api'
|
||||
$scheduler_package = false
|
||||
$scheduler_service = 'openstack-cinder-scheduler'
|
||||
$volume_package = false
|
||||
$volume_service = 'openstack-cinder-volume'
|
||||
$db_sync_command = 'cinder-manage db sync'
|
||||
$tgt_package_name = 'scsi-target-utils'
|
||||
$tgt_service_name = 'tgtd'
|
||||
|
||||
} else {
|
||||
fail("unsuported osfamily ${::osfamily}, currently Debian is the only supported platform")
|
||||
}
|
||||
|
@ -6,15 +6,18 @@ class cinder::scheduler (
|
||||
|
||||
include cinder::params
|
||||
|
||||
Package['cinder-scheduler'] -> Cinder_config<||>
|
||||
Package['cinder-scheduler'] -> Cinder_api_paste_ini<||>
|
||||
Cinder_api_paste_ini<||> ~> Service['cinder-scheduler']
|
||||
Exec<| title == 'cinder-manage db_sync' |> ~> Service['cinder-scheduler']
|
||||
|
||||
if $::cinder::params::scheduler_package {
|
||||
Package['cinder-scheduler'] -> Cinder_config<||>
|
||||
Package['cinder-scheduler'] -> Cinder_api_paste_ini<||>
|
||||
Package['cinder-scheduler'] -> Service['cinder-scheduler']
|
||||
package { 'cinder-scheduler':
|
||||
name => $::cinder::params::scheduler_package,
|
||||
ensure => $package_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
if $enabled {
|
||||
$ensure = 'running'
|
||||
@ -26,7 +29,7 @@ class cinder::scheduler (
|
||||
name => $::cinder::params::scheduler_service,
|
||||
enable => $enabled,
|
||||
ensure => $ensure,
|
||||
require => Package[$::cinder::params::scheduler_package],
|
||||
require => Package['cinder'],
|
||||
subscribe => File[$::cinder::params::cinder_conf],
|
||||
}
|
||||
}
|
||||
|
@ -6,16 +6,19 @@ class cinder::volume (
|
||||
|
||||
include cinder::params
|
||||
|
||||
Package['cinder-volume'] -> Cinder_config<||>
|
||||
Package['cinder-volume'] -> Cinder_api_paste_ini<||>
|
||||
Package['cinder'] -> Package['cinder-volume']
|
||||
Cinder_config<||> ~> Service['cinder-volume']
|
||||
Cinder_api_paste_ini<||> ~> Service['cinder-volume']
|
||||
|
||||
if $::cinder::params::volume_package {
|
||||
Package['cinder-volume'] -> Cinder_config<||>
|
||||
Package['cinder-volume'] -> Cinder_api_paste_ini<||>
|
||||
Package['cinder'] -> Package['cinder-volume']
|
||||
Package['cinder-volume'] -> Service['cinder-volume']
|
||||
package { 'cinder-volume':
|
||||
name => $::cinder::params::volume_package,
|
||||
ensure => $package_ensure,
|
||||
}
|
||||
}
|
||||
|
||||
if $enabled {
|
||||
$ensure = 'running'
|
||||
@ -27,7 +30,7 @@ class cinder::volume (
|
||||
name => $::cinder::params::volume_service,
|
||||
enable => $enabled,
|
||||
ensure => $ensure,
|
||||
require => Package['cinder-volume'],
|
||||
require => Package['cinder'],
|
||||
subscribe => File[$::cinder::params::cinder_conf],
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user