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

Side by Side Diff: manifests/webserver.pp

Issue 4808447505727488: Issue 2301 - Improve beta.adblockplus.org configuration (Closed)
Patch Set: Created April 15, 2015, 12:20 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
OLDNEW
1 node 'web1' { 1 node 'web1' {
2 include statsclient 2 include statsclient
3 3
4 class {'web::server': 4 class {'web::server':
5 vhost => 'eyeo.com', 5 vhost => 'eyeo.com',
6 certificate => 'eyeo.com_sslcert.pem', 6 certificate => 'eyeo.com_sslcert.pem',
7 private_key => 'eyeo.com_sslcert.key', 7 private_key => 'eyeo.com_sslcert.key',
8 is_default => true, 8 is_default => true,
9 aliases => ['www.eyeo.com', 'eyeo.de', 'www.eyeo.de'], 9 aliases => ['www.eyeo.com', 'eyeo.de', 'www.eyeo.de'],
10 custom_config => ' 10 custom_config => '
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 node 'web2' { 34 node 'web2' {
35 include statsclient 35 include statsclient
36 36
37 class {'web::server': 37 class {'web::server':
38 vhost => 'beta.adblockplus.org', 38 vhost => 'beta.adblockplus.org',
39 certificate => 'beta.adblockplus.org_sslcert.pem', 39 certificate => 'beta.adblockplus.org_sslcert.pem',
40 private_key => 'beta.adblockplus.org_sslcert.key', 40 private_key => 'beta.adblockplus.org_sslcert.key',
41 is_default => true, 41 is_default => true,
42 custom_config => template('web/adblockplus.org.conf.erb'),
42 repository => 'web.adblockplus.org', 43 repository => 'web.adblockplus.org',
43 # Hack: This server doesn't need multiplexer but it needs sitescripts 44 multiplexer_locations => ['/getSubscription'],
44 multiplexer_locations => [], 45 }
46
47 $sitescripts_var_dir = '/var/lib/sitescripts'
48 $subscriptions_repo = "${sitescripts_var_dir}/subscriptionlist"
49
50 concat::fragment {'formmail_template':
51 target => '/etc/sitescripts.ini',
52 content => "
53 [multiplexer]
54 sitescripts.subscriptions.web.fallback =
55 [subscriptions]
56 repository=$sitescripts_var_dir/subscriptionlist",
57 }
58
59 user {'sitescripts':
60 ensure => present,
61 home => $sitescripts_var_dir
62 }
63
64 file {$sitescripts_var_dir:
65 ensure => directory,
66 mode => 0755,
67 owner => 'sitescripts',
68 group => 'sitescripts'
69 }
70
71 exec {'fetch_repository_subscriptionlist':
72 command => "hg clone --noupdate https://hg.adblockplus.org/subscriptionlist $subscriptions_repo",
73 path => '/usr/local/bin:/usr/bin:/bin',
74 user => 'sitescripts',
75 timeout => 0,
76 onlyif => "test ! -d $subscriptions_repo",
77 require => [Package['mercurial'], File[$sitescripts_var_dir]]
78 }
79
80 cron {'update_repository_subscriptionlist':
81 ensure => present,
82 environment => ['MAILTO=admins@adblockplus.org'],
83 command => "hg pull --quiet --repository $subscriptions_repo",
84 user => 'sitescripts',
85 minute => '*/10',
86 require => Exec['fetch_repository_subscriptionlist']
45 } 87 }
46 } 88 }
OLDNEW
« no previous file with comments | « no previous file | modules/web/templates/adblockplus.org.conf.erb » ('j') | modules/web/templates/adblockplus.org.conf.erb » ('J')

Powered by Google App Engine
This is Rietveld