From be4aff60dc670e2cc463fc353b06cad674e24c19 Mon Sep 17 00:00:00 2001 From: Ramy Asselin Date: Fri, 12 Dec 2014 15:15:54 -0800 Subject: [PATCH] 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 --- modules/zuul/manifests/init.pp | 19 ++++++++++++++++--- modules/zuul/templates/zuul.vhost.erb | 9 +++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index 59bcd3f6b7..755883ef75 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -347,9 +347,22 @@ class zuul ( ensure => present, } } - if ! defined(A2mod['mem_cache']) { - a2mod { 'mem_cache': - ensure => present, + + case $::lsbdistcodename { + 'precise': { + if ! defined(A2mod['mem_cache']) { + a2mod { 'mem_cache': + ensure => present, + } + } + } + default: { + if ! defined(A2mod['cache_disk']) { + a2mod { 'cache_disk': + ensure => present, + } + } } } + } diff --git a/modules/zuul/templates/zuul.vhost.erb b/modules/zuul/templates/zuul.vhost.erb index ba31723b34..dfa473b191 100644 --- a/modules/zuul/templates/zuul.vhost.erb +++ b/modules/zuul/templates/zuul.vhost.erb @@ -2,6 +2,11 @@ ServerAdmin <%= scope.lookupvar("::zuul::serveradmin") %> DocumentRoot /var/lib/zuul/www + + Allow from all + Satisfy Any + + ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::zuul::vhost_name") %>-error.log LogLevel warn @@ -32,6 +37,10 @@ MCacheMaxObjectSize 8388608 MCacheMaxStreamingBuffer 8388608 + + CacheEnable disk /status.json + CacheRoot /var/cache/apache2/mod_cache_disk +