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

Side by Side Diff: modules/notificationserver/manifests/init.pp

Issue 11296008: Notification server: Generate notification.json from notifications repository (Closed)
Patch Set: Created July 26, 2013, 11:52 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/notificationserver/files/sitescripts.ini ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class notificationserver { 1 class notificationserver {
2 class {'nginx': 2 class {'nginx':
3 worker_processes => 2, 3 worker_processes => 2,
4 worker_connections => 4000, 4 worker_connections => 4000,
5 ssl_session_cache => off, 5 ssl_session_cache => off,
6 } 6 }
7 7
8 class {'sitescripts':
9 sitescriptsini_source => 'puppet:///modules/notificationserver/sitescripts.i ni'
10 }
11
8 file {'/var/www': 12 file {'/var/www':
9 ensure => directory, 13 ensure => directory,
10 owner => nginx, 14 owner => nginx,
11 mode => 0755, 15 mode => 0755,
12 require => Package['nginx'] 16 require => Package['nginx']
13 } 17 }
14 18
15 file {'/var/www/notification': 19 file {'/var/www/notification':
16 ensure => directory, 20 ensure => directory,
17 owner => nginx, 21 owner => nginx,
18 mode => 0755, 22 mode => 0755,
19 require => Package['nginx'] 23 require => Package['nginx']
20 } 24 }
21 25
22 file {'/var/www/notification/notification.json': 26 exec { "fetch_notifications":
23 ensure => file, 27 command => "hg clone --noupdate https://hg.adblockplus.org/notifications /op t/notifications && chown -R nginx /opt/notifications",
24 owner => nginx, 28 path => ["/usr/bin/", "/bin/"],
25 mode => 644, 29 require => Package['mercurial'],
26 require => Package['nginx'], 30 onlyif => "test ! -d /opt/notifications"
27 source => 'puppet:///modules/notificationserver/notification.json' 31 }
32
33 cron {"update_notifications":
34 ensure => present,
35 command => "python -m sitescripts.management.bin.generateNotifications",
36 environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/sitescript s'],
37 user => nginx,
38 minute => '*/10',
39 require => [
40 Exec["fetch_notifications"],
41 Exec["fetch_sitescripts"]
42 ],
28 } 43 }
29 44
30 File { 45 File {
31 owner => root, 46 owner => root,
32 group => root, 47 group => root,
33 mode => 0644, 48 mode => 0644,
34 } 49 }
35 50
36 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.key': 51 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.key':
37 ensure => file, 52 ensure => file,
(...skipping 16 matching lines...) Expand all
54 enabled => true 69 enabled => true
55 } 70 }
56 71
57 file {'/etc/logrotate.d/nginx_notification.adblockplus.org': 72 file {'/etc/logrotate.d/nginx_notification.adblockplus.org':
58 ensure => file, 73 ensure => file,
59 mode => 0444, 74 mode => 0444,
60 require => Nginx::Hostconfig['notification.adblockplus.org'], 75 require => Nginx::Hostconfig['notification.adblockplus.org'],
61 source => 'puppet:///modules/notificationserver/logrotate' 76 source => 'puppet:///modules/notificationserver/logrotate'
62 } 77 }
63 } 78 }
OLDNEW
« no previous file with comments | « modules/notificationserver/files/sitescripts.ini ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld