diff --git a/modules/openstack_project/manifests/zuul_prod.pp b/modules/openstack_project/manifests/zuul_prod.pp index c297c71938..aee60920a2 100644 --- a/modules/openstack_project/manifests/zuul_prod.pp +++ b/modules/openstack_project/manifests/zuul_prod.pp @@ -72,24 +72,4 @@ class openstack_project::zuul_prod( source => 'puppet:///modules/openstack_project/zuul/scoreboard.html', require => File['/var/lib/recheckwatch'], } - - file { '/var/lib/zuul/www': - ensure => absent, - recurse => true, - force => true, - } - - package { 'libjs-jquery': - ensure => absent, - } - - file { '/opt/jquery-visibility': - ensure => absent, - force => true, - } - - file { '/opt/jquery-graphite': - ensure => absent, - force => true, - } } diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index 88d34fafb5..45bcfac7c4 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -131,8 +131,6 @@ class zuul ( file { '/var/lib/zuul': ensure => directory, - owner => 'zuul', - require => User['zuul'], } file { '/var/lib/zuul/git': @@ -157,6 +155,48 @@ class zuul ( content => $zuul_ssh_private_key, } + file { '/var/lib/zuul/www': + ensure => directory, + require => File['/var/lib/zuul'], + } + + package { 'libjs-jquery': + ensure => present, + } + + file { '/var/lib/zuul/www/jquery.min.js': + ensure => link, + target => '/usr/share/javascript/jquery/jquery.min.js', + require => [File['/var/lib/zuul/www'], + Package['libjs-jquery']], + } + + vcsrepo { '/opt/jquery-visibility': + ensure => latest, + provider => git, + revision => 'master', + source => 'https://github.com/mathiasbynens/jquery-visibility.git', + } + + file { '/var/lib/zuul/www/jquery-visibility.min.js': + ensure => link, + target => '/opt/jquery-visibility/jquery-visibility.min.js', + require => [File['/var/lib/zuul/www'], + Vcsrepo['/opt/jquery-visibility']], + } + + file { '/var/lib/zuul/www/index.html': + ensure => link, + target => '/opt/zuul/etc/status/public_html/index.html', + require => File['/var/lib/zuul/www'], + } + + file { '/var/lib/zuul/www/app.js': + ensure => link, + target => '/opt/zuul/etc/status/public_html/app.js', + require => File['/var/lib/zuul/www'], + } + file { '/etc/init.d/zuul': ensure => present, owner => 'root', diff --git a/modules/zuul/templates/zuul.vhost.erb b/modules/zuul/templates/zuul.vhost.erb index 4b553b7b45..dc7cb62577 100644 --- a/modules/zuul/templates/zuul.vhost.erb +++ b/modules/zuul/templates/zuul.vhost.erb @@ -1,6 +1,6 @@ :80> ServerAdmin <%= scope.lookupvar("::zuul::serveradmin") %> - DocumentRoot /var/www + DocumentRoot /var/lib/zuul/www ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::zuul::vhost_name") %>-error.log @@ -9,8 +9,6 @@ CustomLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::zuul::vhost_name") %>-access.log combined RewriteEngine on - RewriteRule ^/$ http://status.openstack.org/zuul/ [R] - RewriteRule ^/zuul/status$ http://status.openstack.org/zuul/ [R] RewriteRule ^/status.json$ http://127.0.0.1:8001/status.json [P] Alias /rechecks.html /var/www/recheckwatch/rechecks.html