LEFT | RIGHT |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 file {'/etc/logrotate.d/nginx_stats.adblockplus.org': | 98 file {'/etc/logrotate.d/nginx_stats.adblockplus.org': |
99 ensure => file, | 99 ensure => file, |
100 mode => 0444, | 100 mode => 0444, |
101 require => Nginx::Hostconfig['stats.adblockplus.org'], | 101 require => Nginx::Hostconfig['stats.adblockplus.org'], |
102 source => 'puppet:///modules/statsmaster/logrotate' | 102 source => 'puppet:///modules/statsmaster/logrotate' |
103 } | 103 } |
104 | 104 |
105 cron {'updatestats': | 105 cron {'updatestats': |
106 ensure => present, | 106 ensure => present, |
107 require => [ | 107 require => [ |
108 User['stats'], | 108 Package['pypy'], |
109 Package['python-simplejson'], | |
110 Package['python-jinja2'], | 109 Package['python-jinja2'], |
111 Exec["fetch_sitescripts"] | 110 Exec["fetch_sitescripts"] |
112 ], | 111 ], |
113 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", |
114 environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sites
cripts'], | 113 environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sites
cripts'], |
115 user => stats, | 114 user => stats, |
116 hour => 4, | 115 hour => 1, |
117 minute => 30, | 116 minute => 30, |
118 } | 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 } |
119 } | 136 } |
LEFT | RIGHT |