Merge pull request #26 from bodepd/issue/master/ordering_fixes

Resolved ordering issues
This commit is contained in:
Dan Bode 2011-06-20 10:11:46 -07:00
commit e6a30374ee
8 changed files with 24 additions and 19 deletions

View File

@ -1,4 +1,6 @@
class nova::api($enabled=false) inherits nova {
class nova::api($enabled=false) {
Nova_config<| |> ~> Service['nova-api']
if $enabled {
$service_ensure = 'running'

View File

@ -8,7 +8,7 @@ class nova::compute(
$libvirt_type = 'kvm'
) {
Nova_config<| |>~>Service['nova-compute']
Nova_config<| |> ~> Service['nova-compute']
nova_config { 'libvirt_type': value => $libvirt_type }
@ -20,13 +20,14 @@ class nova::compute(
package { "nova-compute":
ensure => present,
require => Class['nova'],
require => Package['nova-common'],
}
service { "nova-compute":
ensure => $service_ensure,
enable => $enabled,
require => Package["nova-compute"],
before => Exec['networking-refresh'],
}
# forward guest metadata requests to correct API server

View File

@ -6,6 +6,9 @@ class nova::db(
$cluster_id = 'localzone'
) {
# only start configuring nova after the database is setup
Mysql::Db[$name] -> Nova_config<| |>
# now this requires storedconfigs
# TODO - worry about the security implications
@@nova_config { 'database_url':

View File

@ -1,4 +1,6 @@
class nova::network( $enabled=false ) inherits nova {
class nova::network( $enabled=false ) {
Nova_config<| |> ~> Service['nova-network']
if $enabled {
$service_ensure = 'running'
@ -15,6 +17,7 @@ class nova::network( $enabled=false ) inherits nova {
ensure => $service_ensure,
enable => $enabled,
require => Package["nova-network"],
before => Exec['networking-refresh'],
#subscribe => File["/etc/nova/nova.conf"]
}
}

View File

@ -1,4 +1,6 @@
class nova::objectstore( $enabled=false ) inherits nova {
class nova::objectstore( $enabled=false ) {
Nova_config<| |> ~> Service['nova-objectstore']
if $enabled {
$service_ensure = 'running'

View File

@ -9,6 +9,10 @@ class nova::rabbitmq(
$virtual_host='/',
$install_repo = false
) {
# only configure nova after the queue is up
Class['rabbitmq::service'] -> Nova_config<| |>
if $install_repo {
# this is debian specific
class { 'rabbitmq::repo::apt':
@ -32,7 +36,7 @@ class nova::rabbitmq(
write_permission => '.*',
read_permission => '.*',
provider => 'rabbitmqctl',
}
}->Nova_config<| |>
}
class { 'rabbitmq::server':
port => $port,

View File

@ -1,4 +1,6 @@
class nova::scheduler( $enabled ) inherits nova {
class nova::scheduler( $enabled ) {
Nova_config<| |> ~> Service['nova-scheduler']
if $enabled {
$service_ensure = 'running'

View File

@ -1,18 +1,6 @@
resources { 'nova_config':
purge => true,
}
stage { 'repo-setup':
before => Stage['main'],
}
#class { 'apt':
# disable_keys => true,
# #always_apt_update => true,
# stage => 'repo-setup',
#}
#class { 'nova::repo':
# stage => 'repo-setup',
#}
class { 'mysql::server': }
class { 'nova::all':
db_password => 'password',