Ottomata has submitted this change and it was merged. Change subject: Some fixes for wikimetrics in labs ......................................................................
Some fixes for wikimetrics in labs Change-Id: I72597f458ab00513a500d87e7b5429c072466f50 --- M manifests/role/wikimetrics.pp 1 file changed, 24 insertions(+), 2 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/role/wikimetrics.pp b/manifests/role/wikimetrics.pp index 50f89d4..d129466 100644 --- a/manifests/role/wikimetrics.pp +++ b/manifests/role/wikimetrics.pp @@ -19,6 +19,10 @@ # daemon, wikimetrics will be managed # as a python daemon process via upstart. # Default: apache +# $wikimetrics_ssl_redirect - If true, apache will force redirect any +# requests made to https:://$server_name... +# This does nothing if you are running in +# daemon mode. Default: false # $wikimetrics_server_name - Apache ServerName. This is not used if # $web_mode is daemon. Default: $::fqdn # $wikimetrics_server_aliases - comma separated list of Apache ServerAlias-es. @@ -85,7 +89,17 @@ }, default => $::wikimetrics_server_port, } + $ssl_redirect = $::wikimetrics_ssl_redirect ? { + undef => false, + default => $::wikimetrics_ssl_redirect, + } + # need pip :/ + if !defined(Package['python-pip']) { + package { 'python-pip': + ensure => 'installed', + } + } if !defined(Package['mysql-server']) { package { 'mysql-server': ensure => 'installed', @@ -99,10 +113,10 @@ # clone wikimetrics as root user so it can write to /srv repository_owner => 'root', - server_name => $server_name, server_aliases => $server_aliases, server_port => $server_port, + ssl_redirect => $ssl_redirect, flask_secret_key => $flask_secret_key, google_client_id => $google_client_id, @@ -138,7 +152,15 @@ creates => '/usr/local/bin/wikimetrics', path => '/usr/local/bin:/usr/bin:/bin', user => 'root', - require => Class['::wikimetrics'], + require => [Package['python-pip'], Class['::wikimetrics']], + } + + # The redis module by default sets up redis in /a. Oh well! + if !defined(File['/a']) { + file { '/a': + ensure => directory, + before => Class['::wikimetrics::queue'] + } } # TODO: Support installation of queue, web and database -- To view, visit https://gerrit.wikimedia.org/r/109709 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I72597f458ab00513a500d87e7b5429c072466f50 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata <o...@wikimedia.org> Gerrit-Reviewer: Ottomata <o...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits