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

Unified Diff: modules/notificationserver/manifests/init.pp

Issue 11166107: Set up notification server (Closed)
Patch Set: Created July 22, 2013, 10:11 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/notificationserver/files/notification.adblockplus.org ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/notificationserver/manifests/init.pp
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/notificationserver/manifests/init.pp
@@ -0,0 +1,63 @@
+class notificationserver {
+ class {'nginx':
+ worker_processes => 2,
+ worker_connections => 4000,
+ ssl_session_cache => off,
+ }
+
+ file {'/var/www':
+ ensure => directory,
+ owner => nginx,
+ mode => 0755,
+ require => Package['nginx']
+ }
+
+ file {'/var/www/notification':
+ ensure => directory,
+ owner => nginx,
+ mode => 0755,
+ require => Package['nginx']
+ }
+
+ file {'/var/www/notification/notification.json':
Felix Dahlke 2013/07/22 15:19:30 We should set replace => "no" here, otherwise our
Wladimir Palant 2013/07/23 07:27:53 Replacing the file was actually the idea - we can
+ ensure => file,
+ owner => nginx,
+ mode => 644,
+ require => Package['nginx'],
+ source => 'puppet:///modules/notificationserver/notification.json'
+ }
+
+ File {
+ owner => root,
+ group => root,
+ mode => 0644,
+ }
+
+ file {'/etc/nginx/sites-available/adblockplus.org_sslcert.key':
+ ensure => file,
+ notify => Service['nginx'],
+ before => Nginx::Hostconfig['notification.adblockplus.org'],
+ mode => 0400,
+ source => 'puppet:///modules/private/adblockplus.org_sslcert.key'
+ }
+
+ file {'/etc/nginx/sites-available/adblockplus.org_sslcert.pem':
+ ensure => file,
+ notify => Service['nginx'],
+ before => Nginx::Hostconfig['notification.adblockplus.org'],
+ mode => 0400,
+ source => 'puppet:///modules/private/adblockplus.org_sslcert.pem'
+ }
+
+ nginx::hostconfig{'notification.adblockplus.org':
+ source => 'puppet:///modules/notificationserver/notification.adblockplus.org',
+ enabled => true
+ }
+
+ file {'/etc/logrotate.d/nginx_notification.adblockplus.org':
+ ensure => file,
+ mode => 0444,
+ require => Nginx::Hostconfig['notification.adblockplus.org'],
+ source => 'puppet:///modules/notificationserver/logrotate'
+ }
+}
« no previous file with comments | « modules/notificationserver/files/notification.adblockplus.org ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld