OLD | NEW |
1 class notificationserver($is_default = false) { | 1 class notificationserver($is_default = false) { |
2 if !defined(Class['nginx']) { | 2 if !defined(Class['nginx']) { |
3 class {'nginx': | 3 class {'nginx': |
4 worker_connections => 4000, | 4 worker_connections => 4000, |
5 ssl_session_cache => off, | 5 ssl_session_cache => off, |
6 } | 6 } |
7 } | 7 } |
8 | 8 |
9 class {'sitescripts': | 9 class {'sitescripts': |
10 sitescriptsini_source => 'puppet:///modules/notificationserver/sitescripts.i
ni' | 10 sitescriptsini_source => 'puppet:///modules/notificationserver/sitescripts.i
ni' |
(...skipping 10 matching lines...) Expand all Loading... |
21 } | 21 } |
22 | 22 |
23 cron {'update_notifications': | 23 cron {'update_notifications': |
24 command => 'hg pull -q -u -R /opt/notifications', | 24 command => 'hg pull -q -u -R /opt/notifications', |
25 environment => ['MAILTO=admins@adblockplus.org,root'], | 25 environment => ['MAILTO=admins@adblockplus.org,root'], |
26 minute => '*/5', | 26 minute => '*/5', |
27 user => 'nginx', | 27 user => 'nginx', |
28 require => Exec['fetch_notifications'], | 28 require => Exec['fetch_notifications'], |
29 } | 29 } |
30 | 30 |
| 31 cron {'generate_empty_notification_json': |
| 32 command => 'echo "{\"notifications\": [], \"version\": \"`date +\%Y\%m\%d\%H
\%M`\"}" > /var/www/empty-notification.json', |
| 33 environment => ['MAILTO=admins@adblockplus.org,root'], |
| 34 minute => '*', |
| 35 user => 'nginx', |
| 36 } |
| 37 |
31 include spawn-fcgi | 38 include spawn-fcgi |
32 package {'python-flup':} | 39 package {'python-flup':} |
33 | 40 |
34 spawn-fcgi::pool {'multiplexer': | 41 spawn-fcgi::pool {'multiplexer': |
35 ensure => present, | 42 ensure => present, |
36 fcgi_app => '/opt/sitescripts/multiplexer.fcgi', | 43 fcgi_app => '/opt/sitescripts/multiplexer.fcgi', |
37 socket => '/tmp/multiplexer-fastcgi.sock', | 44 socket => '/tmp/multiplexer-fastcgi.sock', |
38 mode => '0666', | 45 mode => '0666', |
39 user => 'nginx', | 46 user => 'nginx', |
40 children => 1, | 47 children => 1, |
(...skipping 13 matching lines...) Expand all Loading... |
54 nginx::hostconfig{'notification.adblockplus.org': | 61 nginx::hostconfig{'notification.adblockplus.org': |
55 source => 'puppet:///modules/notificationserver/site.conf', | 62 source => 'puppet:///modules/notificationserver/site.conf', |
56 global_config => template('notificationserver/global.conf.erb'), | 63 global_config => template('notificationserver/global.conf.erb'), |
57 is_default => $is_default, | 64 is_default => $is_default, |
58 certificate => 'easylist-downloads.adblockplus.org_sslcert.pem', | 65 certificate => 'easylist-downloads.adblockplus.org_sslcert.pem', |
59 private_key => 'easylist-downloads.adblockplus.org_sslcert.key', | 66 private_key => 'easylist-downloads.adblockplus.org_sslcert.key', |
60 log => 'access_log_notification', | 67 log => 'access_log_notification', |
61 log_format => 'notification', | 68 log_format => 'notification', |
62 } | 69 } |
63 } | 70 } |
OLD | NEW |