Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/statsmaster/manifests/init.pp

Issue 6293281981857792: Issue 239 - Move AWStats processing to the stats server (Closed)
Patch Set: Created April 23, 2014, 1:14 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/statsmaster/manifests/init.pp
===================================================================
--- a/modules/statsmaster/manifests/init.pp
+++ b/modules/statsmaster/manifests/init.pp
@@ -1,20 +1,27 @@
class statsmaster(
$domain,
$certificate,
$private_key,
$is_default=false
) {
+
+ include statsmaster::downloads, statsmaster::awstats
+
user {'stats':
ensure => present,
home => '/home/stats',
managehome => true,
}
+ File {
+ group => root,
+ }
+
file {'/home/stats/.ssh':
ensure => directory,
owner => stats,
mode => 0600,
require => User['stats'],
}
file {'/home/stats/.ssh/id_rsa':
@@ -26,86 +33,43 @@ class statsmaster(
file {'/home/stats/.ssh/known_hosts':
ensure => present,
owner => stats,
mode => 0400,
source => 'puppet:///modules/statsmaster/known_hosts',
}
- package {['pypy', 'python-jinja2']:}
-
- class {'sitescripts':
- sitescriptsini_source => 'puppet:///modules/statsmaster/sitescripts.ini',
- }
-
class {'nginx':
worker_processes => 2,
worker_connections => 4000,
ssl_session_cache => off,
}
- File {
- owner => root,
- group => root,
- }
-
file {'/var/www':
ensure => directory,
mode => 0755,
- require => Package['nginx'],
- }
-
- file {'/var/www/stats':
- ensure => directory,
- mode => 0755,
- owner => stats,
- }
-
- file {'/var/www/statsdata':
- ensure => directory,
- mode => 0755,
- owner => stats,
- }
-
- file {'/var/www/statsdata/usercounts.html':
- ensure => file,
- mode => 0444,
- source => 'puppet:///modules/statsmaster/usercounts.html',
- owner => stats,
+ owner => root
}
file {'/var/www/htpasswd':
ensure => file,
mode => 0444,
source => 'puppet:///modules/private/stats-htpasswd',
+ owner => root,
}
nginx::hostconfig{$domain:
source => 'puppet:///modules/statsmaster/site.conf',
is_default => $is_default,
certificate => $certificate,
private_key => $private_key,
log => 'access_log_stats'
}
- cron {'updatestats':
- ensure => present,
- require => [
- Package['pypy'],
- Package['python-jinja2'],
- Exec["fetch_sitescripts"]
- ],
- command => "pypy -m sitescripts.stats.bin.logprocessor && python -m sitescripts.stats.bin.pagegenerator",
- environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sitescripts'],
- user => stats,
- hour => 1,
- minute => 30,
- }
-
file {'/opt/cron_geoipdb_update.sh':
ensure => file,
owner => root,
mode => 0750,
source => 'puppet:///modules/statsmaster/cron_geoipdb_update.sh',
}
cron {'geoipdb_update':

Powered by Google App Engine
This is Rietveld