Add module to prime a devstack template host.

Change-Id: I92790b1adad5ad9c04f6acb548d869c78e56ceb4
This commit is contained in:
James E. Blair 2011-11-16 08:36:14 -08:00
parent 2704e9d473
commit 61b0db8129
3 changed files with 47 additions and 0 deletions

View File

@ -155,6 +155,12 @@ node "docs.openstack.org" {
include doc_server include doc_server
} }
node "devstack-oneiric.template.openstack.org" {
include openstack_server
include devstack_host
}
# #
# Jenkins slaves: # Jenkins slaves:
# #

View File

@ -0,0 +1,4 @@
# This file is managed by puppet
# Use localhost in the node name so that we don't need to
# touch /etc/hosts or use dns
NODENAME=rabbit@localhost

View File

@ -0,0 +1,37 @@
# A machine ready to run devstack
class devstack_host {
package { "mysql-server":
ensure => "latest",
}
package { "rabbitmq-server":
ensure => "latest",
require => File['rabbitmq-env.conf'],
}
file { "/etc/rabbitmq":
ensure => "directory",
}
file { 'rabbitmq-env.conf':
name => '/etc/rabbitmq/rabbitmq-env.conf',
owner => 'root',
group => 'root',
mode => 444,
ensure => 'present',
source => [
"puppet:///modules/devstack_host/rabbitmq-env.conf",
],
require => File['/etc/rabbitmq'],
}
exec { "Set MySQL server root password":
subscribe => [ Package["mysql-server"]],
refreshonly => true,
unless => "mysqladmin -uroot -psecret status",
path => "/bin:/usr/bin",
command => "mysqladmin -uroot password secret",
}
}