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

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

Issue 29329307: Issue 3211 - Integrate customservice::supervisor with notification daemon (Closed)
Left Patch Set: Issue 3211 - Address feedback from codereview Created Oct. 21, 2015, 12:08 p.m.
Right Patch Set: Issue 3211 - Address feedback from codereview Created Oct. 26, 2015, 12:14 p.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 | « modules/customservice/manifests/supervisor.pp ('k') | modules/sitescripts/manifests/init.pp » ('j') | 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_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'
11 } 11 }
12 12
13 exec {'fetch_notifications': 13 exec {'fetch_notifications':
14 command => 'hg clone --noupdate https://hg.adblockplus.org/notifications /op t/notifications && chown -R nginx /opt/notifications', 14 command => 'hg clone --noupdate https://hg.adblockplus.org/notifications /op t/notifications && chown -R nginx /opt/notifications',
15 path => ['/usr/bin/', '/bin/'], 15 path => ['/usr/bin/', '/bin/'],
16 require => [ 16 require => [
17 Package['mercurial'], 17 Package['mercurial'],
18 User['nginx'], 18 User['nginx'],
19 ], 19 ],
20 onlyif => 'test ! -d /opt/notifications' 20 onlyif => 'test ! -d /opt/notifications'
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 => hiera('cron::environment', []),
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 include spawn-fcgi 31 include spawn-fcgi
32 package {'python-flup':} 32 package {'python-flup':}
33 33
34 spawn-fcgi::pool {'multiplexer': 34 spawn-fcgi::pool {'multiplexer':
35 ensure => present, 35 ensure => present,
36 fcgi_app => '/opt/sitescripts/multiplexer.fcgi', 36 fcgi_app => '/opt/sitescripts/multiplexer.fcgi',
37 socket => '/tmp/multiplexer-fastcgi.sock', 37 socket => '/tmp/multiplexer-fastcgi.sock',
38 mode => '0666', 38 mode => '0666',
39 order => 500, 39 order => 500,
40 user => 'nginx', 40 user => 'nginx',
41 children => 1, 41 children => 1,
42 require => [ 42 require => [
43 Exec['fetch_sitescripts'], 43 Exec['fetch_sitescripts'],
44 Exec['fetch_notifications'], 44 Exec['fetch_notifications'],
45 Package['python-flup'] 45 Package['python-flup']
46 ] 46 ]
47 } 47 }
48 48
49 customservice::supervisor {'spawn-fcgi':
50 pidfile => '/var/run/500-multiplexer_spawn-fcgi.pid',
51 }
52
49 File { 53 File {
50 owner => root, 54 owner => root,
51 group => root, 55 group => root,
52 mode => 0644, 56 mode => 0644,
53 } 57 }
54 58
55 nginx::hostconfig{'notification.adblockplus.org': 59 nginx::hostconfig{'notification.adblockplus.org':
56 source => 'puppet:///modules/notificationserver/site.conf', 60 source => 'puppet:///modules/notificationserver/site.conf',
57 global_config => template('notificationserver/global.conf.erb'), 61 global_config => template('notificationserver/global.conf.erb'),
58 is_default => $is_default, 62 is_default => $is_default,
59 certificate => 'easylist-downloads.adblockplus.org_sslcert.pem', 63 certificate => 'easylist-downloads.adblockplus.org_sslcert.pem',
60 private_key => 'easylist-downloads.adblockplus.org_sslcert.key', 64 private_key => 'easylist-downloads.adblockplus.org_sslcert.key',
61 log => 'access_log_notification', 65 log => 'access_log_notification',
62 log_format => 'notification', 66 log_format => 'notification',
63 } 67 }
64 } 68 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld