removed the confighash
changed isserviceenabled flag to enable. - updated it to effect ensure and enable state of service
This commit is contained in:
parent
ef9cc48812
commit
87a5091e3a
|
@ -18,31 +18,12 @@ class nova::all(
|
||||||
$ipv6_backend = 'account_identifier'
|
$ipv6_backend = 'account_identifier'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$novaConfFlags = {
|
class { "nova": }
|
||||||
verbose => $verbose,
|
class { "nova::api": enabled => false }
|
||||||
nodaemon => $nodaemon,
|
class { "nova::compute": enabled => false }
|
||||||
sql_connection => $sql_connetion,
|
class { "nova::network": enabled => false }
|
||||||
network_manager => $network_manager,
|
class { "nova::objectstore": enabled => false }
|
||||||
image_service => $image_service,
|
class { "nova::scheduler": enabled => false }
|
||||||
flat_network_bridge => $flat_network_bridge,
|
|
||||||
connection_type => $connection_type,
|
|
||||||
xenapi_connection_url => $xenapi_connection_url,
|
|
||||||
xenapi_connection_username => $xenapi_connection_username,
|
|
||||||
xenapi_connection_password => $xenapi_connection_password,
|
|
||||||
xenapi_inject_image => $xenapi_inject_image,
|
|
||||||
rescue_timeout => $resuce_timeout,
|
|
||||||
allow_admin_api => $allow_admin_api,
|
|
||||||
xenapi_inject_image => $xenapi_inject_image,
|
|
||||||
use_ipv6 => $use_ipv6,
|
|
||||||
flat_injected => $flat_injected,
|
|
||||||
ipv6_backend => $ipv6_backend
|
|
||||||
}
|
|
||||||
class { "nova": novaConfHash => $novaConfFlags }
|
|
||||||
class { "nova::api": isServiceEnabled => false }
|
|
||||||
class { "nova::compute": isServiceEnabled => false }
|
|
||||||
class { "nova::network": isServiceEnabled => false }
|
|
||||||
class { "nova::objectstore": isServiceEnabled => false }
|
|
||||||
class { "nova::scheduler": isServiceEnabled => false }
|
|
||||||
class { 'nova::db':
|
class { 'nova::db':
|
||||||
password => 'password',
|
password => 'password',
|
||||||
name => 'nova',
|
name => 'nova',
|
||||||
|
|
|
@ -1,10 +1,18 @@
|
||||||
class nova::api($isServiceEnabled=false) inherits nova {
|
class nova::api($enabled=false) inherits nova {
|
||||||
|
|
||||||
|
if $enabled {
|
||||||
|
$service_ensure = 'running'
|
||||||
|
} else {
|
||||||
|
$service_ensure = 'stopped'
|
||||||
|
}
|
||||||
|
|
||||||
package { "nova-api":
|
package { "nova-api":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
require => Package["python-greenlet"]
|
require => Package["python-greenlet"]
|
||||||
}
|
}
|
||||||
service { "nova-api":
|
service { "nova-api":
|
||||||
ensure => $isServiceEnabled,
|
ensure => $service_ensure,
|
||||||
|
enable => $enabled,
|
||||||
require => Package["nova-api"],
|
require => Package["nova-api"],
|
||||||
subscribe => File["/etc/nova/nova.conf"]
|
subscribe => File["/etc/nova/nova.conf"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
class nova(
|
class nova(
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$nodaemon = false,
|
$nodaemon = false
|
||||||
sql_connection,
|
$logdir = ''
|
||||||
|
$sql_connection,
|
||||||
# just for network?
|
# just for network?
|
||||||
network_manager
|
$network_manager
|
||||||
) {
|
) {
|
||||||
|
|
||||||
class { 'puppet': }
|
class { 'puppet': }
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
class nova::network( $isServiceEnabled=false ) inherits nova {
|
class nova::network( $enabled=false ) inherits nova {
|
||||||
|
|
||||||
|
if $enabled {
|
||||||
|
$service_ensure = 'running'
|
||||||
|
} else {
|
||||||
|
$service_ensure = 'stopped'
|
||||||
|
}
|
||||||
|
|
||||||
package { "nova-network":
|
package { "nova-network":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
require => Package["python-greenlet"]
|
require => Package["python-greenlet"]
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "nova-network":
|
service { "nova-network":
|
||||||
ensure => $isServiceEnabled,
|
ensure => $service_ensure,
|
||||||
|
enable => $enabled,
|
||||||
require => Package["nova-network"],
|
require => Package["nova-network"],
|
||||||
subscribe => File["/etc/nova/nova.conf"]
|
subscribe => File["/etc/nova/nova.conf"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
class nova::objectstore( $isServiceEnabled=false ) inherits nova {
|
class nova::objectstore( $enabled=false ) inherits nova {
|
||||||
|
|
||||||
|
if $enabled {
|
||||||
|
$service_ensure = 'running'
|
||||||
|
} else {
|
||||||
|
$service_ensure = 'stopped'
|
||||||
|
}
|
||||||
|
|
||||||
package { "nova-objectstore":
|
package { "nova-objectstore":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
require => Package["python-greenlet"]
|
require => Package["python-greenlet"]
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "nova-objectstore":
|
service { "nova-objectstore":
|
||||||
ensure => $isServiceEnabled,
|
ensure => $service_ensure,
|
||||||
|
enable => $enabled,
|
||||||
require => Package["nova-objectstore"],
|
require => Package["nova-objectstore"],
|
||||||
subscribe => File["/etc/nova/nova.conf"]
|
subscribe => File["/etc/nova/nova.conf"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
class nova::scheduler( $isServiceEnabled ) inherits nova {
|
class nova::scheduler( $enabled ) inherits nova {
|
||||||
|
|
||||||
|
if $enabled {
|
||||||
|
$service_ensure = 'running'
|
||||||
|
} else {
|
||||||
|
$service_ensure = 'stopped'
|
||||||
|
}
|
||||||
|
|
||||||
package { "nova-scheduler":
|
package { "nova-scheduler":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
require => Package["python-greenlet"]
|
require => Package["python-greenlet"]
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "nova-scheduler":
|
service { "nova-scheduler":
|
||||||
ensure => $isServiceEnabled,
|
ensure => $service_ensure,
|
||||||
|
enable => $enabled,
|
||||||
require => Package["nova-scheduler"],
|
require => Package["nova-scheduler"],
|
||||||
subscribe => File["/etc/nova/nova.conf"]
|
subscribe => File["/etc/nova/nova.conf"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,4 @@
|
||||||
class nova-api-test {
|
class { "nova":
|
||||||
$novaConfFlags = {
|
|
||||||
verbose => 'undef',
|
|
||||||
nodaemon => 'undef',
|
|
||||||
sql_connection => 'mysql://root:<password>@127.0.0.1/nova',
|
|
||||||
network_manager => 'nova.network.manager.FlatManager',
|
|
||||||
image_service => 'nova.image.glance.GlanceImageService',
|
|
||||||
flat_network_bridge => 'xenbr0',
|
|
||||||
connection_type => 'xenapi',
|
|
||||||
xenapi_connection_url => 'https://<XenServer IP>',
|
|
||||||
xenapi_connection_username => 'root',
|
|
||||||
xenapi_connection_password => 'password',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
rescue_timeout => '86400',
|
|
||||||
allow_admin_api => 'true',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
use_ipv6 => 'false',
|
|
||||||
flat_injected => 'true',
|
|
||||||
ipv6_backend => 'account_identifier',
|
|
||||||
}
|
|
||||||
class { "nova": novaConfHash => $novaConfFlags }
|
|
||||||
class { "nova::api": isServiceEnabled => false }
|
|
||||||
}
|
}
|
||||||
include nova-api-test
|
class { "nova::api": enabled => false }
|
||||||
|
|
|
@ -1,32 +1,7 @@
|
||||||
#include nova::compute
|
|
||||||
class nova-compute-test {
|
|
||||||
$novaConfFlags = {
|
|
||||||
verbose => 'undef',
|
|
||||||
nodaemon => 'undef',
|
|
||||||
sql_connection => 'mysql://root:<password>@127.0.0.1/nova',
|
|
||||||
network_manager => 'nova.network.manager.FlatManager',
|
|
||||||
image_service => 'nova.image.glance.GlanceImageService',
|
|
||||||
flat_network_bridge => 'xenbr0',
|
|
||||||
connection_type => 'xenapi',
|
|
||||||
xenapi_connection_url => 'https://<XenServer IP>',
|
|
||||||
xenapi_connection_username => 'root',
|
|
||||||
xenapi_connection_password => 'password',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
rescue_timeout => '86400',
|
|
||||||
allow_admin_api => 'true',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
use_ipv6 => 'true',
|
|
||||||
flat_injected => 'true',
|
|
||||||
ipv6_backend => 'account_identifier',
|
|
||||||
}
|
|
||||||
class { "nova": novaConfHash => $novaConfFlags }
|
|
||||||
class { "nova::compute": isServiceEnabled => false }
|
|
||||||
}
|
|
||||||
include nova-compute-test
|
|
||||||
|
|
||||||
|
|
||||||
class { 'nova::compute':
|
class { 'nova::compute':
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'nova': }
|
class { 'nova':
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,24 +1,6 @@
|
||||||
class nova-network-test {
|
class { "nova":
|
||||||
$novaConfFlags = {
|
|
||||||
verbose => 'undef',
|
}
|
||||||
nodaemon => 'undef',
|
class { "nova::network":
|
||||||
sql_connection => 'mysql://root:<password>@127.0.0.1/nova',
|
enabled => false
|
||||||
network_manager => 'nova.network.manager.FlatManager',
|
|
||||||
image_service => 'nova.image.glance.GlanceImageService',
|
|
||||||
flat_network_bridge => 'xenbr0',
|
|
||||||
connection_type => 'xenapi',
|
|
||||||
xenapi_connection_url => 'https://<XenServer IP>',
|
|
||||||
xenapi_connection_username => 'root',
|
|
||||||
xenapi_connection_password => 'password',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
rescue_timeout => '86400',
|
|
||||||
allow_admin_api => 'true',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
use_ipv6 => 'true',
|
|
||||||
flat_injected => 'true',
|
|
||||||
ipv6_backend => 'account_identifier',
|
|
||||||
}
|
|
||||||
class { "nova": novaConfHash => $novaConfFlags }
|
|
||||||
class { "nova::network": isServiceEnabled => false }
|
|
||||||
}
|
}
|
||||||
include nova-network-test
|
|
||||||
|
|
|
@ -1,24 +1,6 @@
|
||||||
class nova-objectstore-test {
|
class { "nova":
|
||||||
$novaConfFlags = {
|
|
||||||
verbose => 'undef',
|
}
|
||||||
nodaemon => 'undef',
|
class { "nova::objectstore":
|
||||||
sql_connection => 'mysql://root:<password>@127.0.0.1/nova',
|
enabled => false
|
||||||
network_manager => 'nova.network.manager.FlatManager',
|
|
||||||
image_service => 'nova.image.glance.GlanceImageService',
|
|
||||||
flat_network_bridge => 'xenbr0',
|
|
||||||
connection_type => 'xenapi',
|
|
||||||
xenapi_connection_url => 'https://<XenServer IP>',
|
|
||||||
xenapi_connection_username => 'root',
|
|
||||||
xenapi_connection_password => 'password',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
rescue_timeout => '86400',
|
|
||||||
allow_admin_api => 'true',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
use_ipv6 => 'true',
|
|
||||||
flat_injected => 'true',
|
|
||||||
ipv6_backend => 'account_identifier',
|
|
||||||
}
|
|
||||||
class { "nova": novaConfHash => $novaConfFlags }
|
|
||||||
class { "nova::objectstore": isServiceEnabled => false }
|
|
||||||
}
|
}
|
||||||
include nova-objectstore-test
|
|
||||||
|
|
|
@ -1,24 +1,6 @@
|
||||||
class nova-scheduler-test {
|
class { "nova":
|
||||||
$novaConfFlags = {
|
|
||||||
verbose => 'undef',
|
}
|
||||||
nodaemon => 'undef',
|
class { "nova::scheduler":
|
||||||
sql_connection => 'mysql://root:<password>@127.0.0.1/nova',
|
enabled => false
|
||||||
network_manager => 'nova.network.manager.FlatManager',
|
|
||||||
image_service => 'nova.image.glance.GlanceImageService',
|
|
||||||
flat_network_bridge => 'xenbr0',
|
|
||||||
connection_type => 'xenapi',
|
|
||||||
xenapi_connection_url => 'https://<XenServer IP>',
|
|
||||||
xenapi_connection_username => 'root',
|
|
||||||
xenapi_connection_password => 'password',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
rescue_timeout => '86400',
|
|
||||||
allow_admin_api => 'true',
|
|
||||||
xenapi_inject_image => 'false',
|
|
||||||
use_ipv6 => 'true',
|
|
||||||
flat_injected => 'true',
|
|
||||||
ipv6_backend => 'account_identifier',
|
|
||||||
}
|
|
||||||
class { "nova": novaConfHash => $novaConfFlags }
|
|
||||||
class { "nova::scheduler": isServiceEnabled => false }
|
|
||||||
}
|
}
|
||||||
include nova-scheduler-test
|
|
||||||
|
|
Loading…
Reference in New Issue