Merge "Add support for puppet dashboard."
This commit is contained in:
commit
3a1eaf9365
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
MODULES="puppetlabs-mysql"
|
||||
MODULES="puppetlabs-mysql puppetlabs-dashboard"
|
||||
MODULE_LIST=`puppet module list`
|
||||
|
||||
for MOD in $MODULES ; do
|
||||
@ -9,3 +9,24 @@ for MOD in $MODULES ; do
|
||||
puppet module install $MOD >/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
# Fix a problem with the released verison of the dashboard module
|
||||
if grep scope.lookupvar /etc/puppet/modules/dashboard/templates/passenger-vhost.erb | grep dashboard_port >/dev/null 2>&1 ; then
|
||||
|
||||
cd /etc/puppet/modules/dashboard
|
||||
echo | patch -p1 <<'EOD'
|
||||
diff --git a/templates/passenger-vhost.erb b/templates/passenger-vhost.erb
|
||||
index a2f6d16..de7dd0a 100644
|
||||
--- a/templates/passenger-vhost.erb
|
||||
+++ b/templates/passenger-vhost.erb
|
||||
@@ -1,6 +1,6 @@
|
||||
-Listen <%= scope.lookupvar("dashboard::params::dashboard_port") %>
|
||||
+Listen <%= dashboard_port %>
|
||||
|
||||
-<VirtualHost *:<%= scope.lookupvar("dashboard::params::dashboard_port") %>>
|
||||
+<VirtualHost *:<%= dashboard_port %>>
|
||||
ServerName <%= name %>
|
||||
DocumentRoot <%= docroot %>
|
||||
RailsBaseURI <%= rails_base_uri %>
|
||||
EOD
|
||||
fi
|
||||
|
@ -95,6 +95,13 @@ node 'wiki.openstack.org' {
|
||||
include openstack_project::wiki
|
||||
}
|
||||
|
||||
node 'puppet-dashboard.openstack.org' {
|
||||
class { 'openstack_project::dashboard':
|
||||
password => hiera('dashboard_password'),
|
||||
mysql_password => hiera('dashboard_mysql_password'),
|
||||
}
|
||||
}
|
||||
|
||||
# A bare machine, but with a jenkins user
|
||||
node /^.*\.template\.openstack\.org$/ {
|
||||
include openstack_project::slave_template
|
||||
|
21
modules/openstack_project/manifests/dashboard.pp
Normal file
21
modules/openstack_project/manifests/dashboard.pp
Normal file
@ -0,0 +1,21 @@
|
||||
class openstack_project::dashboard(
|
||||
$password,
|
||||
$mysql_password) {
|
||||
|
||||
class { 'openstack_project::template':
|
||||
iptables_public_tcp_ports => [80, 443, 3000]
|
||||
}
|
||||
|
||||
class {'::dashboard':
|
||||
dashboard_ensure => 'present',
|
||||
dashboard_user => 'www-data',
|
||||
dashboard_group => 'www-data',
|
||||
dashboard_password => $password,
|
||||
dashboard_db => 'dashboard_prod',
|
||||
dashboard_charset => 'utf8',
|
||||
dashboard_site => $fqdn,
|
||||
dashboard_port => '3000',
|
||||
mysql_root_pw => $mysql_password,
|
||||
passenger => true,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user