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

Delta Between Two Patch Sets: modules/notificationserver/manifests/init.pp

Issue 29323423: Issue 2869 - Setup cron-job to update notifications (Closed)
Left Patch Set: Created Aug. 10, 2015, 11:13 a.m.
Right Patch Set: Issue 2869 - Fix requirement declaration for Cron[update_notifications] Created Aug. 10, 2015, 11:59 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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_processes => 2, 4 worker_processes => 2,
5 worker_connections => 4000, 5 worker_connections => 4000,
6 ssl_session_cache => off, 6 ssl_session_cache => off,
7 } 7 }
8 } 8 }
9 9
10 class {'sitescripts': 10 class {'sitescripts':
11 sitescriptsini_source => 'puppet:///modules/notificationserver/sitescripts.i ni' 11 sitescriptsini_source => 'puppet:///modules/notificationserver/sitescripts.i ni'
12 } 12 }
13 13
14 exec {'fetch_notifications': 14 exec {'fetch_notifications':
15 command => 'hg clone --noupdate https://hg.adblockplus.org/notifications /op t/notifications && chown -R nginx /opt/notifications', 15 command => 'hg clone --noupdate https://hg.adblockplus.org/notifications /op t/notifications && chown -R nginx /opt/notifications',
16 path => ['/usr/bin/', '/bin/'], 16 path => ['/usr/bin/', '/bin/'],
17 require => [ 17 require => [
18 Package['mercurial'], 18 Package['mercurial'],
19 Package['nginx'], 19 Package['nginx'],
20 ], 20 ],
21 onlyif => 'test ! -d /opt/notifications' 21 onlyif => 'test ! -d /opt/notifications'
22 } 22 }
23 23
24 cron {'update_notifications': 24 cron {'update_notifications':
25 command => 'hg pull -q -u -R /opt/notifications', 25 command => 'hg pull -q -u -R /opt/notifications',
26 environment => ['MAILTO=admins@adblockplus.org,root'], 26 environment => ['MAILTO=admins@adblockplus.org,root'],
27 minute => '*/5', 27 minute => '*/5',
28 user => 'nginx', 28 user => 'nginx',
29 require => Exec["fetch_sitescripts"], 29 require => Exec['fetch_notifications'],
Fred 2015/08/10 11:46:46 I guess you meant require => Exec["fetch_notificat
mathias 2015/08/10 12:00:02 Thank you! Classic copy+paste issue that worked be
30 } 30 }
31 31
32 include spawn-fcgi 32 include spawn-fcgi
33 package {'python-flup':} 33 package {'python-flup':}
34 34
35 spawn-fcgi::pool {'multiplexer': 35 spawn-fcgi::pool {'multiplexer':
36 ensure => present, 36 ensure => present,
37 fcgi_app => '/opt/sitescripts/multiplexer.fcgi', 37 fcgi_app => '/opt/sitescripts/multiplexer.fcgi',
38 socket => '/tmp/multiplexer-fastcgi.sock', 38 socket => '/tmp/multiplexer-fastcgi.sock',
39 mode => '0666', 39 mode => '0666',
(...skipping 15 matching lines...) Expand all
55 nginx::hostconfig{'notification.adblockplus.org': 55 nginx::hostconfig{'notification.adblockplus.org':
56 source => 'puppet:///modules/notificationserver/site.conf', 56 source => 'puppet:///modules/notificationserver/site.conf',
57 global_config => template('notificationserver/global.conf.erb'), 57 global_config => template('notificationserver/global.conf.erb'),
58 is_default => $is_default, 58 is_default => $is_default,
59 certificate => 'easylist-downloads.adblockplus.org_sslcert.pem', 59 certificate => 'easylist-downloads.adblockplus.org_sslcert.pem',
60 private_key => 'easylist-downloads.adblockplus.org_sslcert.key', 60 private_key => 'easylist-downloads.adblockplus.org_sslcert.key',
61 log => 'access_log_notification', 61 log => 'access_log_notification',
62 log_format => 'notification', 62 log_format => 'notification',
63 } 63 }
64 } 64 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld