OLD | NEW |
1 class downloadserver( | 1 class downloadserver( |
2 $domain, | 2 $domain, |
3 $certificate, | 3 $certificate, |
4 $private_key, | 4 $private_key, |
5 $is_default = false | 5 $is_default = false |
6 ) { | 6 ) { |
7 | 7 |
8 class {'nginx': | 8 class {'nginx': |
9 worker_processes => 2, | 9 worker_processes => 2, |
10 worker_connections => 4000, | 10 worker_connections => 4000, |
11 ssl_session_cache => off, | 11 ssl_session_cache => off, |
12 } | 12 } |
13 | 13 |
| 14 class {'sitescripts': |
| 15 sitescriptsini_source => 'puppet:///modules/downloadserver/sitescripts', |
| 16 } |
| 17 |
| 18 package {['python-flup', 'python-jinja2']:} |
| 19 include spawn-fcgi |
| 20 |
| 21 spawn-fcgi::pool {'multiplexer': |
| 22 ensure => present, |
| 23 fcgi_app => '/opt/sitescripts/multiplexer.fcgi', |
| 24 socket => '/tmp/multiplexer-fastcgi.sock', |
| 25 mode => '0666', |
| 26 user => 'nginx', |
| 27 children => 1, |
| 28 require => [ |
| 29 Exec['fetch_sitescripts'], |
| 30 Package['python-flup', 'python-jinja2'], |
| 31 ], |
| 32 } |
| 33 |
14 user {'hg': | 34 user {'hg': |
15 ensure => present, | 35 ensure => present, |
16 comment => 'Mercurial client user', | 36 comment => 'Mercurial client user', |
17 home => '/home/hg', | 37 home => '/home/hg', |
18 managehome => true | 38 managehome => true |
19 } | 39 } |
20 | 40 |
21 file {'/var/www': | 41 file {'/var/www': |
22 ensure => directory, | 42 ensure => directory, |
23 owner => hg, | 43 owner => hg, |
(...skipping 16 matching lines...) Expand all Loading... |
40 } | 60 } |
41 | 61 |
42 nginx::hostconfig{$domain: | 62 nginx::hostconfig{$domain: |
43 source => 'puppet:///modules/downloadserver/site.conf', | 63 source => 'puppet:///modules/downloadserver/site.conf', |
44 is_default => $is_default, | 64 is_default => $is_default, |
45 certificate => $certificate, | 65 certificate => $certificate, |
46 private_key => $private_key, | 66 private_key => $private_key, |
47 log => 'access_log_downloads' | 67 log => 'access_log_downloads' |
48 } | 68 } |
49 | 69 |
| 70 file {'/etc/nginx/conf.d/adblockbrowserupdatescache.conf': |
| 71 source => 'puppet:///modules/downloadserver/adblockbrowserupdatescache.conf'
, |
| 72 require => Package['nginx'], |
| 73 notify => Service['nginx'] |
| 74 } |
| 75 |
50 cron {'mirror': | 76 cron {'mirror': |
51 ensure => present, | 77 ensure => present, |
52 command => 'hg pull -q -u -R /var/www/downloads/', | 78 command => 'hg pull -q -u -R /var/www/downloads/', |
53 environment => ['MAILTO=admins@adblockplus.org,root'], | 79 environment => ['MAILTO=admins@adblockplus.org,root'], |
54 user => hg, | 80 user => hg, |
55 minute => '*/10' | 81 minute => '*/10' |
56 } | 82 } |
57 | 83 |
58 file {'/var/www/devbuilds': | 84 file {'/var/www/devbuilds': |
59 ensure => directory, | 85 ensure => directory, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 require => [File['/home/rsync/.ssh/known_hosts'], | 125 require => [File['/home/rsync/.ssh/known_hosts'], |
100 File['/home/rsync/.ssh/id_rsa'], | 126 File['/home/rsync/.ssh/id_rsa'], |
101 File['/var/www/devbuilds']], | 127 File['/var/www/devbuilds']], |
102 command => 'rsync -e ssh -ltprz --delete devbuilds@ssh.adblockplus.org:. /va
r/www/devbuilds', | 128 command => 'rsync -e ssh -ltprz --delete devbuilds@ssh.adblockplus.org:. /va
r/www/devbuilds', |
103 environment => ['MAILTO=admins@adblockplus.org,root'], | 129 environment => ['MAILTO=admins@adblockplus.org,root'], |
104 user => rsync, | 130 user => rsync, |
105 hour => '*', | 131 hour => '*', |
106 minute => '4-54/10' | 132 minute => '4-54/10' |
107 } | 133 } |
108 } | 134 } |
OLD | NEW |