OLD | NEW |
1 class statsmaster { | 1 class statsmaster { |
2 user {'stats': | 2 user {'stats': |
3 ensure => present, | 3 ensure => present, |
4 home => '/home/stats', | 4 home => '/home/stats', |
5 managehome => true, | 5 managehome => true, |
6 } | 6 } |
7 | 7 |
8 file {'/home/stats/.ssh': | 8 file {'/home/stats/.ssh': |
9 ensure => directory, | 9 ensure => directory, |
10 owner => stats, | 10 owner => stats, |
11 mode => 0600, | 11 mode => 0600, |
12 require => User['stats'], | 12 require => User['stats'], |
13 } | 13 } |
14 | 14 |
15 file {'/home/stats/.ssh/id_rsa': | 15 file {'/home/stats/.ssh/id_rsa': |
16 ensure => present, | 16 ensure => present, |
17 owner => stats, | 17 owner => stats, |
18 mode => 0400, | 18 mode => 0400, |
19 source => 'puppet:///modules/private/stats@stats.adblockplus.org', | 19 source => 'puppet:///modules/private/stats@stats.adblockplus.org', |
20 } | 20 } |
21 | 21 |
22 file {'/home/stats/.ssh/known_hosts': | 22 file {'/home/stats/.ssh/known_hosts': |
23 ensure => present, | 23 ensure => present, |
24 owner => stats, | 24 owner => stats, |
25 mode => 0400, | 25 mode => 0400, |
26 source => 'puppet:///modules/statsmaster/known_hosts', | 26 source => 'puppet:///modules/statsmaster/known_hosts', |
27 } | 27 } |
28 | 28 |
29 package {['python-simplejson', 'python-jinja2']:} | 29 package {['pypy', 'python-jinja2']:} |
30 | 30 |
31 class {'sitescripts': | 31 class {'sitescripts': |
32 sitescriptsini_source => 'puppet:///modules/statsmaster/sitescripts.ini', | 32 sitescriptsini_source => 'puppet:///modules/statsmaster/sitescripts.ini', |
33 } | 33 } |
34 | 34 |
35 class {'nginx': | 35 class {'nginx': |
36 worker_processes => 2, | 36 worker_processes => 2, |
37 worker_connections => 4000, | 37 worker_connections => 4000, |
38 ssl_session_cache => off, | 38 ssl_session_cache => off, |
39 } | 39 } |
(...skipping 14 matching lines...) Expand all Loading... |
54 mode => 0755, | 54 mode => 0755, |
55 owner => stats, | 55 owner => stats, |
56 } | 56 } |
57 | 57 |
58 file {'/var/www/statsdata': | 58 file {'/var/www/statsdata': |
59 ensure => directory, | 59 ensure => directory, |
60 mode => 0755, | 60 mode => 0755, |
61 owner => stats, | 61 owner => stats, |
62 } | 62 } |
63 | 63 |
| 64 file {'/var/www/statsdata/usercounts.html': |
| 65 ensure => file, |
| 66 mode => 0444, |
| 67 source => 'puppet:///modules/statsmaster/usercounts.html', |
| 68 owner => stats, |
| 69 } |
| 70 |
64 file {'/var/www/htpasswd': | 71 file {'/var/www/htpasswd': |
65 ensure => file, | 72 ensure => file, |
66 mode => 0444, | 73 mode => 0444, |
67 source => 'puppet:///modules/private/stats-htpasswd', | 74 source => 'puppet:///modules/private/stats-htpasswd', |
68 } | 75 } |
69 | 76 |
70 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.key': | 77 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.key': |
71 ensure => file, | 78 ensure => file, |
72 notify => Service['nginx'], | 79 notify => Service['nginx'], |
73 before => Nginx::Hostconfig['stats.adblockplus.org'], | 80 before => Nginx::Hostconfig['stats.adblockplus.org'], |
(...skipping 17 matching lines...) Expand all Loading... |
91 file {'/etc/logrotate.d/nginx_stats.adblockplus.org': | 98 file {'/etc/logrotate.d/nginx_stats.adblockplus.org': |
92 ensure => file, | 99 ensure => file, |
93 mode => 0444, | 100 mode => 0444, |
94 require => Nginx::Hostconfig['stats.adblockplus.org'], | 101 require => Nginx::Hostconfig['stats.adblockplus.org'], |
95 source => 'puppet:///modules/statsmaster/logrotate' | 102 source => 'puppet:///modules/statsmaster/logrotate' |
96 } | 103 } |
97 | 104 |
98 cron {'updatestats': | 105 cron {'updatestats': |
99 ensure => present, | 106 ensure => present, |
100 require => [ | 107 require => [ |
101 User['stats'], | 108 Package['pypy'], |
102 Package['python-simplejson'], | |
103 Package['python-jinja2'], | 109 Package['python-jinja2'], |
104 Exec["fetch_sitescripts"] | 110 Exec["fetch_sitescripts"] |
105 ], | 111 ], |
106 command => "python -m sitescripts.stats.bin.datamerger && python -m sitescri
pts.stats.bin.pagegenerator", | 112 command => "pypy -m sitescripts.stats.bin.logprocessor && python -m sitescri
pts.stats.bin.pagegenerator", |
107 environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sites
cripts'], | 113 environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sites
cripts'], |
108 user => stats, | 114 user => stats, |
109 hour => 4, | 115 hour => 1, |
110 minute => 30, | 116 minute => 30, |
111 } | 117 } |
| 118 |
| 119 file {'/opt/cron_geoipdb_update.sh': |
| 120 ensure => file, |
| 121 owner => root, |
| 122 mode => 0750, |
| 123 source => 'puppet:///modules/statsmaster/cron_geoipdb_update.sh', |
| 124 } |
| 125 |
| 126 cron {'geoipdb_update': |
| 127 ensure => present, |
| 128 require => File['/opt/cron_geoipdb_update.sh'], |
| 129 command => '/opt/cron_geoipdb_update.sh', |
| 130 environment => ['MAILTO=admins@adblockplus.org,root'], |
| 131 user => root, |
| 132 hour => 3, |
| 133 minute => 15, |
| 134 monthday => 3, |
| 135 } |
112 } | 136 } |
OLD | NEW |