Add support for running Zuul on Trusty

Puppet install zuul on Ubuntu 14.04 Trusty fails because Apache/2.4.7
does not have mod_mem_cache. According to [1], we should use
 mod_cache_disk instead.

"These modules have been removed: mod_authn_default, mod_authz_default,
 mod_mem_cache. If you were using mod_mem_cache in 2.2,
 look at mod_cache_disk in 2.4."

Add configuration to cache /status.json using mod_cache_disk.

Allow access to the 'DocumentRoot' path, which is disallowed on 14.04
by default.

[1] http://httpd.apache.org/docs/trunk/upgrading.html

Change-Id: I734b5c45e1e088364328e9fc5ec5932d3bfe32c5
This commit is contained in:
Ramy Asselin 2014-12-12 15:15:54 -08:00
parent 3aa9649d3a
commit be4aff60dc
2 changed files with 25 additions and 3 deletions

View File

@ -347,9 +347,22 @@ class zuul (
ensure => present, ensure => present,
} }
} }
if ! defined(A2mod['mem_cache']) {
a2mod { 'mem_cache': case $::lsbdistcodename {
ensure => present, 'precise': {
if ! defined(A2mod['mem_cache']) {
a2mod { 'mem_cache':
ensure => present,
}
}
}
default: {
if ! defined(A2mod['cache_disk']) {
a2mod { 'cache_disk':
ensure => present,
}
}
} }
} }
} }

View File

@ -2,6 +2,11 @@
ServerAdmin <%= scope.lookupvar("::zuul::serveradmin") %> ServerAdmin <%= scope.lookupvar("::zuul::serveradmin") %>
DocumentRoot /var/lib/zuul/www DocumentRoot /var/lib/zuul/www
<Directory /var/lib/zuul/www>
Allow from all
Satisfy Any
</Directory>
ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::zuul::vhost_name") %>-error.log ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::zuul::vhost_name") %>-error.log
LogLevel warn LogLevel warn
@ -32,6 +37,10 @@
MCacheMaxObjectSize 8388608 MCacheMaxObjectSize 8388608
MCacheMaxStreamingBuffer 8388608 MCacheMaxStreamingBuffer 8388608
</IfModule> </IfModule>
<IfModule mod_cache_disk.c>
CacheEnable disk /status.json
CacheRoot /var/cache/apache2/mod_cache_disk
</IfModule>
</IfModule> </IfModule>
</VirtualHost> </VirtualHost>