Add module to prime a devstack template host.
Change-Id: I92790b1adad5ad9c04f6acb548d869c78e56ceb4
This commit is contained in:
parent
2704e9d473
commit
61b0db8129
@ -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:
|
||||||
#
|
#
|
||||||
|
4
modules/devstack_host/files/rabbitmq-env.conf
Normal file
4
modules/devstack_host/files/rabbitmq-env.conf
Normal 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
|
37
modules/devstack_host/manifests/init.pp
Normal file
37
modules/devstack_host/manifests/init.pp
Normal 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",
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user