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

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

Issue 10590049: Initial download server configuration (Closed)
Patch Set: Created May 21, 2013, 3:32 p.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/downloadserver/files/logrotate ('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
(Empty)
1 class downloadserver {
2 user {'stats':
3 ensure => present,
4 home => '/home/stats',
5 managehome => true
6 }
7
8 file {'/home/stats/.ssh':
9 ensure => directory,
10 owner => stats,
11 mode => 0600,
12 require => User['stats']
13 }
14
15 file {'/home/stats/.ssh/authorized_keys':
16 ensure => present,
17 owner => stats,
18 mode => 0400,
19 source => 'puppet:///modules/private/subscriptionstat-authorized_keys'
20 }
21
22 class {'ssh':
23 custom_configuration => 'Match User stats
24 AllowTcpForwarding no
25 X11Forwarding no
26 AllowAgentForwarding no
27 GatewayPorts no
28 ForceCommand cat /var/www/stats.ini'
29 }
30
31 class {'nginx':
32 worker_processes => 2,
33 worker_connections => 4000,
34 ssl_session_cache => off,
35 }
36
37 user {'hg':
38 ensure => present,
39 comment => 'Mercurial client user',
40 home => '/home/hg',
41 managehome => true
42 }
43
44 file {'/var/www':
45 ensure => directory,
46 owner => hg,
47 mode => 0644
48 }
49
50 exec { "fetch_downloads":
51 command => "hg clone https://hg.adblockplus.org/downloads /var/www/downloads ",
52 path => ["/usr/bin/", "/bin/"],
53 require => Package['mercurial'],
54 user => hg,
55 onlyif => "test ! -d /var/www/downloads"
56 }
57
58 File {
59 owner => root,
60 group => root,
61 mode => 0644,
62 }
63
64 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.key':
65 ensure => file,
66 notify => Service['nginx'],
67 before => Nginx::Hostconfig['downloads.adblockplus.org'],
68 mode => 0400,
69 source => 'puppet:///modules/private/adblockplus.org_sslcert.key'
70 }
71
72 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.pem':
73 ensure => file,
74 notify => Service['nginx'],
75 before => Nginx::Hostconfig['downloads.adblockplus.org'],
76 mode => 0400,
77 source => 'puppet:///modules/private/adblockplus.org_sslcert.pem'
78 }
79
80 nginx::hostconfig{'downloads.adblockplus.org':
81 source => 'puppet:///modules/downloadserver/downloads.adblockplus.org',
82 enabled => true
83 }
84
85 file {'/etc/logrotate.d/nginx_downloads.adblockplus.org':
86 ensure => file,
87 mode => 0444,
88 require => Nginx::Hostconfig['downloads.adblockplus.org'],
89 source => 'puppet:///modules/downloadserver/logrotate'
90 }
91
92 cron {'mirror':
93 ensure => present,
94 command => 'hg pull -q -u -R /var/www/downloads/',
95 user => hg,
96 minute => '*/10'
97 }
98 }
OLDNEW
« no previous file with comments | « modules/downloadserver/files/logrotate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld