diff --git a/install_modules.sh b/install_modules.sh index 658eb10a69..2e93bd3ee4 100644 --- a/install_modules.sh +++ b/install_modules.sh @@ -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 %> + +-> ++> + ServerName <%= name %> + DocumentRoot <%= docroot %> + RailsBaseURI <%= rails_base_uri %> +EOD +fi diff --git a/manifests/site.pp b/manifests/site.pp index 4f9d9b7d8a..c806b342d3 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -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 diff --git a/modules/openstack_project/manifests/dashboard.pp b/modules/openstack_project/manifests/dashboard.pp new file mode 100644 index 0000000000..b69abbb832 --- /dev/null +++ b/modules/openstack_project/manifests/dashboard.pp @@ -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, + } +}