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

Side by Side Diff: modules/adblockplus/manifests/legacy/webserver.pp

Issue 29483575: #2007 - Create abp::legacy::webserver class for hiera compatibility (Closed)
Patch Set: For comment 9 and 10 Created July 12, 2017, 7:08 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 | « manifests/webserver.pp ('k') | modules/private-stub/hiera/hosts.yaml » ('j') | 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: adblockplus::legacy::webserver
2 #
3 # A container for migrating obsolete resources in web2, formerly located
4 # in manifests/webserver.pp.
5 #
6 # See http://hub.eyeo.com/issues/2007 for more information.
7 #
8 class adblockplus::legacy::webserver {
9
10 class {'web::server':
11 vhost => 'adblockplus.org',
12 certificate => 'adblockplus.org_sslcert.pem',
13 private_key => 'adblockplus.org_sslcert.key',
14 is_default => true,
15 aliases => ['www.adblockplus.org'],
16 custom_config => template("web/adblockplus.org.conf.erb"),
17 repository => 'web.adblockplus.org',
18 multiplexer_locations => ['/getSubscription'],
19 geoip => true,
20 }
21
22 ensure_packages([
23 'make',
24 'doxygen',
25 ])
26
27 $subscription_repo = '/home/www/subscriptionlist'
28
29 $fetch_repo_cmd = [
30 'hg', 'clone',
31 '--noupdate',
32 'https://hg.adblockplus.org/subscriptionlist',
33 $subscription_repo,
34 ]
35
36 exec {'fetch_repository_subscriptionlist':
37 command => shellquote($fetch_repo_cmd),
38 path => '/usr/local/bin:/usr/bin:/bin',
39 user => 'www',
40 timeout => 0,
41 onlyif => "test ! -d $subscription_repo",
42 require => Class['web::server'],
43 }
44
45 $update_repo_cmd = [
46 'hg', 'pull',
47 '--quiet', '--repository',
48 $subscription_repo,
49 ]
50
51 cron {'update_repository_subscriptionlist':
52 ensure => present,
53 environment => hiera('cron::environment', []),
54 command => shellquote($update_repo_cmd),
55 user => 'www',
56 minute => '1-59/20',
57 require => Exec['fetch_repository_subscriptionlist']
58 }
59
60 $generate_docs_cmd = [
61 'python', '-m',
62 'sitescripts.docs.bin.generate_docs',
63 ]
64
65 cron {'generate_docs':
66 ensure => 'present',
67 require => [
68 Class['sitescripts'],
69 Class['web::server'],
70 Class['nodejs'],
71 ],
72 command => shellquote($generate_docs_cmd),
73 user => www,
74 minute => '5-55/10',
75 }
76 }
77
OLDNEW
« no previous file with comments | « manifests/webserver.pp ('k') | modules/private-stub/hiera/hosts.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld