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

Side by Side Diff: modules/web/manifests/server.pp

Issue 29336202: Issue 3637 - Generate source code documentation on the web server (Closed)
Patch Set: Fix generation commands Created Feb. 10, 2016, 2:05 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/web/files/sitescripts ('k') | modules/web/templates/adblockplus.org.conf.erb » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class web::server( 1 class web::server(
2 $vhost, 2 $vhost,
3 $repository, 3 $repository,
4 $certificate = hiera('web::server::certificate', 'undef'), 4 $certificate = hiera('web::server::certificate', 'undef'),
5 $private_key = hiera('web::server::private_key', 'undef'), 5 $private_key = hiera('web::server::private_key', 'undef'),
6 $is_default = false, 6 $is_default = false,
7 $aliases = undef, 7 $aliases = undef,
8 $custom_config = undef, 8 $custom_config = undef,
9 $multiplexer_locations = undef, 9 $multiplexer_locations = undef,
10 $geoip = false, 10 $geoip = false,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 file {'/var/www': 99 file {'/var/www':
100 ensure => directory, 100 ensure => directory,
101 mode => 755, 101 mode => 755,
102 } 102 }
103 103
104 file {[ 104 file {[
105 "/var/cache/$repository", 105 "/var/cache/$repository",
106 "/var/www/$vhost", 106 "/var/www/$vhost",
107 "/var/www/docs",
107 ]: 108 ]:
108 ensure => directory, 109 ensure => directory,
109 owner => www, 110 owner => www,
110 mode => 755, 111 mode => 755,
111 } 112 }
112 113
113 cron {'update_cms': 114 cron {'update_cms':
114 ensure => present, 115 ensure => present,
115 command => "hg pull -q -u -R /opt/cms", 116 command => "hg pull -q -u -R /opt/cms",
116 minute => '5-55/10', 117 minute => '5-55/10',
117 } 118 }
118 119
119 cron {'update_repo': 120 cron {'update_repo':
120 ensure => present, 121 ensure => present,
121 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener ate_static_pages /home/www/${repository} /var/www/${vhost}", 122 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener ate_static_pages /home/www/${repository} /var/www/${vhost}",
122 user => www, 123 user => www,
123 minute => '*/10', 124 minute => '*/10',
124 } 125 }
126
127 # We have to set up the APT source and install the jsdoc package via npm
128 # manually. Once we're on Puppet 3, we can use the official nodejs module for
129 # all this: https://forge.puppetlabs.com/puppetlabs/nodejs
130
131 apt::source {'nodesource':
132 location => 'https://deb.nodesource.com/node_4.x',
133 release => 'precise',
134 repos => 'main',
135 key => '68576280',
136 key_content => template('web/nodesource.gpg.key.erb'),
137 }
138
139 package {'nodejs':
140 require => Apt::Source['nodesource'],
141 }
142
143 exec {'install_jsdoc':
144 command => 'npm install --global jsdoc',
145 path => ['/usr/bin/'],
146 require => Package['nodejs'],
147 onlyif => 'test ! -x /usr/bin/jsdoc',
148 }
149
150 package {'doxygen':}
151
152 cron {'generate_docs':
153 ensure => present,
154 require => [
155 Exec['fetch_sitescripts', 'install_jsdoc'],
156 Package['doxygen'],
157 File['/var/www/docs'],
158 ],
159 command => 'python -m sitescripts.docs.bin.generate_docs',
160 user => www,
161 minute => '5-55/10',
162 }
125 } 163 }
OLDNEW
« no previous file with comments | « modules/web/files/sitescripts ('k') | modules/web/templates/adblockplus.org.conf.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld