| OLD | NEW |
| 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 {'statsclient': | 8 class {'statsclient': |
| 9 log_path => '/var/log/nginx/access_log_notification.1.gz', | 9 log_path => '/var/log/nginx/access_log_notification.1.gz', |
| 10 custom_sitescriptsini_source => 'puppet:///modules/notificationserver/sitesc
ripts.ini' | 10 custom_sitescriptsini_source => 'puppet:///modules/notificationserver/sitesc
ripts.ini' |
| 11 } | 11 } |
| 12 | 12 |
| 13 file {'/var/www': | 13 file {'/var/www': |
| 14 ensure => directory, | 14 ensure => directory, |
| 15 owner => nginx, | 15 owner => nginx, |
| 16 mode => 0755, | 16 mode => 0755, |
| 17 require => Package['nginx'] | 17 require => Package['nginx'] |
| 18 } | 18 } |
| 19 | 19 |
| 20 file {'/var/www/notification': | 20 file {'/var/www/notification': |
| 21 ensure => directory, | 21 ensure => directory, |
| 22 owner => nginx, | 22 owner => nginx, |
| 23 mode => 0755, | 23 mode => 0755, |
| 24 require => Package['nginx'] | 24 require => Package['nginx'] |
| 25 } | 25 } |
| 26 | 26 |
| 27 exec { "fetch_notifications": | 27 exec { "fetch_notifications": |
| 28 command => "hg clone --noupdate https://hg.adblockplus.org/notifications /op
t/notifications && chown -R nginx /opt/notifications", | 28 command => "hg clone --noupdate https://hg.adblockplus.org/notifications /op
t/notifications && chown -R nginx /opt/notifications", |
| 29 path => ["/usr/bin/", "/bin/"], | 29 path => ["/usr/bin/", "/bin/"], |
| 30 require => Package['mercurial'], | 30 require => [ |
| 31 Package['mercurial'], |
| 32 Package['nginx'], |
| 33 ], |
| 31 onlyif => "test ! -d /opt/notifications" | 34 onlyif => "test ! -d /opt/notifications" |
| 32 } | 35 } |
| 33 | 36 |
| 34 cron {"update_notifications": | 37 cron {"update_notifications": |
| 35 ensure => present, | 38 ensure => present, |
| 36 command => "python -m sitescripts.management.bin.generateNotifications", | 39 command => "python -m sitescripts.management.bin.generateNotifications", |
| 37 environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sites
cripts'], | 40 environment => ['MAILTO=admins@adblockplus.org,root', 'PYTHONPATH=/opt/sites
cripts'], |
| 38 user => nginx, | 41 user => nginx, |
| 39 minute => '*/10', | 42 minute => '*/10', |
| 40 require => [ | 43 require => [ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 70 enabled => true | 73 enabled => true |
| 71 } | 74 } |
| 72 | 75 |
| 73 file {'/etc/logrotate.d/nginx_notification.adblockplus.org': | 76 file {'/etc/logrotate.d/nginx_notification.adblockplus.org': |
| 74 ensure => file, | 77 ensure => file, |
| 75 mode => 0444, | 78 mode => 0444, |
| 76 require => Nginx::Hostconfig['notification.adblockplus.org'], | 79 require => Nginx::Hostconfig['notification.adblockplus.org'], |
| 77 source => 'puppet:///modules/notificationserver/logrotate' | 80 source => 'puppet:///modules/notificationserver/logrotate' |
| 78 } | 81 } |
| 79 } | 82 } |
| OLD | NEW |